Fabric API

Fabric API

106M Downloads

Packet Codecs in components cannot serialize Fabric created Dynamic Registries.

MerchantPug opened this issue ยท 3 comments

commented

This affects both 1.20.6 and 24w18a.

To reproduce..

  1. Add a dynamic registry.
  2. Create a component that uses this dynamic registry value. Can be a RegistryEntry or not one.
  3. Add the item to a creative menu with the component.
  4. Grab the new item from the creative menu.
  5. Witness Error sending packet serverbound/minecraft:set_creative_mode_slot

Minimal reproduction repository: https://github.com/MerchantPug/component-minimal-reproduction

This seems to lead to failing to get an int id from the registry.

commented

This will also happen if a mob spawns with something from this component, and that tries syncing to the client.

commented

Closing because I figured out the issue. I forgot to register the component lol.

commented

The issue as to why i reported this bug was fixed too, which was that i was using the integrated server's registries, rather than the client's.