public class BiomeCache
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
class |
BiomeCache.Block |
Modifier and Type | Field and Description |
---|---|
private java.util.List<BiomeCache.Block> |
cache |
private LongHashMap<BiomeCache.Block> |
cacheMap |
private WorldChunkManager |
chunkManager
Reference to the WorldChunkManager
|
private long |
lastCleanupTime
The last time this BiomeCache was cleaned, in milliseconds.
|
Constructor and Description |
---|
BiomeCache(WorldChunkManager chunkManagerIn) |
Modifier and Type | Method and Description |
---|---|
void |
cleanupCache()
Removes BiomeCacheBlocks from this cache that haven't been accessed in at least 30 seconds.
|
BiomeGenBase |
func_180284_a(int x,
int z,
BiomeGenBase p_180284_3_) |
BiomeCache.Block |
getBiomeCacheBlock(int x,
int z)
Returns a biome cache block at location specified.
|
BiomeGenBase[] |
getCachedBiomes(int x,
int z)
Returns the array of cached biome types in the BiomeCacheBlock at the given location.
|
private final WorldChunkManager chunkManager
private long lastCleanupTime
private LongHashMap<BiomeCache.Block> cacheMap
private java.util.List<BiomeCache.Block> cache
public BiomeCache(WorldChunkManager chunkManagerIn)
public BiomeCache.Block getBiomeCacheBlock(int x, int z)
public BiomeGenBase func_180284_a(int x, int z, BiomeGenBase p_180284_3_)
public void cleanupCache()
public BiomeGenBase[] getCachedBiomes(int x, int z)