Class RegisterCauldronInteractionEvent.Interaction

java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.event.RegisterCauldronInteractionEvent
net.neoforged.neoforge.event.RegisterCauldronInteractionEvent.Interaction
All Implemented Interfaces:
IModBusEvent
Enclosing class:
RegisterCauldronInteractionEvent

public static final class RegisterCauldronInteractionEvent.Interaction extends RegisterCauldronInteractionEvent

Fired to allow mods to register cauldron interactions to existing dispatchers. You can register to specific dispatchers or to all dispatchers at once.

The event is fired on the mod bus

  • Constructor Details

  • Method Details

    • register

      public void register(Identifier dispatcherId, Item item, CauldronInteraction interaction)
      Registers a cauldron interaction for the specified item within the dispatcher associated with the given identifier.
      Parameters:
      dispatcherId - The unique identifier of the dispatcher where the interaction should be registered.
      item - The item that will trigger the cauldron interaction.
      interaction - The cauldron interaction to be registered for the specified item.
      Throws:
      IllegalArgumentException - If no dispatcher is found for the given identifier.
    • register

      public void register(Identifier dispatcherId, TagKey<Item> itemTag, CauldronInteraction interaction)
      Registers a cauldron interaction for the specified item tag within the dispatcher associated with the given identifier.
      Parameters:
      dispatcherId - The identifier of the dispatcher to register the interaction with.
      itemTag - The tag key of the item that will trigger the cauldron interaction.
      interaction - The cauldron interaction to be registered for the specified item tag.
      Throws:
      IllegalArgumentException - If no dispatcher is found with the given identifier,
    • registerToAll

      public void registerToAll(Item item, CauldronInteraction interaction)
      Registers a cauldron interaction for the specified item across all existing dispatchers.
      Parameters:
      item - The item that will trigger the cauldron interaction.
      interaction - The cauldron interaction to be registered for the specified item.
    • registerToAll

      public void registerToAll(TagKey<Item> itemTag, CauldronInteraction interaction)
      Registers a cauldron interaction for the specified item tag across all existing dispatchers.
      Parameters:
      itemTag - The tag key of the items that will trigger the cauldron interaction.
      interaction - The cauldron interaction to be registered for items associated with the specified tag.