For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt, and this page is available as Markdown at /server/classes/BlockPrecipitationInteractionsComponent.md.

Class: BlockPrecipitationInteractionsComponent

block component

Beta

表示方块如何与降水(例如雨或雪)交互。

Represents a how a block interacts with precipitation (such as rain or snow).

Extends

Properties

block

readonly block: Block

Beta

Remarks

此组件所属的方块。

Block instance that this component pertains to.

Inherited from

BlockComponent.block


isValid

readonly isValid: boolean

Beta

Remarks

返回该组件是否有效。如果组件的拥有者有效,并且满足组件所需的任何额外验证,则该组件被视为有效。

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.

Inherited from

BlockComponent.isValid


typeId

readonly typeId: string

Beta

Remarks

组件的标识符。

Identifier of the component.

Inherited from

BlockComponent.typeId


componentId

readonly static componentId: "minecraft:precipitation_interactions" = 'minecraft:precipitation_interactions'

Beta

Methods

accumulatesSnow()

accumulatesSnow(): boolean

Beta

Returns

boolean

Remarks

如果降雪会在方块上自然积累,则返回 true。如果雪不会在方块上积累,则返回 false

Returns true if falling snow will accumulate naturally on the block. Returns false if snow will not accumulate on the block.

Throws

This function can throw errors.

LocationInUnloadedChunkError

LocationOutOfWorldBoundariesError


isSnowLoggable()

isSnowLoggable(): boolean

Beta

Returns

boolean

Remarks

如果此方块内部可以容纳雪(如被雪淹没的花朵),则返回 true。如果此方块内部不能容纳雪,则返回 false

Returns true if this block can have snow within it, like a flower submerged in snow. Returns false if this block cannot have snow within it.

Throws

This function can throw errors.

LocationInUnloadedChunkError

LocationOutOfWorldBoundariesError


obstructsRain()

obstructsRain(): boolean

Beta

Returns

boolean

Remarks

如果雨水不会穿过方块,则返回 true。如果雨水应穿过方块,则返回 false

Returns true if rain will not go through the block. Returns false if rain should go through the block.

Throws

This function can throw errors.

LocationInUnloadedChunkError

LocationOutOfWorldBoundariesError

同领域相关