Class CTCauldron
java.lang.Object
com.blamejared.crafttweaker.api.misc.CTCauldron
Lets you add new Cauldron interactions.
- DocParam:
- this cauldron
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidaddEmptyInteraction(net.minecraft.world.item.Item item, CTCauldronInteraction interaction) Adds an interaction that will fire when an empty Cauldron is interacted with the given item.voidaddInteraction(Map<net.minecraft.world.item.Item, net.minecraft.core.cauldron.CauldronInteraction> map, net.minecraft.world.item.Item item, CTCauldronInteraction interaction) voidaddInteraction(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.voidaddLavaInteraction(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.voidaddPowderSnowInteraction(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.voidaddWaterInteraction(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.Gets an interaction that fills a Cauldron with lava.Gets an interaction that fills a Cauldron with lava.Gets an interaction that fills a cauldron with water.voidremoveEmptyInteraction(net.minecraft.world.item.Item item) Removes the interaction for the given item from an empty Cauldron.voidremoveInteraction(Map<net.minecraft.world.item.Item, net.minecraft.core.cauldron.CauldronInteraction> map, net.minecraft.world.item.Item item) voidremoveInteraction(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.voidremoveLavaInteraction(net.minecraft.world.item.Item item) Removes the interaction for the given item from a lava filled Cauldron.voidremovePowderSnowInteraction(net.minecraft.world.item.Item item) Removes the interaction for the given item from a powdered snow filled Cauldron.voidremoveWaterInteraction(net.minecraft.world.item.Item item) Removes the interaction for the given item from a water filled Cauldron.
-
Field Details
-
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
Gets an interaction that fills a cauldron with water.- Returns:
- An interaction that fills a cauldron with water.
-
getFillLavaInteraction
Gets an interaction that fills a Cauldron with lava.- Returns:
- An interaction that fills a Cauldron with lava.
-
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)
-