ToolIngredient

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

This class was added by a mod with mod-id farmersdelight. Так что если вы хотите использовать эту функцию, вам нужно установить этот мод.

Импорт класса

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;

Implemented Interfaces

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

Static Methods

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");
ПараметрТипDescription
typestringThe name of the type
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>);
ПараметрТипDescription
typeToolTypeThe tool type

Утилиты

Тип результатаЯвляется неявным
IDatatrue
MapDatatrue

Methods

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
ПараметрТипDescription
attributeAttributeNo Description Provided
namestringNo Description Provided
valuedoubleNo Description Provided
operationAttributeOperationNo Description Provided
slotTypesMCEquipmentSlotType[]No Description Provided
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
ПараметрТипDescription
attributeAttributeNo Description Provided
uuidstringNo Description Provided
namestringNo Description Provided
valuedoubleNo Description Provided
operationAttributeOperationNo Description Provided
slotTypesMCEquipmentSlotType[]No Description Provided
addShiftTooltip

Return Type: void

ZenScript
Copy
ToolIngredient.addShiftTooltip(arg0 as MCTextComponent, arg1 as MCTextComponent) as void
ПараметрТипDescriptionOptionalDefaultValue
arg0Компонент MCTextcomponentNo Description Providedfalse
arg1Компонент MCTextcomponentNo Description Providedtrue
addTooltip

Return Type: void

ZenScript
Copy
ToolIngredient.addTooltip(content as MCTextComponent) as void
ПараметрТипDescription
контентКомпонент MCTextcomponentNo Description Provided
anyDamage

Return Type: MCIngredientConditioned<IIngredient>

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

myToolIngredient.anyDamage();
clearTooltip

Return Type: void

ZenScript
Copy
// ToolIngredient.clearTooltip() as void

myToolIngredient.clearTooltip();
contains

Return Type: boolean

ZenScript
Copy
ToolIngredient.contains(ingredient as IIngredient) as boolean
ПараметрТипDescription
ingredientIIngredientNo Description Provided
getRemainingItem

Return Type: IItemStack

ZenScript
Copy
ToolIngredient.getRemainingItem(stack as IItemStack) as IItemStack
ПараметрТипDescription
stackIItemStackNo Description Provided
matches

Return Type: boolean

ZenScript
Copy
ToolIngredient.matches(stack as IItemStack) as boolean
ПараметрТипDescription
stackIItemStackNo Description Provided
modifyShiftTooltip

Return Type: void

ZenScript
Copy
ToolIngredient.modifyShiftTooltip(arg0 as ITooltipFunction, arg1 as ITooltipFunction) as void
ПараметрТипDescriptionOptionalDefaultValue
arg0ITooltipFunctionNo Description Providedfalse
arg1ITooltipFunctionNo Description Providedtrue
modifyTooltip

Return Type: void

ZenScript
Copy
ToolIngredient.modifyTooltip(function as ITooltipFunction) as void
ПараметрТипDescription
functionITooltipFunctionNo Description Provided
only

Return Type: MCIngredientConditioned<IIngredient>

ZenScript
Copy
ToolIngredient.only(condition as IIngredientCondition<IIngredient>) as MCIngredientConditioned<IIngredient>
ПараметрТипDescription
conditionIIngredientCondition<IIngredient>No Description Provided
onlyDamaged

Return Type: MCIngredientConditioned<IIngredient>

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

myToolIngredient.onlyDamaged();
onlyIf

Return Type: MCIngredientConditioned<IIngredient>

ZenScript
Copy
ToolIngredient.onlyIf(arg0 as string, arg1 as Predicate<IItemStack>) as MCIngredientConditioned<IIngredient>
ПараметрТипDescriptionOptionalDefaultValue
arg0stringNo Description Providedfalse
arg1Predicate<IItemStack>No Description Providedtrue
removeGlobalAttribute

Return Type: void

ZenScript
Copy
ToolIngredient.removeGlobalAttribute(attribute as Attribute, slotTypes as MCEquipmentSlotType[]) as void
ПараметрТипDescription
attributeAttributeNo Description Provided
slotTypesMCEquipmentSlotType[]No Description Provided
removeGlobalAttributeModifier

Return Type: void

ZenScript
Copy
ToolIngredient.removeGlobalAttributeModifier(uuid as string, slotTypes as MCEquipmentSlotType[]) as void
ПараметрТипDescription
uuidstringNo Description Provided
slotTypesMCEquipmentSlotType[]No Description Provided
removeTooltip

Return Type: void

ZenScript
Copy
ToolIngredient.removeTooltip(regex as string) as void
ПараметрТипDescription
regexstringNo Description Provided

Операторы

CONTAINS
ZenScript
Copy
ingredient as IIngredient in myToolIngredient
OR
ZenScript
Copy
myToolIngredient | other as IIngredient

Свойства

НазваниеТипИмеет GetterИмеет SetterDescription
burnTimevoidfalsetrueNo Description Provided