Skip to content

ChunkLoadEvent

Namespace Mc.Scripting.Events · Kind struct (ref)

public ref struct ChunkLoadEvent : IEvent

A 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.
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).
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
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.
public int Dimension { get; }

Dimension index.

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.

public static ushort CatalogueId { get; }

Catalogue id (stable ABI).

public static bool IsCancellable { get; }

Whether handlers can cancel the event.

public static string Key { get; }

Registry key of the event.

IEvent