Skip to content

ChunkUnload ​

com.jsmacrosce.jsmacros.client.api.event.impl.world.EventChunkUnload

Since1.2.7Not cancellable

Fires after the client processes a server packet to forget a chunk.

js
JsMacros.on("ChunkUnload", JavaWrapper.methodToJava(function (event) {
  Chat.log(`Chunk ${event.x}, ${event.z} unloaded`);  
}))

Constructors ​

new EventChunkUnload ​

new EventChunkUnload(int x, int z)#
Stores the coordinates for this event; constructing it does not unload a chunk or modify the world.

Parameters:

  • x: x chunk coordinate
  • z: z chunk coordinate

Fields ​

x ​

x: intread-only#
The chunk's x coordinate, in chunk coordinates.

z ​

z: intread-only#
The chunk's z coordinate, in chunk coordinates.

Methods ​

toString ​

toString(): String#
Returns a diagnostic string containing the event name and stored coordinates in the form %s:{"x": %d, "z": %d}.
Returns: the diagnostic string with the event name and decimal x and z values