Home Commands Examples Getting Started With Scripts Global Keywords
Generic Recipe Manipulation

BasicPotInteraction

Importing the class

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.

script.zs
import mods.botanypotstweaker.potinteraction.BasicPotInteraction;

Extends

BasicPotInteraction extends PotInteraction.

Implements

BasicPotInteraction implements the following interfaces:

Recipe<Container>

Members

Getter
Checks if this interaction damages the held item
script.zs
// BasicPotInteraction.damageHeld as bool
myBasicPotInteraction.damageHeld

Return Type: bool

Getter
Gets a list of extra items that will drop when this interaction happens.
script.zs
// BasicPotInteraction.extraDrops as IItemStack[]
myBasicPotInteraction.extraDrops

Return Type: IItemStack[]

Getter
Gets an ingredient that defines what causes this interaction to happen.
script.zs
// BasicPotInteraction.heldTest as IIngredient
myBasicPotInteraction.heldTest

Return Type: IIngredient

Getter
Gets the seed stack after the interaction changes it, if the interaction doesn't change it, this will return null
script.zs
// BasicPotInteraction.newSeedStack as IItemStack
myBasicPotInteraction.newSeedStack

Return Type: IItemStack

Getter
Gets the soil stack after the interaction changes it, if the interaction doesn't change it, this will return null
script.zs
// BasicPotInteraction.newSoilStack as IItemStack
myBasicPotInteraction.newSoilStack

Return Type: IItemStack

static of(id as ResourceLocation, heldTest as IIngredient, damageHeld as bool, soilTest as IIngredient = null, seedTest as IIngredient = null, newSoilStack as IItemStack = null, newSeedStack as IItemStack = null, sound as Sound = null, extraDrops as IItemStack[] = [] as crafttweaker.api.item.IItemStack[]) as BasicPotInteraction
Creates a new PotInteraction
script.zs
// BasicPotInteraction.of(id as ResourceLocation, heldTest as IIngredient, damageHeld as bool, soilTest as IIngredient = null, seedTest as IIngredient = null, newSoilStack as IItemStack = null, newSeedStack as IItemStack = null, sound as Sound = null, extraDrops as IItemStack[] = [] as crafttweaker.api.item.IItemStack[]) as BasicPotInteraction;
BasicPotInteraction.of(<resource:crafttweaker:interaction_test>, <item:minecraft:diamond>, false, null, null, null, <item:minecraft:iron_ingot>, Sound.of(<soundevent:minecraft:ambient.basalt_deltas.additions>, <constant:minecraft:sound/source:neutral>, 1,1), [<item:minecraft:stick>]);

Parameters:

id Type: ResourceLocation - The ID of the interaction.
heldTest Type: IIngredient - The ingredient that should be held
damageHeld Type: bool - Whether the held item should be damaged during the interaction.
soilTest (optional) Type: IIngredient - What soil does this interaction happen on.

Default Value: null

seedTest (optional) Type: IIngredient - What seed is this interaction for

Default Value: null

newSoilStack (optional) Type: IItemStack - The new soil stack to replace the current soil.

Default Value: null

newSeedStack (optional) Type: IItemStack - The new seed stack to replace the current seed.

Default Value: null

sound (optional) Type: Sound - The sound to play during the interaction.

Default Value: null

extraDrops (optional) Type: IItemStack[] - Additional items to drop during the interaction.

Default Value: [] as crafttweaker.api.item.IItemStack[]

Return Type: BasicPotInteraction

Getter
Gets an ingredient that defines which seeds this interaction can work with.
script.zs
// BasicPotInteraction.seedTest as IIngredient
myBasicPotInteraction.seedTest

Return Type: IIngredient

Getter
Gets an ingredient that defines which soils this interaction can work with.
script.zs
// BasicPotInteraction.soilTest as IIngredient
myBasicPotInteraction.soilTest

Return Type: IIngredient

Getter
Gets the sound that will play when this interaction happens.
script.zs
// BasicPotInteraction.sound as Sound
myBasicPotInteraction.sound

Return Type: Sound