# ChunkUnload

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

**Since:** 1.2.7

**Cancellable:** No. Calling `event.cancel()` throws `UnsupportedOperationException`.

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 {#com.jsmacrosce.jsmacros.client.api.event.impl.world.EventChunkUnload_constructor-int-int-}

```js
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 {#com.jsmacrosce.jsmacros.client.api.event.impl.world.EventChunkUnload_x}

```js
x: int
```

The chunk's x coordinate, in chunk coordinates.

### z {#com.jsmacrosce.jsmacros.client.api.event.impl.world.EventChunkUnload_z}

```js
z: int
```

The chunk's z coordinate, in chunk coordinates.

## Methods

### toString {#com.jsmacrosce.jsmacros.client.api.event.impl.world.EventChunkUnload_toString-}

```js
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
