类 BlockMapColorComponent实验性

表示方块在地图上显示的颜色。

Represents the color of a block when displayed on a map.

层级 (查看层级一览)

属性

block: Block

此组件所属的方块实例。

Block instance that this component pertains to.

isValid: boolean

返回组件是否有效。若组件的拥有者有效,并且组件需要的任何 额外验证也通过,则该组件被认为是有效的。

Returns whether the component is valid. A component is considered valid if its owner is valid, in addition to any addition to any additional validation required by the component.

typeId: string

组件的标识符。 Identifier of the component.

componentId: "minecraft:map_color" = 'minecraft:map_color'

方法

  • 实验性

    返回 RGBA

    表示该方块定义的基础地图颜色。

    Base map color defined for that block.

    此函数在只读模式下无法调用。

    无法在只读模式下调用此函数,详见 WorldBeforeEvents

    此函数可能会抛出错误。

    This function can throw errors.

    Error

  • 实验性

    返回 RGBA

    返回在给定位置下基础颜色与计算得出的色调的乘积。

    Returns the base color multiplied to the evaluated tint at the given position.

    此函数在只读模式下无法调用。

    无法在只读模式下调用此函数,详见 WorldBeforeEvents

  • 实验性

    返回 TintMethod

    表示应用于颜色的色调类型。

    Type of tint applied to the color.

    此函数在只读模式下无法调用。

    无法在只读模式下调用此函数,详见 WorldBeforeEvents

    此函数可能会抛出错误。

    This function can throw errors.

    Error