A Tinkers' Construct IMaterial (not to be confused with ContentTweaker's IMaterial) is what a Tinker's construct tool can be made of.

Импорт пакета

Link to импорт-пакета

It might be required for you to import the package if you encounter any issues, so better be safe than sorry and add the import.
import modtweaker.tconstruct.ITICMaterial;

Retrieving such an object

Link to retrieving-such-an-object

You can retrieve an ITICMaterial object using the ITICMaterial Bracket Handler:

ZenScript
Copy
val stone = <ticmat:stone>;

You can get/set the following fields:

ZenGetterZenSetterReturn/Setter TypeОписание
ZenGetter
getName
ZenSetter
Return/Setter Type
string
Описание
The material's name
ZenGetter
definition
ZenSetter
Return/Setter Type
IMaterialDefinition
Описание
The material's definition
ZenGetter
durabilityHead
ZenSetter
durabilityHead
Return/Setter Type
int
Описание
A toolhead made from this material has this durability
ZenGetter
miningSpeedHead
ZenSetter
miningSpeedHead
Return/Setter Type
float
Описание
A toolhead made from this material has this mining speed
ZenGetter
attackHead
ZenSetter
attackHead
Return/Setter Type
float
Описание
A toolhead made from this material has this attack damage
ZenGetter
harvestLevelHead
ZenSetter
harvestLevelHead
Return/Setter Type
int
Описание
A toolhead made from this material has this harvest level
ZenGetter
durabilityHandle
ZenSetter
durabilityHandle
Return/Setter Type
int
Описание
A toolhandle made from this material has this durability
ZenGetter
modifierHandle
ZenSetter
modifierHandle
Return/Setter Type
float
Описание
A toolhandle made from this material has this durability modifier
ZenGetter
durabilityExtra
ZenSetter
durabilityExtra
Return/Setter Type
int
Описание
Extra toolparts made from this material have this base durability
ZenGetter
arrowModifier
ZenSetter
arrowModifier
Return/Setter Type
float
Описание
Arrows made from this material have this durability modifier
ZenGetter
arrowBonusAmmo
ZenSetter
arrowBonusAmmo
Return/Setter Type
int
Описание
Arrows made from this material have this additional ammunition
ZenGetter
fletchingModifier
ZenSetter
fletchingModifier
Return/Setter Type
float
Описание
Fletchings made from this material have this durability modifier
ZenGetter
fletchingAccuracy
ZenSetter
fletchingAccuracy
Return/Setter Type
float
Описание
Fletchings made from this material provide this accuracy
ZenGetter
bowDrawSpeed
ZenSetter
bowDrawSpeed
Return/Setter Type
float
Описание
Bows made from this material have this draw speed
ZenGetter
bowRange
ZenSetter
bowRange
Return/Setter Type
float
Описание
Bows made from this material have this range
ZenGetter
bonusDamage
ZenSetter
bonusDamage
Return/Setter Type
float
Описание
Bows made from this material have this additional damage
ZenGetter
bowStringModifier
ZenSetter
bowStringModifier
Return/Setter Type
float
Описание
Bow strings made from this material have this durability modifier
  • boolean matches(ITICMaterial other); → returns if the given material is equal to other
  • boolean hasStats(string statName); → returns if the material has the stat named statName
  • boolean hasHeadStats(); → returns if the material has head stats
  • boolean hasHandleStats(); → returns if the material has handle stats
  • boolean hasExtraStats(); → returns if the material has extra stats
  • boolean hasArrowStats(); → returns if the material has arrow stats
  • boolean hasFletchingStats(); → returns if the material has fletching stats
  • boolean hasBowStats(); → returns if the material has bow stats
  • boolean hasBowStringStats(); → returns if the material has bow string stats