@Environment(value=CLIENT) public class BiomeColorCache extends Object
Modifier and Type | Class and Description |
---|---|
(package private) static class |
BiomeColorCache.Last |
Modifier and Type | Field and Description |
---|---|
private it.unimi.dsi.fastutil.longs.Long2ObjectLinkedOpenHashMap<int[]> |
colors |
private ThreadLocal<BiomeColorCache.Last> |
last |
private ReentrantReadWriteLock |
lock |
Constructor and Description |
---|
BiomeColorCache() |
Modifier and Type | Method and Description |
---|---|
int |
getBiomeColor(BlockPos pos,
IntSupplier colorFactory) |
private int[] |
getColorArray(int chunkX,
int chunkZ) |
void |
reset() |
void |
reset(int chunkX,
int chunkZ) |
private final ThreadLocal<BiomeColorCache.Last> last
private final it.unimi.dsi.fastutil.longs.Long2ObjectLinkedOpenHashMap<int[]> colors
private final ReentrantReadWriteLock lock
public int getBiomeColor(BlockPos pos, IntSupplier colorFactory)
public void reset(int chunkX, int chunkZ)
public void reset()
private int[] getColorArray(int chunkX, int chunkZ)