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

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

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

Link to импорт-класса

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

Link to implemented-interfaces

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");
ПараметрТипОписание
Параметр
type
Тип
string
Описание
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>);
ПараметрТипОписание
Параметр
type
Тип
ToolType
Описание
The tool type
Тип результатаЯвляется неявным
Тип результата
IData
Является неявным
true
Тип результата
MapData
Является неявным
true

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
ПараметрТипОписание
Параметр
attribute
Тип
Attribute
Описание
No Description Provided
Параметр
name
Тип
string
Описание
No Description Provided
Параметр
value
Тип
double
Описание
No Description Provided
Параметр
operation
Тип
AttributeOperation
Описание
No Description Provided
Параметр
slotTypes
Тип
MCEquipmentSlotType[]
Описание
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
ПараметрТипОписание
Параметр
attribute
Тип
Attribute
Описание
No Description Provided
Параметр
uuid
Тип
string
Описание
No Description Provided
Параметр
name
Тип
string
Описание
No Description Provided
Параметр
value
Тип
double
Описание
No Description Provided
Параметр
operation
Тип
AttributeOperation
Описание
No Description Provided
Параметр
slotTypes
Тип
MCEquipmentSlotType[]
Описание
No Description Provided

Name: addShiftTooltip

Return Type: void

ZenScript
Copy
ToolIngredient.addShiftTooltip(arg0 as MCTextComponent, arg1 as MCTextComponent) as void
ПараметрТипОписаниеOptionalDefaultValue
Параметр
arg0
Тип
Компонент MCTextcomponent
Описание
No Description Provided
Optional
false
DefaultValue
Параметр
arg1
Тип
Компонент MCTextcomponent
Описание
No Description Provided
Optional
true
DefaultValue

Name: addTooltip

Return Type: void

ZenScript
Copy
ToolIngredient.addTooltip(content as MCTextComponent) as void
ПараметрТипОписание
Параметр
контент
Тип
Компонент MCTextcomponent
Описание
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
ПараметрТипОписание
Параметр
ingredient
Тип
IIngredient
Описание
No Description Provided

Link to getRemainingItem

Name: getRemainingItem

Return Type: IItemStack

ZenScript
Copy
ToolIngredient.getRemainingItem(stack as IItemStack) as IItemStack
ПараметрТипОписание
Параметр
stack
Тип
IItemStack
Описание
No Description Provided

Name: matches

Return Type: boolean

ZenScript
Copy
ToolIngredient.matches(stack as IItemStack) as boolean
ПараметрТипОписание
Параметр
stack
Тип
IItemStack
Описание
No Description Provided

Link to modifyShiftTooltip

Name: modifyShiftTooltip

Return Type: void

ZenScript
Copy
ToolIngredient.modifyShiftTooltip(arg0 as ITooltipFunction, arg1 as ITooltipFunction) as void
ПараметрТипОписаниеOptionalDefaultValue
Параметр
arg0
Тип
ITooltipFunction
Описание
No Description Provided
Optional
false
DefaultValue
Параметр
arg1
Тип
ITooltipFunction
Описание
No Description Provided
Optional
true
DefaultValue

Name: modifyTooltip

Return Type: void

ZenScript
Copy
ToolIngredient.modifyTooltip(function as ITooltipFunction) as void
ПараметрТипОписание
Параметр
function
Тип
ITooltipFunction
Описание
No Description Provided

Name: only

Return Type: MCIngredientConditioned<IIngredient>

ZenScript
Copy
ToolIngredient.only(condition as IIngredientCondition<IIngredient>) as MCIngredientConditioned<IIngredient>
ПараметрТипОписание
Параметр
condition
Тип
IIngredientCondition<IIngredient>
Описание
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>
ПараметрТипОписаниеOptionalDefaultValue
Параметр
arg0
Тип
string
Описание
No Description Provided
Optional
false
DefaultValue
Параметр
arg1
Тип
Predicate<IItemStack>
Описание
No Description Provided
Optional
true
DefaultValue

Link to removeGlobalAttribute

Name: removeGlobalAttribute

Return Type: void

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

Link to removeGlobalAttributeModifier

Name: removeGlobalAttributeModifier

Return Type: void

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

Name: removeTooltip

Return Type: void

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

Операторы

Link to операторы

Name: CONTAINS

ZenScript
Copy
ingredient as IIngredient in myToolIngredient

Name: OR

ZenScript
Copy
myToolIngredient | other as IIngredient

Свойства

Link to свойства

НазваниеТипИмеет GetterИмеет SetterОписание
Название
burnTime
Тип
void
Имеет Getter
false
Имеет Setter
true
Описание
No Description Provided