Home Migration Guide Getting Started With Scripts Commands Examples
BracketHandlers

IItemTier

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 crafttweaker.api.item.tiered.IItemTier;

Methods

Gets this tier’s attack damage.

Returns: This tier’s attack damage.
Return Type: float

script.zs
// IItemTier.getAttackDamage() as float
myIItemTier.getAttackDamage();

Gets this tier’s efficiency.

Returns: This tier’s efficiency.
Return Type: float

script.zs
// IItemTier.getEfficiency() as float
myIItemTier.getEfficiency();

Gets this tier’s enchantability.

Returns: This tier’s enchantability.
Return Type: int

script.zs
// IItemTier.getEnchantability() as int
myIItemTier.getEnchantability();

Gets this tier’s harvest level.

Returns: This tier’s harvest level.
Return Type: int

script.zs
// IItemTier.getHarvestLevel() as int
myIItemTier.getHarvestLevel();

Gets this tier’s max uses.

Returns: This tier’s max uses.
Return Type: int

script.zs
// IItemTier.getMaxUses() as int
myIItemTier.getMaxUses();

Gets this tier’s repair material.

Returns: This tier’s repair material.
Return Type: Ingredient

script.zs
// IItemTier.getRepairMaterial() as Ingredient
myIItemTier.getRepairMaterial();

Properties

NameTypeHas GetterHas SetterDescription
Name
attackDamage
Type
float
Has Getter
true
Has Setter
false
Description
Gets this tier’s attack damage.
Name
efficiency
Type
float
Has Getter
true
Has Setter
false
Description
Gets this tier’s efficiency.
Name
enchantability
Type
int
Has Getter
true
Has Setter
false
Description
Gets this tier’s enchantability.
Name
harvestLevel
Type
int
Has Getter
true
Has Setter
false
Description
Gets this tier’s harvest level.
Name
maxUses
Type
int
Has Getter
true
Has Setter
false
Description
Gets this tier’s max uses.
Name
repairMaterial
Type
Ingredient
Has Getter
true
Has Setter
false
Description
Gets this tier’s repair material.