public class CachingLayerContext extends Object implements LayerSampleContext<CachingLayerSampler>
Modifier and Type | Field and Description |
---|---|
private it.unimi.dsi.fastutil.longs.Long2IntLinkedOpenHashMap |
cache |
private int |
cacheCapacity |
private long |
localSeed |
private PerlinNoiseSampler |
noiseSampler |
private long |
worldSeed |
Constructor and Description |
---|
CachingLayerContext(int cacheCapacity,
long seed,
long salt) |
Modifier and Type | Method and Description |
---|---|
private static long |
addSalt(long seed,
long salt) |
CachingLayerSampler |
createSampler(LayerOperator layerOperator) |
CachingLayerSampler |
createSampler(LayerOperator layerOperator,
CachingLayerSampler cachingLayerSampler) |
CachingLayerSampler |
createSampler(LayerOperator layerOperator,
CachingLayerSampler cachingLayerSampler,
CachingLayerSampler cachingLayerSampler2) |
PerlinNoiseSampler |
getNoiseSampler() |
void |
initSeed(long x,
long y) |
int |
nextInt(int bound) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
choose, choose
private final it.unimi.dsi.fastutil.longs.Long2IntLinkedOpenHashMap cache
private final int cacheCapacity
private final PerlinNoiseSampler noiseSampler
private final long worldSeed
private long localSeed
public CachingLayerContext(int cacheCapacity, long seed, long salt)
public CachingLayerSampler createSampler(LayerOperator layerOperator)
createSampler
in interface LayerSampleContext<CachingLayerSampler>
public CachingLayerSampler createSampler(LayerOperator layerOperator, CachingLayerSampler cachingLayerSampler)
createSampler
in interface LayerSampleContext<CachingLayerSampler>
public CachingLayerSampler createSampler(LayerOperator layerOperator, CachingLayerSampler cachingLayerSampler, CachingLayerSampler cachingLayerSampler2)
createSampler
in interface LayerSampleContext<CachingLayerSampler>
public void initSeed(long x, long y)
initSeed
in interface LayerSampleContext<CachingLayerSampler>
public int nextInt(int bound)
nextInt
in interface LayerRandomnessSource
public PerlinNoiseSampler getNoiseSampler()
getNoiseSampler
in interface LayerRandomnessSource
private static long addSalt(long seed, long salt)