WeatherChangeEvent
Namespace Mc.Scripting.Events · Kind struct (ref)
public ref struct WeatherChangeEvent : IEventThe rain started or stopped (overworld weather).
| Id | 301 |
| Key | mc:weather_change |
| Cancellable | no |
| Fired by the engine | yes |
| Field | Type | Handlers may write | Description |
|---|---|---|---|
World |
world |
no (readonly) | The dimension. |
Raining |
bool |
no (readonly) | Whether it will be raining. |
Thundering |
bool |
no (readonly) | Whether it will be thundering. |
Constructors
Section titled “Constructors”| Member | Description |
|---|---|
WeatherChangeEvent(World world, bool raining, bool thundering) |
Creates the event (for firing it from a plugin; native code builds its own). |
Constructor
Section titled “Constructor”public WeatherChangeEvent(World world, bool raining, bool thundering)Creates the event (for firing it from a plugin; native code builds its own). Signature of API 1.0.
Parameters
| Name | Type | Description |
|---|---|---|
world |
World |
|
raining |
bool |
|
thundering |
bool |
Properties
Section titled “Properties”| Member | Description |
|---|---|
bool Raining { get; } |
Whether it will be raining. |
bool Thundering { get; } |
Whether it will be thundering. |
World World { get; } |
The dimension. |
static ushort CatalogueId { get; } |
Catalogue id (stable ABI). |
static bool IsCancellable { get; } |
Whether handlers can cancel the event. |
static string Key { get; } |
Registry key of the event. |
Raining
Section titled “Raining”public bool Raining { get; }Whether it will be raining.
Thundering
Section titled “Thundering”public bool Thundering { get; }Whether it will be thundering.
public World World { get; }The dimension.
CatalogueId
Section titled “CatalogueId”public static ushort CatalogueId { get; }Catalogue id (stable ABI).
IsCancellable
Section titled “IsCancellable”public static bool IsCancellable { get; }Whether handlers can cancel the event.
public static string Key { get; }Registry key of the event.