Skip to content

Chunk Location API

A chunk location, represented as (x, z) chunk coordinates. It’s an immutable record of chunk-space (x, z) coordinates, with helpers for converting to and from block coordinates and Bukkit chunks.

  • offset(int, int): Returns a new ChunkLocation shifted by the given x/z offsets.
  • offset(ChunkLocation): Returns a new ChunkLocation shifted by another location’s coordinates.
  • negate(): Returns a new ChunkLocation with both coordinates negated.

These resolve against a live World and return a CompletableFuture, since the chunk may need to load asynchronously.