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. // CTCauldron.addEmptyInteraction(item as Item, interaction as CTCauldronInteraction);
cauldron . 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
.
// CTCauldron.addInteraction(cauldronBlock as Block, item as Item, interaction as CTCauldronInteraction);
cauldron . 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. // CTCauldron.addLavaInteraction(item as Item, interaction as CTCauldronInteraction);
cauldron . 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. // CTCauldron.addPowderSnowInteraction(item as Item, interaction as CTCauldronInteraction);
cauldron . 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. // CTCauldron.addWaterInteraction(item as Item, interaction as CTCauldronInteraction);
cauldron . 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. // CTCauldron.fillLavaInteraction as CTCauldronInteraction
cauldron . fillLavaInteraction
Return Type:
CTCauldronInteraction
Gets an interaction that fills a Cauldron with lava. Returns : An interaction that fills a Cauldron with lava.
// CTCauldron.fillLavaInteraction() as CTCauldronInteraction;
cauldron . fillLavaInteraction();
Return Type:
CTCauldronInteraction
Gets an interaction that fills a Cauldron with lava. // CTCauldron.fillPowderSnowInteraction as CTCauldronInteraction
cauldron . fillPowderSnowInteraction
Return Type:
CTCauldronInteraction
Gets an interaction that fills a Cauldron with lava. Returns : An interaction that fills a Cauldron with lava.
// CTCauldron.fillPowderSnowInteraction() as CTCauldronInteraction;
cauldron . fillPowderSnowInteraction();
Return Type:
CTCauldronInteraction
Gets an interaction that fills a cauldron with water. // CTCauldron.fillWaterInteraction as CTCauldronInteraction
cauldron . fillWaterInteraction
Return Type:
CTCauldronInteraction
Gets an interaction that fills a cauldron with water. Returns : An interaction that fills a cauldron with water.
// CTCauldron.fillWaterInteraction() as CTCauldronInteraction;
cauldron . fillWaterInteraction();
Return Type:
CTCauldronInteraction
Removes the interaction for the given item from an empty Cauldron. // CTCauldron.removeEmptyInteraction(item as Item);
cauldron . 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
.
// CTCauldron.removeInteraction(cauldronBlock as Block, item as Item);
cauldron . 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. // CTCauldron.removeLavaInteraction(item as Item);
cauldron . removeLavaInteraction(myItem);
Removes the interaction for the given item from a powdered snow filled Cauldron. // CTCauldron.removePowderSnowInteraction(item as Item);
cauldron . removePowderSnowInteraction(myItem);
Removes the interaction for the given item from a water filled Cauldron. // CTCauldron.removeWaterInteraction(item as Item);
cauldron . removeWaterInteraction(myItem);