ToolIngredient
Link to toolingredient
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 Copyimport 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
Static Methods
Link to static-methods
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");
Parametro | Tipo | Descrizione |
---|---|---|
Parametro type | Tipo string | Descrizione The name of the type |
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>);
Parametro | Tipo | Descrizione |
---|---|---|
Parametro type | Tipo ToolType | Descrizione Il tipo di strumento |
Caster
Link to caster
Tipo Risultato | Implicito |
---|---|
Tipo Risultato IData | Implicito sì |
Tipo Risultato MapData | Implicito sì |
Metodi
Link to metodi
Name: addGlobalAttributeModifier
Return Type: void
ZenScript CopyToolIngredient.addGlobalAttributeModifier(attribute as Attribute, name as string, value as double, operation as AttributeOperation, slotTypes as MCEquipmentSlotType[]) as void
Parametro | Tipo | Descrizione |
---|---|---|
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 |
Name: addGlobalAttributeModifier
Return Type: void
ZenScript CopyToolIngredient.addGlobalAttributeModifier(attribute as Attribute, uuid as string, name as string, value as double, operation as AttributeOperation, slotTypes as MCEquipmentSlotType[]) as void
Parametro | Tipo | Descrizione |
---|---|---|
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 CopyToolIngredient.addShiftTooltip(arg0 as MCTextComponent, arg1 as MCTextComponent) as void
Parametro | Tipo | Descrizione | Optional | DefaultValue |
---|---|---|---|---|
Parametro arg0 | Tipo MCTextComponent | Descrizione No Description Provided | Optional no | DefaultValue |
Parametro arg1 | Tipo MCTextComponent | Descrizione No Description Provided | Optional sì | DefaultValue |
Name: addTooltip
Return Type: void
ZenScript CopyToolIngredient.addTooltip(content as MCTextComponent) as void
Parametro | Tipo | Descrizione |
---|---|---|
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 CopyToolIngredient.contains(ingredient as IIngredient) as boolean
Parametro | Tipo | Descrizione |
---|---|---|
Parametro ingredient | Tipo IIngredient | Descrizione No Description Provided |
Name: getRemainingItem
Return Type: IItemStack
ZenScript CopyToolIngredient.getRemainingItem(stack as IItemStack) as IItemStack
Parametro | Tipo | Descrizione |
---|---|---|
Parametro stack | Tipo IItemStack | Descrizione No Description Provided |
Name: matches
Return Type: boolean
ZenScript CopyToolIngredient.matches(stack as IItemStack) as boolean
Parametro | Tipo | Descrizione |
---|---|---|
Parametro stack | Tipo IItemStack | Descrizione No Description Provided |
Name: modifyShiftTooltip
Return Type: void
ZenScript CopyToolIngredient.modifyShiftTooltip(arg0 as ITooltipFunction, arg1 as ITooltipFunction) as void
Parametro | Tipo | Descrizione | Optional | DefaultValue |
---|---|---|---|---|
Parametro arg0 | Tipo ITooltipFunction | Descrizione No Description Provided | Optional no | DefaultValue |
Parametro arg1 | Tipo ITooltipFunction | Descrizione No Description Provided | Optional sì | DefaultValue |
Name: modifyTooltip
Return Type: void
ZenScript CopyToolIngredient.modifyTooltip(function as ITooltipFunction) as void
Parametro | Tipo | Descrizione |
---|---|---|
Parametro function | Tipo ITooltipFunction | Descrizione No Description Provided |
Name: only
Return Type: MCIngredientConditioned<IIngredient>
ZenScript CopyToolIngredient.only(condition as IIngredientCondition<IIngredient>) as MCIngredientConditioned<IIngredient>
Parametro | Tipo | Descrizione |
---|---|---|
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 CopyToolIngredient.onlyIf(arg0 as string, arg1 as Predicate<IItemStack>) as MCIngredientConditioned<IIngredient>
Parametro | Tipo | Descrizione | Optional | DefaultValue |
---|---|---|---|---|
Parametro arg0 | Tipo string | Descrizione No Description Provided | Optional no | DefaultValue |
Parametro arg1 | Tipo Predicate<IItemStack> | Descrizione No Description Provided | Optional sì | DefaultValue |
Name: removeGlobalAttribute
Return Type: void
ZenScript CopyToolIngredient.removeGlobalAttribute(attribute as Attribute, slotTypes as MCEquipmentSlotType[]) as void
Parametro | Tipo | Descrizione |
---|---|---|
Parametro attribute | Tipo Attribute | Descrizione No Description Provided |
Parametro slotTypes | Tipo MCEquipmentSlotType[] | Descrizione No Description Provided |
Name: removeGlobalAttributeModifier
Return Type: void
ZenScript CopyToolIngredient.removeGlobalAttributeModifier(uuid as string, slotTypes as MCEquipmentSlotType[]) as void
Parametro | Tipo | Descrizione |
---|---|---|
Parametro uuid | Tipo string | Descrizione No Description Provided |
Parametro slotTypes | Tipo MCEquipmentSlotType[] | Descrizione No Description Provided |
Name: removeTooltip
Return Type: void
ZenScript CopyToolIngredient.removeTooltip(regex as string) as void
Parametro | Tipo | Descrizione |
---|---|---|
Parametro regex | Tipo string | Descrizione No Description Provided |
Operators
Link to operators
Name: CONTAINS
ZenScript Copyingredient as IIngredient in myToolIngredient
Name: OR
ZenScript CopymyToolIngredient | other as IIngredient
Proprietà
Link to proprietà
Nome | Tipo | Ha Getter | Ha Setter | Descrizione |
---|---|---|---|---|
Nome burnTime | Tipo void | Ha Getter no | Ha Setter sì | Descrizione No Description Provided |