A Material is what an item is made of, for example Platinum.

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

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 mods.contenttweaker.Material;

Retrieving such an object

Link to retrieving-such-an-object

You can either retrieve an existing Material using the MaterialSystem or create an entirely new one using the Material Builder

You can retrieve the following information from a Material:

ZenMethodВозвращаемый типОписание
ZenMethod
getName()
Возвращаемый тип
string
Описание
Returns the Material's name
ZenMethod
getColor()
Возвращаемый тип
int
Описание
Returns the Material's color
ZenMethod
isHasEffect()
Возвращаемый тип
boolean
Описание
Returns if the material has the glowing effect
ZenMethod
getUnlocalizedName()
Возвращаемый тип
string
Описание
Returns the Material's unlocalized name

You can either register parts using the part object or it's name string.
You can also either register a single part or multiple at once.
So you got 4 options in total:

ZenScript
Copy
registerParts(String[] partNames);
registerParts(IPart[] parts);


registerPart(String partName);
registerPart(IPart part);

The registerPart Methods return a single MaterialPart object.
The registerParts Methods return a MaterialPart list.