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 Copyimport 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
Casters
Link to casters
Result Type | Is Implicit |
---|---|
Result Type IData | Is Implicit true |
Result Type IIngredientWithAmount | Is Implicit true |
Result Type MapData | Is Implicit true |
Methods
Link to methods
Name: addGlobalAttributeModifier
ZenScript CopyToolActionIngredient.addGlobalAttributeModifier(attribute as Attribute, name as string, value as double, operation as AttributeOperation, slotTypes as EquipmentSlot[])
Parameter | Type |
---|---|
Parameter attribute | Type Attribute |
Parameter name | Type string |
Parameter value | Type double |
Parameter operation | Type AttributeOperation |
Parameter slotTypes | Type EquipmentSlot[] |
Name: addGlobalAttributeModifier
ZenScript CopyToolActionIngredient.addGlobalAttributeModifier(attribute as Attribute, uuid as invalid, name as string, value as double, operation as AttributeOperation, slotTypes as EquipmentSlot[])
Parameter | Type |
---|---|
Parameter attribute | Type Attribute |
Parameter uuid | Type invalid |
Parameter name | Type string |
Parameter value | Type double |
Parameter operation | Type AttributeOperation |
Parameter slotTypes | Type EquipmentSlot[] |
Name: addGlobalAttributeModifier
ZenScript CopyToolActionIngredient.addGlobalAttributeModifier(attribute as Attribute, uuid as string, name as string, value as double, operation as AttributeOperation, slotTypes as EquipmentSlot[])
Parameter | Type |
---|---|
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: addTooltip
ZenScript CopyToolActionIngredient.addTooltip(content as Component)
Parameter | Type |
---|---|
Parameter content | Type Component |
Name: anyDamage
Return Type: IngredientConditioned<IIngredient>
ZenScript Copy// ToolActionIngredient.anyDamage() as IngredientConditioned<IIngredient>
myToolActionIngredient.anyDamage();
Name: asIIngredientWithAmount
Return Type: IIngredientWithAmount
ZenScript Copy// ToolActionIngredient.asIIngredientWithAmount() as IIngredientWithAmount
myToolActionIngredient.asIIngredientWithAmount();
Name: clearTooltip
ZenScript CopyToolActionIngredient.clearTooltip(leaveName as boolean)
Parameter | Type | Optional | Default Value |
---|---|---|---|
Parameter leaveName | Type boolean | Optional true | Default Value false |
Name: contains
Return Type: boolean
ZenScript CopyToolActionIngredient.contains(ingredient as IIngredient) as boolean
Parameter | Type |
---|---|
Parameter ingredient | Type IIngredient |
Name: getRemainingItem
Return Type: IItemStack
ZenScript CopyToolActionIngredient.getRemainingItem(stack as IItemStack) as IItemStack
Parameter | Type |
---|---|
Parameter stack | Type IItemStack |
Name: isEmpty
Return Type: boolean
ZenScript Copy// ToolActionIngredient.isEmpty() as boolean
myToolActionIngredient.isEmpty();
Name: matches
Return Type: boolean
ZenScript CopyToolActionIngredient.matches(stack as IItemStack) as boolean
Parameter | Type |
---|---|
Parameter stack | Type IItemStack |
Name: modifyShiftTooltip
ZenScript CopyToolActionIngredient.modifyShiftTooltip(shiftedFunction as ITooltipFunction, unshiftedFunction as ITooltipFunction)
Parameter | Type | Optional |
---|---|---|
Parameter shiftedFunction | Type ITooltipFunction | Optional false |
Parameter unshiftedFunction | Type ITooltipFunction | Optional true |
Name: modifyTooltip
ZenScript CopyToolActionIngredient.modifyTooltip(function as ITooltipFunction)
Parameter | Type |
---|---|
Parameter function | Type ITooltipFunction |
Name: mul
Return Type: IIngredientWithAmount
ZenScript CopyToolActionIngredient.mul(amount as int) as IIngredientWithAmount
Parameter | Type |
---|---|
Parameter amount | Type int |
Name: only
Return Type: IngredientConditioned<IIngredient>
ZenScript CopyToolActionIngredient.only(condition as IIngredientCondition<IIngredient>) as IngredientConditioned<IIngredient>
Parameter | Type |
---|---|
Parameter condition | Type IIngredientCondition<IIngredient> |
Name: onlyDamaged
Return Type: IngredientConditioned<IIngredient>
ZenScript Copy// ToolActionIngredient.onlyDamaged() as IngredientConditioned<IIngredient>
myToolActionIngredient.onlyDamaged();
Name: onlyDamagedAtLeast
Return Type: IngredientConditioned<IIngredient>
ZenScript CopyToolActionIngredient.onlyDamagedAtLeast(minDamage as int) as IngredientConditioned<IIngredient>
Parameter | Type |
---|---|
Parameter minDamage | Type int |
Name: onlyDamagedAtMost
Return Type: IngredientConditioned<IIngredient>
ZenScript CopyToolActionIngredient.onlyDamagedAtMost(maxDamage as int) as IngredientConditioned<IIngredient>
Parameter | Type |
---|---|
Parameter maxDamage | Type int |
Name: onlyIf
Return Type: IngredientConditioned<IIngredient>
ZenScript CopyToolActionIngredient.onlyIf(uid as string, function as Predicate<IItemStack>) as IngredientConditioned<IIngredient>
Parameter | Type | Optional |
---|---|---|
Parameter uid | Type string | Optional false |
Parameter function | Type Predicate<IItemStack> | Optional true |
Name: removeGlobalAttribute
ZenScript CopyToolActionIngredient.removeGlobalAttribute(attribute as Attribute, slotTypes as EquipmentSlot[])
Parameter | Type |
---|---|
Parameter attribute | Type Attribute |
Parameter slotTypes | Type EquipmentSlot[] |
Name: removeGlobalAttributeModifier
ZenScript CopyToolActionIngredient.removeGlobalAttributeModifier(uuid as invalid, slotTypes as EquipmentSlot[])
Parameter | Type |
---|---|
Parameter uuid | Type invalid |
Parameter slotTypes | Type EquipmentSlot[] |
Name: removeGlobalAttributeModifier
ZenScript CopyToolActionIngredient.removeGlobalAttributeModifier(uuid as string, slotTypes as EquipmentSlot[])
Parameter | Type |
---|---|
Parameter uuid | Type string |
Parameter slotTypes | Type EquipmentSlot[] |
Name: removeTooltip
ZenScript CopyToolActionIngredient.removeTooltip(regex as string)
Parameter | Type |
---|---|
Parameter regex | Type string |
Name: reuse
Return Type: IIngredientTransformed<IIngredient>
ZenScript Copy// ToolActionIngredient.reuse() as IIngredientTransformed<IIngredient>
myToolActionIngredient.reuse();
Name: setBurnTime
ZenScript CopyToolActionIngredient.setBurnTime(time as int)
Parameter | Type |
---|---|
Parameter time | Type int |
Name: transform
Return Type: IIngredientTransformed<IIngredient>
ZenScript CopyToolActionIngredient.transform(transformer as IIngredientTransformer<IIngredient>) as IIngredientTransformed<IIngredient>
Parameter | Type |
---|---|
Parameter transformer | Type IIngredientTransformer<IIngredient> |
Name: transformCustom
Return Type: IIngredientTransformed<IIngredient>
ZenScript CopyToolActionIngredient.transformCustom(uid as string, function as Function<IItemStack,IItemStack>) as IIngredientTransformed<IIngredient>
Parameter | Type | Optional |
---|---|---|
Parameter uid | Type string | Optional false |
Parameter function | Type Function<IItemStack,IItemStack> | Optional true |
Name: transformDamage
Return Type: IIngredientTransformed<IIngredient>
ZenScript CopyToolActionIngredient.transformDamage(amount as int) as IIngredientTransformed<IIngredient>
Parameter | Type | Optional | Default Value |
---|---|---|---|
Parameter amount | Type int | Optional true | Default Value 1 |
Name: transformReplace
Return Type: IIngredientTransformed<IIngredient>
ZenScript CopyToolActionIngredient.transformReplace(replaceWith as IItemStack) as IIngredientTransformed<IIngredient>
Parameter | Type |
---|---|
Parameter replaceWith | Type IItemStack |
Operators
Link to operators
Name: CONTAINS
ZenScript Copyingredient as IIngredient in myToolActionIngredient
Name: MUL
ZenScript CopymyToolActionIngredient * amount as int
Name: OR
ZenScript CopymyToolActionIngredient | other as IIngredient
Properties
Link to properties
Name | Type | Has Getter | Has Setter |
---|---|---|---|
Name burnTime | Type void | Has Getter false | Has Setter true |
Name empty | Type boolean | Has Getter true | Has Setter false |