Skip to content

@minecraft/server


@minecraft/server / WeatherChangeBeforeEvent

Class: WeatherChangeBeforeEvent ​

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

Contains information related to changes in weather in the environment.

Properties ​

cancel ​

cancel: boolean

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

Remarks ​

If set to true the weather change will be cancelled.


duration ​

duration: number

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

Remarks ​

Sets the duration of the new weather (in ticks).


newWeather ​

newWeather: WeatherType

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

Remarks ​

The type of weather that will be applied.


previousWeather ​

readonly previousWeather: WeatherType

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

Remarks ​

The type of weather that it was prior to the event being fired.