ToolActionIngredient
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.
import mods.farmersdelight.ToolActionIngredient;
Implemented Interfaces
ToolActionIngredient implements the following interfaces. That means all methods defined in these interfaces are also available in ToolActionIngredient
Casters
Result Type | Is Implicit |
---|---|
Result Type IData | Is Implicit true |
Result Type IIngredientWithAmount | Is Implicit true |
Result Type MapData | Is Implicit true |
Methods
ToolActionIngredient.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[] |
ToolActionIngredient.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[] |
ToolActionIngredient.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[] |
ToolActionIngredient.addTooltip(content as Component)
Parameter | Type |
---|---|
Parameter content | Type Component |
Return Type: IngredientConditioned<IIngredient>
// ToolActionIngredient.anyDamage() as IngredientConditioned<IIngredient>
myToolActionIngredient.anyDamage();
Return Type: IIngredientWithAmount
// ToolActionIngredient.asIIngredientWithAmount() as IIngredientWithAmount
myToolActionIngredient.asIIngredientWithAmount();
ToolActionIngredient.clearTooltip(leaveName as boolean)
Parameter | Type | Optional | Default Value |
---|---|---|---|
Parameter leaveName | Type boolean | Optional true | Default Value false |
Return Type: boolean
ToolActionIngredient.contains(ingredient as IIngredient) as boolean
Parameter | Type |
---|---|
Parameter ingredient | Type IIngredient |
Return Type: IItemStack
ToolActionIngredient.getRemainingItem(stack as IItemStack) as IItemStack
Parameter | Type |
---|---|
Parameter stack | Type IItemStack |
Return Type: boolean
// ToolActionIngredient.isEmpty() as boolean
myToolActionIngredient.isEmpty();
Return Type: boolean
ToolActionIngredient.matches(stack as IItemStack) as boolean
Parameter | Type |
---|---|
Parameter stack | Type IItemStack |
ToolActionIngredient.modifyShiftTooltip(shiftedFunction as ITooltipFunction, unshiftedFunction as ITooltipFunction)
Parameter | Type | Optional |
---|---|---|
Parameter shiftedFunction | Type ITooltipFunction | Optional false |
Parameter unshiftedFunction | Type ITooltipFunction | Optional true |
ToolActionIngredient.modifyTooltip(function as ITooltipFunction)
Parameter | Type |
---|---|
Parameter function | Type ITooltipFunction |
Return Type: IIngredientWithAmount
ToolActionIngredient.mul(amount as int) as IIngredientWithAmount
Parameter | Type |
---|---|
Parameter amount | Type int |
Return Type: IngredientConditioned<IIngredient>
ToolActionIngredient.only(condition as IIngredientCondition<IIngredient>) as IngredientConditioned<IIngredient>
Parameter | Type |
---|---|
Parameter condition | Type IIngredientCondition<IIngredient> |
Return Type: IngredientConditioned<IIngredient>
// ToolActionIngredient.onlyDamaged() as IngredientConditioned<IIngredient>
myToolActionIngredient.onlyDamaged();
Return Type: IngredientConditioned<IIngredient>
ToolActionIngredient.onlyDamagedAtLeast(minDamage as int) as IngredientConditioned<IIngredient>
Parameter | Type |
---|---|
Parameter minDamage | Type int |
Return Type: IngredientConditioned<IIngredient>
ToolActionIngredient.onlyDamagedAtMost(maxDamage as int) as IngredientConditioned<IIngredient>
Parameter | Type |
---|---|
Parameter maxDamage | Type int |
Return Type: IngredientConditioned<IIngredient>
ToolActionIngredient.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 |
ToolActionIngredient.removeGlobalAttribute(attribute as Attribute, slotTypes as EquipmentSlot[])
Parameter | Type |
---|---|
Parameter attribute | Type Attribute |
Parameter slotTypes | Type EquipmentSlot[] |
ToolActionIngredient.removeGlobalAttributeModifier(uuid as invalid, slotTypes as EquipmentSlot[])
Parameter | Type |
---|---|
Parameter uuid | Type invalid |
Parameter slotTypes | Type EquipmentSlot[] |
ToolActionIngredient.removeGlobalAttributeModifier(uuid as string, slotTypes as EquipmentSlot[])
Parameter | Type |
---|---|
Parameter uuid | Type string |
Parameter slotTypes | Type EquipmentSlot[] |
ToolActionIngredient.removeTooltip(regex as string)
Parameter | Type |
---|---|
Parameter regex | Type string |
Return Type: IIngredientTransformed<IIngredient>
// ToolActionIngredient.reuse() as IIngredientTransformed<IIngredient>
myToolActionIngredient.reuse();
ToolActionIngredient.setBurnTime(time as int)
Parameter | Type |
---|---|
Parameter time | Type int |
Return Type: IIngredientTransformed<IIngredient>
ToolActionIngredient.transform(transformer as IIngredientTransformer<IIngredient>) as IIngredientTransformed<IIngredient>
Parameter | Type |
---|---|
Parameter transformer | Type IIngredientTransformer<IIngredient> |
Return Type: IIngredientTransformed<IIngredient>
ToolActionIngredient.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 |
Return Type: IIngredientTransformed<IIngredient>
ToolActionIngredient.transformDamage(amount as int) as IIngredientTransformed<IIngredient>
Parameter | Type | Optional | Default Value |
---|---|---|---|
Parameter amount | Type int | Optional true | Default Value 1 |
Return Type: IIngredientTransformed<IIngredient>
ToolActionIngredient.transformReplace(replaceWith as IItemStack) as IIngredientTransformed<IIngredient>
Parameter | Type |
---|---|
Parameter replaceWith | Type IItemStack |
Operators
ingredient as IIngredient in myToolActionIngredient
myToolActionIngredient * amount as int
myToolActionIngredient | other as IIngredient
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 |