ChunkLoadEvent
Namespace Mc.Scripting.Events · Kind struct (ref)
public ref struct ChunkLoadEvent : IEventA chunk became loaded.
| Id | 50 |
| Key | mc:chunk_load |
| Cancellable | no |
| Fired by the engine | yes |
| Field | Type | Handlers may write | Description |
|---|---|---|---|
Dimension |
int |
no (readonly) | Dimension index. |
X |
int |
no (readonly) | Chunk x. |
Z |
int |
no (readonly) | Chunk z. |
NewlyGenerated |
bool |
no (readonly) | True when the chunk was generated, false when loaded from disk. |
Constructors
Section titled “Constructors”| Member | Description |
|---|---|
ChunkLoadEvent(int dimension, int x, int z, bool newlyGenerated) |
Creates the event (for firing it from a plugin; native code builds its own). |
Constructor
Section titled “Constructor”public ChunkLoadEvent(int dimension, int x, int z, bool newlyGenerated)Creates the event (for firing it from a plugin; native code builds its own). Signature of API 1.0.
Parameters
| Name | Type | Description |
|---|---|---|
dimension |
int |
|
x |
int |
|
z |
int |
|
newlyGenerated |
bool |
Properties
Section titled “Properties”| Member | Description |
|---|---|
int Dimension { get; } |
Dimension index. |
bool NewlyGenerated { get; } |
True when the chunk was generated, false when loaded from disk. |
int X { get; } |
Chunk x. |
int Z { get; } |
Chunk z. |
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. |
Dimension
Section titled “Dimension”public int Dimension { get; }Dimension index.
NewlyGenerated
Section titled “NewlyGenerated”public bool NewlyGenerated { get; }True when the chunk was generated, false when loaded from disk.
public int X { get; }Chunk x.
public int Z { get; }Chunk z.
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.