Home Commands Examples Getting Started With Scripts Global Keywords
Generic JSON Recipes

CustomTool

Importing the class

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.

script.zs
import contenttweaker.builder.vanilla.item.CustomTool;

Extending ToolBuilder<CustomTool>

CustomTool extends ToolBuilder<CustomTool>. That means all methods available in ToolBuilder<CustomTool> are also available in CustomTool

Methods

Return Type: T

script.zs
CustomTool.attackSpeed(attackSpeed as float) as T
ParameterType
Parameter
attackSpeed
Type
float

Return Type: T

script.zs
CustomTool.baseAttackDamage(attackDamageBase as float) as T
ParameterType
Parameter
attackDamageBase
Type
float

Return Type: ItemReference

script.zs
CustomTool.build(name as string) as ItemReference
ParameterType
Parameter
name
Type
string

Return Type: T

script.zs
CustomTool.canAlwaysEat(canEat as boolean) as T
ParameterType
Parameter
canEat
Type
boolean

Return Type: T

script.zs
CustomTool.cloning(properties as ItemProperties) as T
ParameterType
Parameter
properties
Type
ItemProperties

Return Type: T

script.zs
CustomTool.cloning(standard as StandardItemProperties?, food as FoodItemProperties?) as T
ParameterType
Parameter
standard
Type
StandardItemProperties?
Parameter
food
Type
FoodItemProperties?

Return Type: T

script.zs
CustomTool.craftRemainder(remainder as ItemReference) as T
ParameterType
Parameter
remainder
Type
ItemReference

Return Type: T

script.zs
CustomTool.durability(damage as int) as T
ParameterType
Parameter
damage
Type
int

Return Type: T

script.zs
CustomTool.fastFood(fast as boolean) as T
ParameterType
Parameter
fast
Type
boolean

Return Type: T

script.zs
CustomTool.fireResistant(fireResistance as boolean) as T
ParameterType
Parameter
fireResistance
Type
boolean

Return Type: T

script.zs
CustomTool.meat(meat as boolean) as T
ParameterType
Parameter
meat
Type
boolean

Return Type: T

script.zs
CustomTool.nutrition(nutrition as int) as T
ParameterType
Parameter
nutrition
Type
int

Return Type: T

script.zs
CustomTool.rarity(rarity as Rarity) as T
ParameterType
Parameter
rarity
Type
Rarity

Return Type: T

script.zs
CustomTool.saturationMod(modifier as float) as T
ParameterType
Parameter
modifier
Type
float

Return Type: T

script.zs
CustomTool.stacksTo(size as int) as T
ParameterType
Parameter
size
Type
int

Return Type: T

script.zs
CustomTool.tab(tab as CreativeTabReference) as T
ParameterType
Parameter
tab
Type
CreativeTabReference

Return Type: CustomTool

script.zs
CustomTool.tag(tag as ResourceLocation) as CustomTool
ParameterType
Parameter
tag
Type
ResourceLocation

Return Type: T

script.zs
CustomTool.tier(tier as TierReference) as T
ParameterType
Parameter
tier
Type
TierReference