Home Commands Examples Getting Started With Scripts Global Keywords 1.21 Migration Guide
BracketDumpers BracketHandlers BracketValidators ResourceLocationBracketHandler

TrimPattern

Importing the class

If you need to reference this type directly, like when casting an Array, or as a parameter, you will need to import it. Simply add the import at the top of the file.

script.zs
import crafttweaker.api.item.armortrim.TrimPattern;

Members

Getter
Gets the asset ID of the trim pattern.
script.zs
// TrimPattern.assetId as ResourceLocation
myTrimPattern.assetId

Return Type: ResourceLocation

Getter
Gets the command string of the trim pattern.
script.zs
// TrimPattern.commandString as string
myTrimPattern.commandString

Return Type: string

copyWithStyle(material as TrimMaterial) as Component
Copies the trim pattern's description with a given material's style.

Returns: The new trim pattern.

script.zs
// TrimPattern.copyWithStyle(material as TrimMaterial) as Component;
myTrimPattern.copyWithStyle(myTrimMaterial);

Parameters:

material Type: TrimMaterial - The material.

Return Type: Component

Getter
Gets whether the trim pattern is a decal.
script.zs
// TrimPattern.decal as bool
myTrimPattern.decal

Return Type: bool

Getter
Gets the description of the trim pattern.
script.zs
// TrimPattern.description as Component
myTrimPattern.description

Return Type: Component

Getter
Gets the registry name of the trim pattern.
script.zs
// TrimPattern.registryName as ResourceLocation
myTrimPattern.registryName

Return Type: ResourceLocation

Getter
Gets the template item of the trim pattern.
script.zs
// TrimPattern.templateItem as ItemDefinition
myTrimPattern.templateItem

Return Type: ItemDefinition