Class CTCauldron

java.lang.Object
com.blamejared.crafttweaker.api.misc.CTCauldron

@ZenRegister public final class CTCauldron extends Object
Lets you add new Cauldron interactions.
DocParam:
this cauldron
  • Field Details

    • INSTANCE

      public static final CTCauldron INSTANCE
  • Method Details

    • addEmptyInteraction

      public void addEmptyInteraction(net.minecraft.world.item.Item item, CTCauldronInteraction interaction)
      Adds an interaction that will fire when an empty Cauldron is interacted with the given item.
      Parameters:
      item - The item to interact with.
      interaction - What happens when the item interacts with the cauldron.
      DocParam:
      item <item:minecraft:dirt>, interaction (blockState, level, pos, player, hand, stack) => { if !level.isClientSide { player.give(<item:minecraft:diamond>); } return crafttweaker.api.world.InteractionResult.sidedSuccess(level.isClientSide); }
    • removeEmptyInteraction

      public void removeEmptyInteraction(net.minecraft.world.item.Item item)
      Removes the interaction for the given item from an empty Cauldron.
      Parameters:
      item - The item to remove the interaction for.
    • addWaterInteraction

      public void addWaterInteraction(net.minecraft.world.item.Item item, CTCauldronInteraction interaction)
      Adds an interaction that will fire when a Cauldron with water inside is interacted with the given item.
      Parameters:
      item - The item to interact with.
      interaction - What happens when the item interacts with the cauldron.
      DocParam:
      item <item:minecraft:dirt>, interaction (blockState, level, pos, player, hand, stack) => { if !level.isClientSide { player.give(<item:minecraft:diamond>); } return crafttweaker.api.world.InteractionResult.sidedSuccess(level.isClientSide); }
    • removeWaterInteraction

      public void removeWaterInteraction(net.minecraft.world.item.Item item)
      Removes the interaction for the given item from a water filled Cauldron.
      Parameters:
      item - The item to remove the interaction for.
    • addLavaInteraction

      public void addLavaInteraction(net.minecraft.world.item.Item item, CTCauldronInteraction interaction)
      Adds an interaction that will fire when a Cauldron with lava inside is interacted with the given item.
      Parameters:
      item - The item to interact with.
      interaction - What happens when the item interacts with the cauldron.
      DocParam:
      item <item:minecraft:dirt>, interaction (blockState, level, pos, player, hand, stack) => { if !level.isClientSide { player.give(<item:minecraft:diamond>); } return crafttweaker.api.world.InteractionResult.sidedSuccess(level.isClientSide); }
    • removeLavaInteraction

      public void removeLavaInteraction(net.minecraft.world.item.Item item)
      Removes the interaction for the given item from a lava filled Cauldron.
      Parameters:
      item - The item to remove the interaction for.
    • addPowderSnowInteraction

      public void addPowderSnowInteraction(net.minecraft.world.item.Item item, CTCauldronInteraction interaction)
      Adds an interaction that will fire when a Cauldron with powdered snow inside is interacted with the given item.
      Parameters:
      item - The item to interact with.
      interaction - What happens when the item interacts with the cauldron.
      DocParam:
      item <item:minecraft:dirt>, interaction (blockState, level, pos, player, hand, stack) => { if !level.isClientSide { player.give(<item:minecraft:diamond>); } return crafttweaker.api.world.InteractionResult.sidedSuccess(level.isClientSide); }
    • removePowderSnowInteraction

      public void removePowderSnowInteraction(net.minecraft.world.item.Item item)
      Removes the interaction for the given item from a powdered snow filled Cauldron.
      Parameters:
      item - The item to remove the interaction for.
    • getFillWaterInteraction

      public CTCauldronInteraction getFillWaterInteraction()
      Gets an interaction that fills a cauldron with water.
      Returns:
      An interaction that fills a cauldron with water.
    • getFillLavaInteraction

      public CTCauldronInteraction getFillLavaInteraction()
      Gets an interaction that fills a Cauldron with lava.
      Returns:
      An interaction that fills a Cauldron with lava.
    • getFillPowderSnowInteraction

      public CTCauldronInteraction getFillPowderSnowInteraction()
      Gets an interaction that fills a Cauldron with lava.
      Returns:
      An interaction that fills a Cauldron with lava.
    • addInteraction

      public void addInteraction(net.minecraft.world.level.block.Block cauldronBlock, net.minecraft.world.item.Item item, CTCauldronInteraction interaction)
      Adds an interaction that will fire when the provided cauldron block is interacted with the given item.

      This method is mainly provided to add support for non-vanilla cauldrons, thus the provided block needs to be a AbstractCauldronBlock.

      Parameters:
      cauldronBlock - The cauldron block to add an interaction to.
      item - The item to interact with.
      interaction - What happens when the item interacts with the cauldron.
      DocParam:
      cauldronBlock <block:minecraft:lava_cauldron>, item <item:minecraft:dirt>, interaction (blockState, level, pos, player, hand, stack) => { if !level.isClientSide { player.give(<item:minecraft:diamond>); } return crafttweaker.api.world.InteractionResult.sidedSuccess(level.isClientSide); }
    • removeInteraction

      public void removeInteraction(net.minecraft.world.level.block.Block cauldronBlock, net.minecraft.world.item.Item item)
      Removes the interaction that will fire when the provided cauldron block is interacted with the given item.

      This method is mainly provided to add support for non-vanilla cauldrons, thus the provided block needs to be a AbstractCauldronBlock.

      Parameters:
      cauldronBlock - The cauldron block to add an interaction to.
      item - The item to interact with.
      DocParam:
      cauldronBlock <block:minecraft:lava_cauldron>, item <item:minecraft:dirt>
    • addInteraction

      public void addInteraction(Map<net.minecraft.world.item.Item,net.minecraft.core.cauldron.CauldronInteraction> map, net.minecraft.world.item.Item item, CTCauldronInteraction interaction)
    • removeInteraction

      public void removeInteraction(Map<net.minecraft.world.item.Item,net.minecraft.core.cauldron.CauldronInteraction> map, net.minecraft.world.item.Item item)