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.

Importing the class

Link to importing-the-class

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

NombreZenGetterZenSetterType
Nombre
color
ZenGetter
ZenSetter
Type
int
Nombre
current
ZenGetter
ZenSetter
Type
int
Nombre
extraInfo
ZenGetter
ZenSetter
Type
string
Nombre
identifier
ZenGetter
ZenSetter
Type
string
Nombre
level
ZenGetter
ZenSetter
Type
int
Nombre
max
ZenGetter
ZenSetter
Type
int
Nombre
info
ZenGetter
ZenSetter
Type
string
Nombre
colorString
ZenGetter
ZenSetter
Type
string
ZenScript
Copy
//Does the same as myTraitData.info;
myTraitData.calcInfo();

//Does the same as myTraitData.colorString;
myTraitData.getColorString();