Skip to content

@minecraft/server


@minecraft/server / BlockPrecipitationInteractionsComponent

Class: BlockPrecipitationInteractionsComponent ​

Defined in: @minecraft/server/index.d.ts:5343

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

Extends ​

Properties ​

block ​

readonly block: Block

Defined in: @minecraft/server/index.d.ts:4377

Remarks ​

Block instance that this component pertains to.

Inherited from ​

BlockComponent.block


isValid ​

readonly isValid: boolean

Defined in: @minecraft/server/index.d.ts:6234

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

Defined in: @minecraft/server/index.d.ts:6240

Remarks ​

Identifier of the component.

Inherited from ​

BlockComponent.typeId


componentId ​

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

Defined in: @minecraft/server/index.d.ts:5345

Methods ​

accumulatesSnow() ​

accumulatesSnow(): boolean

Defined in: @minecraft/server/index.d.ts:5358

Returns ​

boolean

Remarks ​

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

Defined in: @minecraft/server/index.d.ts:5371

Returns ​

boolean

Remarks ​

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

Defined in: @minecraft/server/index.d.ts:5383

Returns ​

boolean

Remarks ​

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