DyedItemColor

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.component.DyedItemColor;

Implements

Undocumented Interfaces

TooltipProvider

Members

static of(rgb as int, showInTooltip as bool) as DyedItemColor
Creates a new DyedItemColor with the given RGB color and whether it should show in the tooltip.

Returns: The new DyedItemColor.

script.zs
// DyedItemColor.of(rgb as int, showInTooltip as bool) as DyedItemColor;
DyedItemColor.of(myInt, myBool);

Parameters:

rgb Type: int - The RGB color of the DyedItemColor.
showInTooltip Type: bool - Whether the DyedItemColor should show in the tooltip.

Return Type: DyedItemColor

Getter
Gets the RGB color of the DyedItemColor.
script.zs
// DyedItemColor.rgb as int
myDyedItemColor.rgb

Return Type: int

Getter
Gets whether the DyedItemColor should show in the tooltip.
script.zs
// DyedItemColor.showInTooltip as bool
myDyedItemColor.showInTooltip

Return Type: bool

withTooltip(tooltip as bool) as DyedItemColor
Sets whether the DyedItemColor should show in the tooltip.

Returns: The DyedItemColor with the new tooltip setting.

script.zs
// DyedItemColor.withTooltip(tooltip as bool) as DyedItemColor;
myDyedItemColor.withTooltip(myBool);

Parameters:

tooltip Type: bool - Whether the DyedItemColor should show in the tooltip.

Return Type: DyedItemColor