BlockWaterContainerComponent Class

Caution

This class is still in pre-release. Its signature may change or it may be removed in future releases.

Extends

Represents a fluid container block that currently contains water.

Methods

addDye

addDye(itemType: ItemType): void

Adds an item and colors the water based on a dye item type.

Parameters

Important

This function can't be called in read-only mode.

Warning

This function can throw errors.

getCustomColor

getCustomColor(): RGBA

Retrieves a custom base color used for the sign text.

Returns RGBA - Color that is used as the base color for sign text.

Warning

This function can throw errors.

setCustomColor

setCustomColor(color: RGBA): void

Sets a custom base color used for the sign text.

Parameters

Important

This function can't be called in read-only mode.

Warning

This function can throw errors.

Constants

componentId

static read-only componentId = "minecraft:waterContainer";

Type: string