public interface ChunkProvider
extends java.lang.AutoCloseable
This API's coordinate system is the Minecraft coordinate system (W <- x -> E, N <- z -> S).
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the chunk provider, flushing any changes and closing any system
resources.
|
Chunk |
getChunk(int x,
int z)
Retrieve a chunk.
|
Chunk |
getChunkForEditing(int x,
int z)
Retrieve a chunk for editing.
|
boolean |
isChunkPresent(int x,
int z)
Determine whether a chunk is present.
|
boolean isChunkPresent(int x, int z)
x
- The X coordinate to check.z
- The Z coordinate to check.true
if the chunk provider contains a chunk at the
specified coordinates.Chunk getChunk(int x, int z)
null
is
returned. The returned chunk may be read-only.x
- The X coordinate of the chunk to retrieve.z
- The Z coordinate of the chunk to retrieve.null
if there is no chunk at
the specified coordinates.Chunk getChunkForEditing(int x, int z)
null
may be returned, or the provider may
create a new, empty chunk. The returned chunk is guaranteed not to be
read-only.x
- The X coordinate of the chunk to retrieve.z
- The Z coordinate of the chunk to retrieve.null
if there is no chunk at
the specified coordinates, and this chunk provider does not create new
chunks.void close()
close
in interface java.lang.AutoCloseable