ToolActionIngredient

Link to toolactioningredient

Importing the class

Link to importing-the-class

It might be required for you to import the package if you encounter any issues (like casting an Array), so better be safe than sorry and add the import at the very top of the file.

ZenScript
Copy
import mods.farmersdelight.ToolActionIngredient;

Implemented Interfaces

Link to implemented-interfaces

ToolActionIngredient implements the following interfaces. That means all methods defined in these interfaces are also available in ToolActionIngredient

Result TypeIs Implicit
Result Type
IData
Is Implicit
true
Result Type
IIngredientWithAmount
Is Implicit
true
Result Type
MapData
Is Implicit
true

Link to addGlobalAttributeModifier

Name: addGlobalAttributeModifier

ZenScript
Copy
ToolActionIngredient.addGlobalAttributeModifier(attribute as Attribute, name as string, value as double, operation as AttributeOperation, slotTypes as EquipmentSlot[])
ParameterType
Parameter
attribute
Type
Attribute
Parameter
name
Type
string
Parameter
value
Type
double
Parameter
operation
Type
AttributeOperation
Parameter
slotTypes
Type
EquipmentSlot[]

Link to addGlobalAttributeModifier

Name: addGlobalAttributeModifier

ZenScript
Copy
ToolActionIngredient.addGlobalAttributeModifier(attribute as Attribute, uuid as invalid, name as string, value as double, operation as AttributeOperation, slotTypes as EquipmentSlot[])
ParameterType
Parameter
attribute
Type
Attribute
Parameter
uuid
Type
invalid
Parameter
name
Type
string
Parameter
value
Type
double
Parameter
operation
Type
AttributeOperation
Parameter
slotTypes
Type
EquipmentSlot[]

Link to addGlobalAttributeModifier

Name: addGlobalAttributeModifier

ZenScript
Copy
ToolActionIngredient.addGlobalAttributeModifier(attribute as Attribute, uuid as string, name as string, value as double, operation as AttributeOperation, slotTypes as EquipmentSlot[])
ParameterType
Parameter
attribute
Type
Attribute
Parameter
uuid
Type
string
Parameter
name
Type
string
Parameter
value
Type
double
Parameter
operation
Type
AttributeOperation
Parameter
slotTypes
Type
EquipmentSlot[]

Name: addShiftTooltip

ZenScript
Copy
ToolActionIngredient.addShiftTooltip(content as Component, showMessage as Component)
ParameterTypeOptional
Parameter
content
Type
Component
Optional
false
Parameter
showMessage
Type
Component
Optional
true

Name: addTooltip

ZenScript
Copy
ToolActionIngredient.addTooltip(content as Component)
ParameterType
Parameter
content
Type
Component

Name: anyDamage

Return Type: IngredientConditioned<IIngredient>

ZenScript
Copy
// ToolActionIngredient.anyDamage() as IngredientConditioned<IIngredient>

myToolActionIngredient.anyDamage();

Link to asIIngredientWithAmount

Name: asIIngredientWithAmount

Return Type: IIngredientWithAmount

ZenScript
Copy
// ToolActionIngredient.asIIngredientWithAmount() as IIngredientWithAmount

myToolActionIngredient.asIIngredientWithAmount();

Name: clearTooltip

ZenScript
Copy
ToolActionIngredient.clearTooltip(leaveName as boolean)
ParameterTypeOptionalDefault Value
Parameter
leaveName
Type
boolean
Optional
true
Default Value
false

Name: contains

Return Type: boolean

ZenScript
Copy
ToolActionIngredient.contains(ingredient as IIngredient) as boolean
ParameterType
Parameter
ingredient
Type
IIngredient

Link to getRemainingItem

Name: getRemainingItem

Return Type: IItemStack

ZenScript
Copy
ToolActionIngredient.getRemainingItem(stack as IItemStack) as IItemStack
ParameterType
Parameter
stack
Type
IItemStack

Name: isEmpty

Return Type: boolean

ZenScript
Copy
// ToolActionIngredient.isEmpty() as boolean

myToolActionIngredient.isEmpty();

Name: matches

Return Type: boolean

ZenScript
Copy
ToolActionIngredient.matches(stack as IItemStack) as boolean
ParameterType
Parameter
stack
Type
IItemStack

Link to modifyShiftTooltip

Name: modifyShiftTooltip

ZenScript
Copy
ToolActionIngredient.modifyShiftTooltip(shiftedFunction as ITooltipFunction, unshiftedFunction as ITooltipFunction)
ParameterTypeOptional
Parameter
shiftedFunction
Type
ITooltipFunction
Optional
false
Parameter
unshiftedFunction
Type
ITooltipFunction
Optional
true

Name: modifyTooltip

ZenScript
Copy
ToolActionIngredient.modifyTooltip(function as ITooltipFunction)
ParameterType
Parameter
function
Type
ITooltipFunction

Name: mul

Return Type: IIngredientWithAmount

ZenScript
Copy
ToolActionIngredient.mul(amount as int) as IIngredientWithAmount
ParameterType
Parameter
amount
Type
int

Name: only

Return Type: IngredientConditioned<IIngredient>

ZenScript
Copy
ToolActionIngredient.only(condition as IIngredientCondition<IIngredient>) as IngredientConditioned<IIngredient>
ParameterType
Parameter
condition
Type
IIngredientCondition<IIngredient>

Name: onlyDamaged

Return Type: IngredientConditioned<IIngredient>

ZenScript
Copy
// ToolActionIngredient.onlyDamaged() as IngredientConditioned<IIngredient>

myToolActionIngredient.onlyDamaged();

Link to onlyDamagedAtLeast

Name: onlyDamagedAtLeast

Return Type: IngredientConditioned<IIngredient>

ZenScript
Copy
ToolActionIngredient.onlyDamagedAtLeast(minDamage as int) as IngredientConditioned<IIngredient>
ParameterType
Parameter
minDamage
Type
int

Link to onlyDamagedAtMost

Name: onlyDamagedAtMost

Return Type: IngredientConditioned<IIngredient>

ZenScript
Copy
ToolActionIngredient.onlyDamagedAtMost(maxDamage as int) as IngredientConditioned<IIngredient>
ParameterType
Parameter
maxDamage
Type
int

Name: onlyIf

Return Type: IngredientConditioned<IIngredient>

ZenScript
Copy
ToolActionIngredient.onlyIf(uid as string, function as Predicate<IItemStack>) as IngredientConditioned<IIngredient>
ParameterTypeOptional
Parameter
uid
Type
string
Optional
false
Parameter
function
Type
Predicate<IItemStack>
Optional
true

Link to removeGlobalAttribute

Name: removeGlobalAttribute

ZenScript
Copy
ToolActionIngredient.removeGlobalAttribute(attribute as Attribute, slotTypes as EquipmentSlot[])
ParameterType
Parameter
attribute
Type
Attribute
Parameter
slotTypes
Type
EquipmentSlot[]

Link to removeGlobalAttributeModifier

Name: removeGlobalAttributeModifier

ZenScript
Copy
ToolActionIngredient.removeGlobalAttributeModifier(uuid as invalid, slotTypes as EquipmentSlot[])
ParameterType
Parameter
uuid
Type
invalid
Parameter
slotTypes
Type
EquipmentSlot[]

Link to removeGlobalAttributeModifier

Name: removeGlobalAttributeModifier

ZenScript
Copy
ToolActionIngredient.removeGlobalAttributeModifier(uuid as string, slotTypes as EquipmentSlot[])
ParameterType
Parameter
uuid
Type
string
Parameter
slotTypes
Type
EquipmentSlot[]

Name: removeTooltip

ZenScript
Copy
ToolActionIngredient.removeTooltip(regex as string)
ParameterType
Parameter
regex
Type
string

Name: reuse

Return Type: IIngredientTransformed<IIngredient>

ZenScript
Copy
// ToolActionIngredient.reuse() as IIngredientTransformed<IIngredient>

myToolActionIngredient.reuse();

Name: setBurnTime

ZenScript
Copy
ToolActionIngredient.setBurnTime(time as int)
ParameterType
Parameter
time
Type
int

Name: transform

Return Type: IIngredientTransformed<IIngredient>

ZenScript
Copy
ToolActionIngredient.transform(transformer as IIngredientTransformer<IIngredient>) as IIngredientTransformed<IIngredient>
ParameterType
Parameter
transformer
Type
IIngredientTransformer<IIngredient>

Name: transformCustom

Return Type: IIngredientTransformed<IIngredient>

ZenScript
Copy
ToolActionIngredient.transformCustom(uid as string, function as Function<IItemStack,IItemStack>) as IIngredientTransformed<IIngredient>
ParameterTypeOptional
Parameter
uid
Type
string
Optional
false
Parameter
function
Type
Function<IItemStack,IItemStack>
Optional
true

Name: transformDamage

Return Type: IIngredientTransformed<IIngredient>

ZenScript
Copy
ToolActionIngredient.transformDamage(amount as int) as IIngredientTransformed<IIngredient>
ParameterTypeOptionalDefault Value
Parameter
amount
Type
int
Optional
true
Default Value
1

Link to transformReplace

Name: transformReplace

Return Type: IIngredientTransformed<IIngredient>

ZenScript
Copy
ToolActionIngredient.transformReplace(replaceWith as IItemStack) as IIngredientTransformed<IIngredient>
ParameterType
Parameter
replaceWith
Type
IItemStack

Name: CONTAINS

ZenScript
Copy
ingredient as IIngredient in myToolActionIngredient

Name: MUL

ZenScript
Copy
myToolActionIngredient * amount as int

Name: OR

ZenScript
Copy
myToolActionIngredient | other as IIngredient
NameTypeHas GetterHas Setter
Name
burnTime
Type
void
Has Getter
false
Has Setter
true
Name
empty
Type
boolean
Has Getter
true
Has Setter
false