Trait Data Representation
Link to trait-data-representation
A Trait data representation represents a Tinkers' Construct Trait's Data and is ItemBound.
You can get such an object from an existing Trait object by supplying an IItemStack to the getData
method.
Импорт класса
Link to импорт-класса
It might be required for you to import the class if you encounter any issues (like casting an Array), so better be safe than sorry and add the import.
import mods.contenttweaker.tconstruct.TraitDataRepresentation
ZenGetter and ZenSetter
Link to zengetter-and-zensetter
Название | ZenGetter | ZenSetter | Тип |
---|---|---|---|
Название color | ZenGetter ✔ | ZenSetter ✔ | Тип int |
Название current | ZenGetter ✔ | ZenSetter ✔ | Тип int |
Название extraInfo | ZenGetter ✔ | ZenSetter ✔ | Тип string |
Название identifier | ZenGetter ✔ | ZenSetter ✔ | Тип string |
Название level | ZenGetter ✔ | ZenSetter ✔ | Тип int |
Название max | ZenGetter ✔ | ZenSetter ✔ | Тип int |
Название info | ZenGetter ✔ | ZenSetter | Тип string |
Название colorString | ZenGetter ✔ | ZenSetter | Тип string |
ZenMethods
Link to zenmethods
ZenScript Copy//Does the same as myTraitData.info;
myTraitData.calcInfo();
//Does the same as myTraitData.colorString;
myTraitData.getColorString();