Skip to content

MC 1.21#2509

Closed
Faithcaio wants to merge 16 commits intoapi-11from
update/1.21
Closed

MC 1.21#2509
Faithcaio wants to merge 16 commits intoapi-11from
update/1.21

Conversation

@Faithcaio
Copy link
Copy Markdown
Contributor

@Faithcaio Faithcaio commented Jun 1, 2024

SpongeAPI | Sponge

API Breakages:

  • Keys.ACCELERATION for projectile is now double (from Vector3d)
  • AttributeModifier now uses a ResourceKey instead of name and uniqueId
  • AbstractModifierEvent (AttackEntityEvent/DamageEntityEvent)
    • modifiers are no longer additive instead each modifier returns the input for the next one
    • damage values returns for each modifier is now a Tuple with the damage before and after the modifier was applied
    • added modifier groups - each group is calculated separately and summed at the end
  • Recipe now has a generic type for its RecipeInput
    • RecipeInput is required to match a recipe
      • untyped matching of a recipe with RecipeManager is no longer possible
    • RecipeInput.Factory is available to build inputs from ItemStacks
    • FurnaceBlockEntity, Campfire, CraftingGridInventory provide a way to get their respective RecipeInput
  • Keys.KNOCKBACK_STRENGTH is now for a custom knockback value bypassing the calculation using weapon enchantment and knockback resistance of the entity.
  • PortalType and PortalTypes are replaced by PortalLogic see below.
  • Portal no longer provides the destination. You can calculate it using its PortalLogic if present.
  • TwoDimensionalPortal dropped in favour of Portal#boundingBox() returning an Optional<AABB>
  • Keys.NEXT_ENTITY_TO_SPAWN for spawners is now just a EntityArchetype instead of WeightedSerializableObject with weight of 1

Additions

  • EnchantmentTypeTags
  • InvokePortalEvent
    • .Enter called when touching a portal block
    • .Prepare called before invoking the PortalLogic
    • .Execute called after finding/generating the portal exit. This is also a ChangeEntityWorldEvent.Reposition
  • PortalLogic replaces most of PortalType
    • PortalLogic.Factory provides the vanilla portal logic in form of:
      • PortalExitCalculator calculates the exit location using the origin location and entity (may return empty to make the teleport fail)
      • PortalFinder finds a portal around a calculated exit location (may return empty to generate a portal instead)
      • PortalGenerator generates a new portal at a calculated exit location (may return empty to make the teleport fail)
  • Keys.PORTAL and Keys.PORTAL_LOGIC to get the current active portal/portal logic
  • Keys.FOOD_CONVERTS_TO
  • Keys.AUTO_SPIN_ATTACK_DAMAGE Keys.AUTO_SPIN_ATTACK_WEAPON
  • a bunch of new registry values
  • TrialSpawner
  • Crafter

@Faithcaio Faithcaio changed the base branch from api-10 to api-11 June 1, 2024 14:27
@Faithcaio Faithcaio mentioned this pull request Jun 1, 2024
22 tasks
@Faithcaio Faithcaio force-pushed the update/1.21 branch 12 times, most recently from e3e7e45 to 42ee003 Compare June 8, 2024 08:21
@Faithcaio Faithcaio closed this Jun 23, 2024
@Faithcaio Faithcaio deleted the update/1.21 branch June 23, 2024 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant