If you need to reference this type directly, like when casting an Array, or as a parameter, you will need to import it. Simply add the import at
the top of the file.
import crafttweaker . api.misc . Cauldron;
Lets you add new Cauldron interactions. Adds an interaction that will fire when an empty Cauldron is interacted with the given item. myCTCauldron . addEmptyInteraction( < item : minecraft:dirt > , (blockState, level, pos, player, hand, stack) => {
player . give( < item : minecraft:diamond > );
return crafttweaker . api.world.InteractionResult . sidedSuccess( level . isClientSide);
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
.
myCTCauldron . addInteraction( < block : minecraft:lava_cauldron > , < item : minecraft:dirt > , (blockState, level, pos, player, hand, stack) => {
player . give( < item : minecraft:diamond > );
return crafttweaker . api.world.InteractionResult . sidedSuccess( level . isClientSide);
Parameters:
cauldronBlock: Block
Type: Block
- The cauldron block to add an interaction to. Adds an interaction that will fire when a Cauldron with lava inside is interacted with the given item. myCTCauldron . addLavaInteraction( < item : minecraft:dirt > , (blockState, level, pos, player, hand, stack) => {
player . give( < item : minecraft:diamond > );
return crafttweaker . api.world.InteractionResult . sidedSuccess( level . isClientSide);
Adds an interaction that will fire when a Cauldron with powdered snow inside is interacted with the given item. myCTCauldron . addPowderSnowInteraction( < item : minecraft:dirt > , (blockState, level, pos, player, hand, stack) => {
player . give( < item : minecraft:diamond > );
return crafttweaker . api.world.InteractionResult . sidedSuccess( level . isClientSide);
Adds an interaction that will fire when a Cauldron with water inside is interacted with the given item. myCTCauldron . addWaterInteraction( < item : minecraft:dirt > , (blockState, level, pos, player, hand, stack) => {
player . give( < item : minecraft:diamond > );
return crafttweaker . api.world.InteractionResult . sidedSuccess( level . isClientSide);
Gets an interaction that fills a Cauldron with lava. myCTCauldron . fillLavaInteraction
Return Type:
CTCauldronInteraction
Gets an interaction that fills a Cauldron with lava. Returns : An interaction that fills a Cauldron with lava.
myCTCauldron . fillLavaInteraction();
Return Type:
CTCauldronInteraction
Gets an interaction that fills a Cauldron with lava. myCTCauldron . fillPowderSnowInteraction
Return Type:
CTCauldronInteraction
Gets an interaction that fills a Cauldron with lava. Returns : An interaction that fills a Cauldron with lava.
myCTCauldron . fillPowderSnowInteraction();
Return Type:
CTCauldronInteraction
Gets an interaction that fills a cauldron with water. myCTCauldron . fillWaterInteraction
Return Type:
CTCauldronInteraction
Gets an interaction that fills a cauldron with water. Returns : An interaction that fills a cauldron with water.
myCTCauldron . fillWaterInteraction();
Return Type:
CTCauldronInteraction
Removes the interaction for the given item from an empty Cauldron. myCTCauldron . removeEmptyInteraction(myItem);
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
.
myCTCauldron . removeInteraction( < block : minecraft:lava_cauldron > , < item : minecraft:dirt > );
Parameters:
cauldronBlock: Block
Type: Block
- The cauldron block to add an interaction to. Removes the interaction for the given item from a lava filled Cauldron. myCTCauldron . removeLavaInteraction(myItem);
Removes the interaction for the given item from a powdered snow filled Cauldron. myCTCauldron . removePowderSnowInteraction(myItem);
Removes the interaction for the given item from a water filled Cauldron. myCTCauldron . removeWaterInteraction(myItem);