Class CachingLayerContext
java.lang.Object
net.minecraft.world.biome.layer.util.CachingLayerContext
- All Implemented Interfaces:
LayerRandomnessSource,LayerSampleContext<CachingLayerSampler>
public class CachingLayerContext extends Object implements LayerSampleContext<CachingLayerSampler>
-
Field Summary
Fields Modifier and Type Field Description private Long2IntLinkedOpenHashMapcacheprivate intcacheCapacityprivate longlocalSeedprivate PerlinNoiseSamplernoiseSamplerprivate longworldSeed -
Constructor Summary
Constructors Constructor Description CachingLayerContext(int cacheCapacity, long seed, long salt) -
Method Summary
Modifier and Type Method Description private static longaddSalt(long seed, long salt)CachingLayerSamplercreateSampler(LayerOperator layerOperator)CachingLayerSamplercreateSampler(LayerOperator layerOperator, CachingLayerSampler cachingLayerSampler)CachingLayerSamplercreateSampler(LayerOperator layerOperator, CachingLayerSampler cachingLayerSampler, CachingLayerSampler cachingLayerSampler2)PerlinNoiseSamplergetNoiseSampler()voidinitSeed(long x, long y)intnextInt(int bound)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.world.biome.layer.util.LayerSampleContext
choose, choose
-
Field Details
-
cache
-
cacheCapacity
private final int cacheCapacity -
noiseSampler
-
worldSeed
private final long worldSeed -
localSeed
private long localSeed
-
-
Constructor Details
-
CachingLayerContext
public CachingLayerContext(int cacheCapacity, long seed, long salt)
-
-
Method Details
-
createSampler
- Specified by:
createSamplerin interfaceLayerSampleContext<CachingLayerSampler>
-
createSampler
public CachingLayerSampler createSampler(LayerOperator layerOperator, CachingLayerSampler cachingLayerSampler)- Specified by:
createSamplerin interfaceLayerSampleContext<CachingLayerSampler>
-
createSampler
public CachingLayerSampler createSampler(LayerOperator layerOperator, CachingLayerSampler cachingLayerSampler, CachingLayerSampler cachingLayerSampler2)- Specified by:
createSamplerin interfaceLayerSampleContext<CachingLayerSampler>
-
initSeed
public void initSeed(long x, long y)- Specified by:
initSeedin interfaceLayerSampleContext<CachingLayerSampler>
-
nextInt
public int nextInt(int bound)- Specified by:
nextIntin interfaceLayerRandomnessSource
-
getNoiseSampler
- Specified by:
getNoiseSamplerin interfaceLayerRandomnessSource
-
addSalt
private static long addSalt(long seed, long salt)
-