Skip to content

Instantly share code, notes, and snippets.

@apple502j
Created January 21, 2024 14:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save apple502j/7765d24272b2d75d02b443b34fc4607d to your computer and use it in GitHub Desktop.
Save apple502j/7765d24272b2d75d02b443b34fc4607d to your computer and use it in GitHub Desktop.
24w03a/b Fabric API breaking changes tracker

24w03a/b FAPI breaking changes

There are A LOT, mostly due to Mojang breaking networking AGAIN.

Removal & deprecation

The following deprecated APIs were removed:

  • fabric-containers-v0 (deprecated since 2020), use fabric-screen-handler-api-v1
  • ScreenRegistry and ScreenHandlerRegistry, use TAW

The following were deprecated:

  • FabricBlockSettings (use regular AbstractBlock.Settings)
  • FabricItemSettings (same; custom APIs available via interface injection of FabricItem PERIOD Settings)

Item API

CustomDamageHandler callback's signature was changed from ItemStack stack, int amount, LivingEntity entity, Consumer breakCallback to ItemStack stack, int amount, LivingEntity entity, EquipmentSlot slot, Runnable breakCallback. Additionally, calling breakCallback now ignores the return value and vanilla damage handler (as the item is already broken).

Particle API

FabricParticleTypes#complex now requires passing Codec and PacketCodec. You still need to pass Factory, which is used for commands.

Recipe API

CustomIngredientSerializer#read and write were removed and replaced with getPacketCodec.

Screen Handler API

ExtendedScreenHandlerType no longer uses raw PacketByteBuf; instead you create a custom data object and pass a PacketCodec in its constructor to serialize the payload. create similarly no longer takes PacketByteBuf, instead the custom data object. ExtendedScreenHandlerFactory#writeScreenOpeningData was replaced with getScreenOpeningData, which receives only the player as the argument, and returns the data object.

Networking API

TODO

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment