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

ArmorTrim

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.ArmorTrim;

Implements

Undocumented Interfaces

TooltipProvider

Members

hasPatternAndMaterial(pattern as TrimPattern, material as TrimMaterial) as bool
Checks if the armor trim has a pattern and material.

Returns: Whether the armor trim has a pattern and material.

script.zs
// ArmorTrim.hasPatternAndMaterial(pattern as TrimPattern, material as TrimMaterial) as bool;
myArmorTrim.hasPatternAndMaterial(myTrimPattern, myTrimMaterial);

Parameters:

pattern Type: TrimPattern - The pattern of the armor trim.
material Type: TrimMaterial - The material of the armor trim.

Return Type: bool

innerTexture(material as ArmorMaterial) as ResourceLocation
Gets the inner texture of the armor trim.

Returns: The inner texture of the armor trim.

script.zs
// ArmorTrim.innerTexture(material as ArmorMaterial) as ResourceLocation;
myArmorTrim.innerTexture(myArmorMaterial);

Parameters:

material Type: ArmorMaterial - The material of the armor trim.

Return Type: ResourceLocation

Getter
Gets the material of the armor trim.
script.zs
// ArmorTrim.material as TrimMaterial
myArmorTrim.material

Return Type: TrimMaterial

static of(material as TrimMaterial, pattern as TrimPattern, showInTooltip as bool = true) as ArmorTrim
Creates a new ArmorTrim.

Returns: The new ArmorTrim.

script.zs
// ArmorTrim.of(material as TrimMaterial, pattern as TrimPattern, showInTooltip as bool = true) as ArmorTrim;
ArmorTrim.of(myTrimMaterial, myTrimPattern, myBool);

Parameters:

material Type: TrimMaterial - The material of the armor trim.
pattern Type: TrimPattern - The pattern of the armor trim.
showInTooltip (optional) Type: bool - Whether the armor trim should show in the tooltip.

Default Value: true

Return Type: ArmorTrim

outerTexture(material as ArmorMaterial) as ResourceLocation
Gets the outer texture of the armor trim.

Returns: The outer texture of the armor trim.

script.zs
// ArmorTrim.outerTexture(material as ArmorMaterial) as ResourceLocation;
myArmorTrim.outerTexture(myArmorMaterial);

Parameters:

material Type: ArmorMaterial - The material of the armor trim.

Return Type: ResourceLocation

Getter
Gets the pattern of the armor trim.
script.zs
// ArmorTrim.pattern as TrimPattern
myArmorTrim.pattern

Return Type: TrimPattern

withTooltip(withTooltip as bool) as ArmorTrim
Sets whether the armor trim should show in the tooltip.

Returns: The new ArmorTrim.

script.zs
// ArmorTrim.withTooltip(withTooltip as bool) as ArmorTrim;
myArmorTrim.withTooltip(myBool);

Parameters:

withTooltip Type: bool - Whether the armor trim should show in the tooltip.

Return Type: ArmorTrim