Class BlockTransformerEvents

java.lang.Object
net.fabricmc.fabric.api.item.v1.BlockTransformerEvents

public final class BlockTransformerEvents extends Object
Events relating to block transformers, allowing for advanced modification of block transformers as they're loaded.

For adding new transformations to the vanilla transformers of axes, shovels, and hoes, see BlockTransformerHelper or the various block tags utilized by those vanilla transformers.

  • Field Details

    • MODIFY

      public static final Event<BlockTransformerEvents.Modify> MODIFY
      An event that allows a BlockTransformer to be modified without needing to fully override it.

      This should only be used to modify the behavior of external block transformers, where 'external' means either vanilla, from a data pack, or from another mod.

      For instance, a mod might add a transformer for one of its tools, and you may wish to add a new transformation to the transformer for your own blocks.

      For your own block transformers, you should simply define them in your mod's data pack. See the Block Transformer Definition page on the Minecraft Wiki for more information, and consider generating the JSON files with data generation.

      Note: If you wish to add transformations to axes, shovels, or hoes, consider using methods in BlockTransformerHelper or extending the relevant block tags through your mod's data pack instead.

  • Constructor Details

    • BlockTransformerEvents

      public BlockTransformerEvents()