Height shader now takes random object in constructor.
Removed old height shader code having to do with this change. Implmemented changes to chunk generator.
This commit is contained in:
parent
0eb2a13d14
commit
3e80d1e67d
@ -40,7 +40,7 @@ public class IslandWorldChunkGenerator extends ChunkGenerator implements Listene
|
||||
this.currentWorld = world;
|
||||
IslandWorldMapper mapper = new IslandWorldMapper(random, blockValueCache);
|
||||
TemperatureMapGenerator temperatureMapGenerator = new TemperatureMapGenerator(world.getSeed());
|
||||
WorldHeightShader heightShader = new WorldHeightShader(world.getSeed(), mapper, world.getSeaLevel(), world.getMaxHeight(), 3);
|
||||
WorldHeightShader heightShader = new WorldHeightShader(random, mapper, world.getSeaLevel(), world.getMaxHeight(), 3);
|
||||
BiomeGenerator biomeGenerator = new UniBiomeIslandGenerator();
|
||||
|
||||
int maxHeight = world.getMaxHeight();
|
||||
|
@ -8,7 +8,6 @@ import org.bukkit.util.noise.SimplexOctaveGenerator;
|
||||
import ca.recrown.islandsurvivalcraft.world.IslandWorldMapper;
|
||||
|
||||
public class WorldHeightShader {
|
||||
private final Random random;
|
||||
private final SimplexOctaveGenerator noiseGenerator;
|
||||
private final IslandWorldMapper islandLocator;
|
||||
private final int seaLevel;
|
||||
@ -16,8 +15,7 @@ public class WorldHeightShader {
|
||||
private final int minimumHeight;
|
||||
private final float probabilityOfAdditive = 0.75f;
|
||||
|
||||
public WorldHeightShader(long seed, IslandWorldMapper islandLocator, int seaLevel, int worldHeight, int minimumHeight) {
|
||||
random = new Random(seed);
|
||||
public WorldHeightShader(Random random, IslandWorldMapper islandLocator, int seaLevel, int worldHeight, int minimumHeight) {
|
||||
noiseGenerator = new SimplexOctaveGenerator(random, 2);
|
||||
noiseGenerator.setScale(0.075D);
|
||||
this.islandLocator = islandLocator;
|
||||
|
Loading…
Reference in New Issue
Block a user