PartDataPiece
A part Data piece can be added to a PartType to be able to add some MaterialPartData to MaterialParts created with Parts that are of this PartType.
Importing the package
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.PartDataPiece;
Retrieving such an object
You can get a List of a Parts DataPieces using getData()
on a Part.
Alternatively, you can register a new PartDataPiece using the MaterialSystem:
Parameters:
- String name: The new PartDataPieceās name
- boolean required: Is the PartDataPiece required to be present on a MaterialParts in order to register it?
ZenMethods
You can retrieve the following information from a PartType:
ZenMethod | Return Type |
---|---|
ZenMethod getName() | Return Type string |
ZenMethod isRequired() | Return Type string |