An ingredient that matches any item with the given tool type.

This class was added by a mod with mod-id farmersdelight. Perciò, è necessario avere questa mod installata per poter utilizzare questa funzione.

Importare la Classe

Link to importare-la-classe

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.ToolIngredient;

Interfacce Implementate

Link to interfacce-implementate

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

Link to getToolIngredient

Name: getToolIngredient

Get a tool ingredient from a tool type name.

Returns: The ingredient
Return Type: ToolIngredient

ZenScript
Copy
<toolingredient:axe>

// ToolIngredient.getToolIngredient(type as string) as ToolIngredient

ToolIngredient.getToolIngredient("axe");
ParametroTipoDescrizione
Parametro
type
Tipo
string
Descrizione
The name of the type

Link to getToolIngredient

Name: getToolIngredient

Get a tool ingredient from a tool type.

Returns: The ingredient
Return Type: ToolIngredient

ZenScript
Copy
// ToolIngredient.getToolIngredient(type as ToolType) as ToolIngredient

ToolIngredient.getToolIngredient(<tooltype:axe>);
ParametroTipoDescrizione
Parametro
type
Tipo
ToolType
Descrizione
Il tipo di strumento
Tipo RisultatoImplicito
Tipo Risultato
IData
Implicito
Tipo Risultato
MapData
Implicito

Link to addGlobalAttributeModifier

Name: addGlobalAttributeModifier

Return Type: void

ZenScript
Copy
ToolIngredient.addGlobalAttributeModifier(attribute as Attribute, name as string, value as double, operation as AttributeOperation, slotTypes as MCEquipmentSlotType[]) as void
ParametroTipoDescrizione
Parametro
attribute
Tipo
Attribute
Descrizione
No Description Provided
Parametro
nome
Tipo
string
Descrizione
No Description Provided
Parametro
valore
Tipo
double
Descrizione
No Description Provided
Parametro
operation
Tipo
AttributeOperation
Descrizione
No Description Provided
Parametro
slotTypes
Tipo
MCEquipmentSlotType[]
Descrizione
No Description Provided

Link to addGlobalAttributeModifier

Name: addGlobalAttributeModifier

Return Type: void

ZenScript
Copy
ToolIngredient.addGlobalAttributeModifier(attribute as Attribute, uuid as string, name as string, value as double, operation as AttributeOperation, slotTypes as MCEquipmentSlotType[]) as void
ParametroTipoDescrizione
Parametro
attribute
Tipo
Attribute
Descrizione
No Description Provided
Parametro
uuid
Tipo
string
Descrizione
No Description Provided
Parametro
nome
Tipo
string
Descrizione
No Description Provided
Parametro
valore
Tipo
double
Descrizione
No Description Provided
Parametro
operation
Tipo
AttributeOperation
Descrizione
No Description Provided
Parametro
slotTypes
Tipo
MCEquipmentSlotType[]
Descrizione
No Description Provided

Name: addShiftTooltip

Return Type: void

ZenScript
Copy
ToolIngredient.addShiftTooltip(arg0 as MCTextComponent, arg1 as MCTextComponent) as void
ParametroTipoDescrizioneOptionalDefaultValue
Parametro
arg0
Tipo
MCTextComponent
Descrizione
No Description Provided
Optional
no
DefaultValue
Parametro
arg1
Tipo
MCTextComponent
Descrizione
No Description Provided
Optional
DefaultValue

Name: addTooltip

Return Type: void

ZenScript
Copy
ToolIngredient.addTooltip(content as MCTextComponent) as void
ParametroTipoDescrizione
Parametro
contenuto
Tipo
MCTextComponent
Descrizione
No Description Provided

Name: anyDamage

Return Type: MCIngredientConditioned<IIngredient>

ZenScript
Copy
// ToolIngredient.anyDamage() as MCIngredientConditioned<IIngredient>

myToolIngredient.anyDamage();

Name: clearTooltip

Return Type: void

ZenScript
Copy
// ToolIngredient.clearTooltip() as void

myToolIngredient.clearTooltip();

Name: contains

Return Type: boolean

ZenScript
Copy
ToolIngredient.contains(ingredient as IIngredient) as boolean
ParametroTipoDescrizione
Parametro
ingredient
Tipo
IIngredient
Descrizione
No Description Provided

Link to getRemainingItem

Name: getRemainingItem

Return Type: IItemStack

ZenScript
Copy
ToolIngredient.getRemainingItem(stack as IItemStack) as IItemStack
ParametroTipoDescrizione
Parametro
stack
Tipo
IItemStack
Descrizione
No Description Provided

Name: matches

Return Type: boolean

ZenScript
Copy
ToolIngredient.matches(stack as IItemStack) as boolean
ParametroTipoDescrizione
Parametro
stack
Tipo
IItemStack
Descrizione
No Description Provided

Link to modifyShiftTooltip

Name: modifyShiftTooltip

Return Type: void

ZenScript
Copy
ToolIngredient.modifyShiftTooltip(arg0 as ITooltipFunction, arg1 as ITooltipFunction) as void
ParametroTipoDescrizioneOptionalDefaultValue
Parametro
arg0
Tipo
ITooltipFunction
Descrizione
No Description Provided
Optional
no
DefaultValue
Parametro
arg1
Tipo
ITooltipFunction
Descrizione
No Description Provided
Optional
DefaultValue

Name: modifyTooltip

Return Type: void

ZenScript
Copy
ToolIngredient.modifyTooltip(function as ITooltipFunction) as void
ParametroTipoDescrizione
Parametro
function
Tipo
ITooltipFunction
Descrizione
No Description Provided

Name: only

Return Type: MCIngredientConditioned<IIngredient>

ZenScript
Copy
ToolIngredient.only(condition as IIngredientCondition<IIngredient>) as MCIngredientConditioned<IIngredient>
ParametroTipoDescrizione
Parametro
condition
Tipo
IIngredientCondition<IIngredient>
Descrizione
No Description Provided

Name: onlyDamaged

Return Type: MCIngredientConditioned<IIngredient>

ZenScript
Copy
// ToolIngredient.onlyDamaged() as MCIngredientConditioned<IIngredient>

myToolIngredient.onlyDamaged();

Name: onlyIf

Return Type: MCIngredientConditioned<IIngredient>

ZenScript
Copy
ToolIngredient.onlyIf(arg0 as string, arg1 as Predicate<IItemStack>) as MCIngredientConditioned<IIngredient>
ParametroTipoDescrizioneOptionalDefaultValue
Parametro
arg0
Tipo
string
Descrizione
No Description Provided
Optional
no
DefaultValue
Parametro
arg1
Tipo
Predicate<IItemStack>
Descrizione
No Description Provided
Optional
DefaultValue

Link to removeGlobalAttribute

Name: removeGlobalAttribute

Return Type: void

ZenScript
Copy
ToolIngredient.removeGlobalAttribute(attribute as Attribute, slotTypes as MCEquipmentSlotType[]) as void
ParametroTipoDescrizione
Parametro
attribute
Tipo
Attribute
Descrizione
No Description Provided
Parametro
slotTypes
Tipo
MCEquipmentSlotType[]
Descrizione
No Description Provided

Link to removeGlobalAttributeModifier

Name: removeGlobalAttributeModifier

Return Type: void

ZenScript
Copy
ToolIngredient.removeGlobalAttributeModifier(uuid as string, slotTypes as MCEquipmentSlotType[]) as void
ParametroTipoDescrizione
Parametro
uuid
Tipo
string
Descrizione
No Description Provided
Parametro
slotTypes
Tipo
MCEquipmentSlotType[]
Descrizione
No Description Provided

Name: removeTooltip

Return Type: void

ZenScript
Copy
ToolIngredient.removeTooltip(regex as string) as void
ParametroTipoDescrizione
Parametro
regex
Tipo
string
Descrizione
No Description Provided

Name: CONTAINS

ZenScript
Copy
ingredient as IIngredient in myToolIngredient

Name: OR

ZenScript
Copy
myToolIngredient | other as IIngredient
NomeTipoHa GetterHa SetterDescrizione
Nome
burnTime
Tipo
void
Ha Getter
no
Ha Setter
Descrizione
No Description Provided