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
. So you need to have this mod installed if you want to use this feature.
Diese Klasse importieren
Link to diese-klasse-importieren
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;
Implemented Interfaces
Link to implemented-interfaces
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");
Parameter | Type | Beschreibung |
---|---|---|
Parameter type | Type string | Beschreibung 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>);
Parameter | Type | Beschreibung |
---|---|---|
Parameter type | Type ToolType | Beschreibung The tool type |
Casters
Link to casters
Result type | Is Implicit |
---|---|
Result type IData | Is Implicit true |
Result type MapData | Is Implicit true |
Methoden
Link to methoden
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
Parameter | Type | Beschreibung |
---|---|---|
Parameter attribute | Type Attribute | Beschreibung No Description Provided |
Parameter name | Type string | Beschreibung No Description Provided |
Parameter value | Type double | Beschreibung No Description Provided |
Parameter operation | Type AttributeOperation | Beschreibung No Description Provided |
Parameter slotTypes | Type MCEquipmentSlotType[] | Beschreibung 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
Parameter | Type | Beschreibung |
---|---|---|
Parameter attribute | Type Attribute | Beschreibung No Description Provided |
Parameter uuid | Type string | Beschreibung No Description Provided |
Parameter name | Type string | Beschreibung No Description Provided |
Parameter value | Type double | Beschreibung No Description Provided |
Parameter operation | Type AttributeOperation | Beschreibung No Description Provided |
Parameter slotTypes | Type MCEquipmentSlotType[] | Beschreibung No Description Provided |
Name: addShiftTooltip
Return Type: void
ZenScript CopyToolIngredient.addShiftTooltip(arg0 as MCTextComponent, arg1 as MCTextComponent) as void
Parameter | Type | Beschreibung | Optional | DefaultValue |
---|---|---|---|---|
Parameter arg0 | Type MCTextkomponente | Beschreibung No Description Provided | Optional false | DefaultValue |
Parameter arg1 | Type MCTextkomponente | Beschreibung No Description Provided | Optional true | DefaultValue |
Name: addTooltip
Return Type: void
ZenScript CopyToolIngredient.addTooltip(content as MCTextComponent) as void
Parameter | Type | Beschreibung |
---|---|---|
Parameter inhalt | Type MCTextkomponente | Beschreibung 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
Parameter | Type | Beschreibung |
---|---|---|
Parameter ingredient | Type IIngredient | Beschreibung No Description Provided |
Name: getRemainingItem
Return Type: IItemStack
ZenScript CopyToolIngredient.getRemainingItem(stack as IItemStack) as IItemStack
Parameter | Type | Beschreibung |
---|---|---|
Parameter stack | Type IItemStack | Beschreibung No Description Provided |
Name: matches
Return Type: boolean
ZenScript CopyToolIngredient.matches(stack as IItemStack) as boolean
Parameter | Type | Beschreibung |
---|---|---|
Parameter stack | Type IItemStack | Beschreibung No Description Provided |
Name: modifyShiftTooltip
Return Type: void
ZenScript CopyToolIngredient.modifyShiftTooltip(arg0 as ITooltipFunction, arg1 as ITooltipFunction) as void
Parameter | Type | Beschreibung | Optional | DefaultValue |
---|---|---|---|---|
Parameter arg0 | Type ITooltipFunction | Beschreibung No Description Provided | Optional false | DefaultValue |
Parameter arg1 | Type ITooltipFunction | Beschreibung No Description Provided | Optional true | DefaultValue |
Name: modifyTooltip
Return Type: void
ZenScript CopyToolIngredient.modifyTooltip(function as ITooltipFunction) as void
Parameter | Type | Beschreibung |
---|---|---|
Parameter function | Type ITooltipFunction | Beschreibung No Description Provided |
Name: only
Return Type: MCIngredientConditioned<IIngredient>
ZenScript CopyToolIngredient.only(condition as IIngredientCondition<IIngredient>) as MCIngredientConditioned<IIngredient>
Parameter | Type | Beschreibung |
---|---|---|
Parameter condition | Type IIngredientCondition<IIngredient> | Beschreibung 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>
Parameter | Type | Beschreibung | Optional | DefaultValue |
---|---|---|---|---|
Parameter arg0 | Type string | Beschreibung No Description Provided | Optional false | DefaultValue |
Parameter arg1 | Type Predicate<IItemStack> | Beschreibung No Description Provided | Optional true | DefaultValue |
Name: removeGlobalAttribute
Return Type: void
ZenScript CopyToolIngredient.removeGlobalAttribute(attribute as Attribute, slotTypes as MCEquipmentSlotType[]) as void
Parameter | Type | Beschreibung |
---|---|---|
Parameter attribute | Type Attribute | Beschreibung No Description Provided |
Parameter slotTypes | Type MCEquipmentSlotType[] | Beschreibung No Description Provided |
Name: removeGlobalAttributeModifier
Return Type: void
ZenScript CopyToolIngredient.removeGlobalAttributeModifier(uuid as string, slotTypes as MCEquipmentSlotType[]) as void
Parameter | Type | Beschreibung |
---|---|---|
Parameter uuid | Type string | Beschreibung No Description Provided |
Parameter slotTypes | Type MCEquipmentSlotType[] | Beschreibung No Description Provided |
Name: removeTooltip
Return Type: void
ZenScript CopyToolIngredient.removeTooltip(regex as string) as void
Parameter | Type | Beschreibung |
---|---|---|
Parameter regex | Type string | Beschreibung No Description Provided |
Operatoren
Link to operatoren
Name: CONTAINS
ZenScript Copyingredient as IIngredient in myToolIngredient
Name: OR
ZenScript CopymyToolIngredient | other as IIngredient
Properties
Link to properties
Name | Type | Has Getter | Has Setter | Beschreibung |
---|---|---|---|---|
Name burnTime | Type void | Has Getter false | Has Setter true | Beschreibung No Description Provided |