public final class CachingBiomeMap extends Object implements BiomeMap
BiomeMap which caches the biomes looked up at a given position.| Constructor and Description |
|---|
CachingBiomeMap(BiomeMap delegate) |
CachingBiomeMap(@NonNull BiomeMap delegate,
int maxCacheSize) |
| Modifier and Type | Method and Description |
|---|---|
GenerationBiome |
get(int x,
int z)
Gets the
GenerationBiome at the given world coordinates. |
Identifier |
getId() |
GenerationBiome[] |
getRegion(GenerationBiome[] arr,
int x,
int z,
int sizeX,
int sizeZ)
Gets the
GenerationBiomes in the given world region. |
Identifier[] |
getRegionIds(Identifier[] arr,
int x,
int z,
int sizeX,
int sizeZ)
Gets the
Identifiers of the biomes in the given world region. |
boolean |
needsCaching() |
Set<GenerationBiome> |
possibleBiomes() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitinitpublic CachingBiomeMap(BiomeMap delegate)
public CachingBiomeMap(@NonNull
@NonNull BiomeMap delegate,
int maxCacheSize)
public GenerationBiome get(int x, int z)
BiomeMapGenerationBiome at the given world coordinates.get in interface BiomeMapx - the X coordinatez - the Z coordinateGenerationBiome at the given coordinatespublic GenerationBiome[] getRegion(GenerationBiome[] arr, int x, int z, int sizeX, int sizeZ)
BiomeMapGenerationBiomes in the given world region.getRegion in interface BiomeMaparr - the GenerationBiome[] to fill. A new array will be created if this array is null or too smallx - the region's base X coordinatez - the region's base Z coordinatesizeX - the size of the region along the X axissizeZ - the size of the region along the Z axis
Gets the GenerationBiomes in the given world region.public Identifier[] getRegionIds(Identifier[] arr, int x, int z, int sizeX, int sizeZ)
BiomeMapIdentifiers of the biomes in the given world region.getRegionIds in interface BiomeMaparr - the Identifier[] to fill. A new array will be created if this array is null or too smallx - the region's base X coordinatez - the region's base Z coordinatesizeX - the size of the region along the X axissizeZ - the size of the region along the Z axis
Gets the Identifiers in the given world region.public boolean needsCaching()
needsCaching in interface BiomeMapBiomeMap's results should be cached for performancepublic Set<GenerationBiome> possibleBiomes()
possibleBiomes in interface BiomeMapSet containing all of the biomes that could be returned by this BiomeMappublic Identifier getId()
getId in interface BiomeMapgetId in interface GenerationPassCopyright © 2020. All rights reserved.