public abstract class ChunkToNibbleArrayMap<M extends ChunkToNibbleArrayMap<M>> extends Object
Modifier and Type | Field and Description |
---|---|
protected it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap<ChunkNibbleArray> |
arrays |
private ChunkNibbleArray[] |
cacheArrays |
private boolean |
cacheEnabled |
private long[] |
cachePositions |
Modifier | Constructor and Description |
---|---|
protected |
ChunkToNibbleArrayMap(it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap<ChunkNibbleArray> arrays) |
Modifier and Type | Method and Description |
---|---|
void |
clearCache() |
boolean |
containsKey(long chunkPos) |
abstract M |
copy() |
void |
disableCache() |
ChunkNibbleArray |
get(long chunkPos) |
void |
put(long pos,
ChunkNibbleArray data) |
ChunkNibbleArray |
removeChunk(long chunkPos) |
void |
replaceWithCopy(long pos) |
private final long[] cachePositions
private final ChunkNibbleArray[] cacheArrays
private boolean cacheEnabled
protected final it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap<ChunkNibbleArray> arrays
protected ChunkToNibbleArrayMap(it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap<ChunkNibbleArray> arrays)
public abstract M copy()
public void replaceWithCopy(long pos)
public boolean containsKey(long chunkPos)
@Nullable public ChunkNibbleArray get(long chunkPos)
@Nullable public ChunkNibbleArray removeChunk(long chunkPos)
public void put(long pos, ChunkNibbleArray data)
public void clearCache()
public void disableCache()