Clean up.

This commit is contained in:
Harrison Deng 2020-04-19 20:31:21 -05:00
parent 2ace74972e
commit 4b644159cb

View File

@ -1,48 +0,0 @@
package ca.recrown.islandsurvivalcraft.worldgen;
import java.util.Random;
import org.bukkit.Material;
import org.bukkit.generator.ChunkGenerator.ChunkData;
import org.bukkit.util.noise.SimplexOctaveGenerator;
import nl.rutgerkok.worldgeneratorapi.BaseNoiseGenerator;
import nl.rutgerkok.worldgeneratorapi.BiomeGenerator;
public class IslandNoiseGenerator implements BaseNoiseGenerator {
private TerrainSettings settings;
private SimplexOctaveGenerator baseNoiseGenerator;
private final int maximumHeight = 78;
private final int minimumHeight = 3;
public IslandNoiseGenerator(TerrainSettings settings, Random random) {
this.baseNoiseGenerator = new SimplexOctaveGenerator(random, 4);
}
@Override
public void getNoise(BiomeGenerator biomeGenerator, double[] buffer, int x4, int z4) {
for (int multiple = 0; multiple < buffer.length; multiple++) {
for (int x = 0; x < 4; x++)
for (int z = 0; z < 4; z++) {
int xBlock = x4 + x;
int zBlock = z4 + z;
}
}
}
private void fillChunkColumn(int x, int z, int height, ChunkData chunkData) {
if (height <= settings.seaLevel) {
chunkData.setRegion(x, height, z, x+1, settings.seaLevel, z+1, Material.WATER);
chunkData.setRegion(x, 0, z, x+1, height, z+1, Material.STONE);
} else {
chunkData.setRegion(x, 0, z, x+1, height, z+1, Material.STONE);
}
}
private int baseHeight(int x, int z) {
return (int) ((baseNoiseGenerator.noise(x, z, 0.5D, 0.5D, true) + 1D) * maximumHeight/2D) + minimumHeight;
}
}