Class ChunkGeneratorCache
java.lang.Object
com.hypixel.hytale.server.worldgen.cache.ChunkGeneratorCache
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfacestatic interfacestatic interfacestatic interface -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ChunkGeneratorCache.BiomeCountFunctionprivate static final intprivate final ChunkGeneratorCache.HeightFunctionprivate final ChunkGeneratorCache.HeightNoiseFunctionprivate final ObjectPool<CoordinateCache.CoordinateKey> private final ChunkGeneratorCache.ZoneBiomeResultFunction -
Constructor Summary
ConstructorsConstructorDescriptionChunkGeneratorCache(ChunkGeneratorCache.ZoneBiomeResultFunction zoneBiomeResultFunction, ChunkGeneratorCache.BiomeCountFunction biomeCountFunction, ChunkGeneratorCache.HeightFunction heightFunction, ChunkGeneratorCache.HeightNoiseFunction heightNoiseFunction, int maxSize, long expireAfterSeconds) -
Method Summary
Modifier and TypeMethodDescriptionprotected final CoordinateCache.CoordinateKeyprotected final CoreDataCacheEntryprotected final voidvoidensureBiomeCountList(int seed, int x, int z, CoreDataCacheEntry entry) voidensureHeight(int seed, int x, int z, CoreDataCacheEntry entry) voidensureHeightNoise(int seed, int x, int z, CoreDataCacheEntry entry) get(int seed, int x, int z) getBiomeCountResult(int seed, int x, int z) intgetHeight(int seed, int x, int z) getZoneBiomeResult(int seed, int x, int z) protected static CoordinateCache.CoordinateKeylocalKey()voidputHeight(int seed, int x, int z, int height)
-
Field Details
-
CONCURRENCY_LEVEL
private static final int CONCURRENCY_LEVEL -
zoneBiomeResultFunction
-
biomeCountFunction
-
heightFunction
-
heightNoiseFunction
-
keyPool
-
cache
-
-
Constructor Details
-
ChunkGeneratorCache
public ChunkGeneratorCache(ChunkGeneratorCache.ZoneBiomeResultFunction zoneBiomeResultFunction, ChunkGeneratorCache.BiomeCountFunction biomeCountFunction, ChunkGeneratorCache.HeightFunction heightFunction, ChunkGeneratorCache.HeightNoiseFunction heightNoiseFunction, int maxSize, long expireAfterSeconds)
-
-
Method Details
-
get
-
getZoneBiomeResult
-
getBiomeCountResult
-
putHeight
public void putHeight(int seed, int x, int z, int height) -
getHeight
public int getHeight(int seed, int x, int z) -
ensureBiomeCountList
-
ensureHeight
-
ensureHeightNoise
-
computeKey
@Nonnull protected final CoordinateCache.CoordinateKey computeKey(CoordinateCache.CoordinateKey key) -
computeValue
@Nonnull protected final CoreDataCacheEntry computeValue(@Nonnull CoordinateCache.CoordinateKey key) -
destroyEntry
-
localKey
-