Class CachingBiomeMap
java.lang.Object
org.cloudburstmc.server.level.generator.standard.biome.map.CachingBiomeMap
- All Implemented Interfaces:
BiomeMap,GenerationPass
Implementation of
BiomeMap which caches the biomes looked up at a given position.- Author:
- DaPorkchop_
-
Constructor Summary
ConstructorsConstructorDescriptionCachingBiomeMap(@NonNull BiomeMap delegate, int maxCacheSize)CachingBiomeMap(BiomeMap delegate) -
Method Summary
Modifier and TypeMethodDescriptionget(int x, int z)Gets theGenerationBiomeat the given world coordinates.org.cloudburstmc.api.util.IdentifiergetId()getRegion(GenerationBiome[] arr, int x, int z, int sizeX, int sizeZ)Gets theGenerationBiomes in the given world region.org.cloudburstmc.api.util.Identifier[]getRegionIds(org.cloudburstmc.api.util.Identifier[] arr, int x, int z, int sizeX, int sizeZ)Gets theIdentifiers of the biomes in the given world region.booleanMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.cloudburstmc.server.level.generator.standard.misc.GenerationPass
init
-
Constructor Details
-
CachingBiomeMap
-
CachingBiomeMap
-
-
Method Details
-
get
Description copied from interface:BiomeMapGets theGenerationBiomeat the given world coordinates.- Specified by:
getin interfaceBiomeMap- Parameters:
x- the X coordinatez- the Z coordinate- Returns:
- the
GenerationBiomeat the given coordinates
-
getRegion
Description copied from interface:BiomeMapGets theGenerationBiomes in the given world region.- Specified by:
getRegionin interfaceBiomeMap- Parameters:
arr- theGenerationBiome[]to fill. A new array will be created if this array isnullor 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 theGenerationBiomes in the given world region.
-
getRegionIds
public org.cloudburstmc.api.util.Identifier[] getRegionIds(org.cloudburstmc.api.util.Identifier[] arr, int x, int z, int sizeX, int sizeZ)Description copied from interface:BiomeMapGets theIdentifiers of the biomes in the given world region.- Specified by:
getRegionIdsin interfaceBiomeMap- Parameters:
arr- theIdentifier[]to fill. A new array will be created if this array isnullor 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 theIdentifiers in the given world region.
-
needsCaching
public boolean needsCaching()- Specified by:
needsCachingin interfaceBiomeMap- Returns:
- whether or not this
BiomeMap's results should be cached for performance
-
possibleBiomes
- Specified by:
possibleBiomesin interfaceBiomeMap- Returns:
- a
Setcontaining all of the biomes that could be returned by thisBiomeMap
-
getId
public org.cloudburstmc.api.util.Identifier getId()- Specified by:
getIdin interfaceBiomeMap- Specified by:
getIdin interfaceGenerationPass- Returns:
- the identifier of this generation pass
-