@Environment(value=CLIENT) final class ClientChunkManager.ClientChunkMap extends Object
Modifier and Type | Field and Description |
---|---|
private int |
centerChunkX |
private int |
centerChunkZ |
private AtomicReferenceArray<WorldChunk> |
chunks |
private int |
diameter |
private int |
loadedChunkCount |
private int |
radius |
Modifier | Constructor and Description |
---|---|
private |
ClientChunkMap(int loadDistance) |
Modifier and Type | Method and Description |
---|---|
protected WorldChunk |
compareAndSet(int index,
WorldChunk expect,
WorldChunk update) |
protected WorldChunk |
getChunk(int index) |
private int |
getIndex(int chunkX,
int chunkZ) |
private boolean |
isInRadius(int chunkX,
int chunkZ) |
protected void |
set(int index,
WorldChunk chunk) |
private final AtomicReferenceArray<WorldChunk> chunks
private final int radius
private final int diameter
private volatile int centerChunkX
private volatile int centerChunkZ
private int loadedChunkCount
private int getIndex(int chunkX, int chunkZ)
protected void set(int index, @Nullable WorldChunk chunk)
protected WorldChunk compareAndSet(int index, WorldChunk expect, @Nullable WorldChunk update)
private boolean isInRadius(int chunkX, int chunkZ)
@Nullable protected WorldChunk getChunk(int index)