mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-04-16 13:23:07 +00:00
Begin work on languages, general cleanup, fix minor local sea level issues.
This commit is contained in:
@@ -1,16 +0,0 @@
|
||||
package com.dfsek.terra.generation;
|
||||
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.block.data.BlockData;
|
||||
import org.polydev.gaea.world.palette.Palette;
|
||||
import org.polydev.gaea.world.palette.RandomPalette;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
public class DataUtil {
|
||||
public static final BlockData STONE = Material.STONE.createBlockData();
|
||||
public static final BlockData SNOW = Material.SNOW.createBlockData();
|
||||
public static final BlockData WATER = Material.WATER.createBlockData();
|
||||
public static final BlockData AIR = Material.AIR.createBlockData();
|
||||
public static final Palette<BlockData> BLANK_PALETTE = new RandomPalette<BlockData>(new Random(2403)).add(AIR, 1);
|
||||
}
|
||||
@@ -14,6 +14,7 @@ import com.dfsek.terra.population.SnowPopulator;
|
||||
import com.dfsek.terra.population.StructurePopulator;
|
||||
import com.dfsek.terra.population.TreePopulator;
|
||||
import com.dfsek.terra.structure.StructureSpawnRequirement;
|
||||
import com.dfsek.terra.util.DataUtil;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.World;
|
||||
@@ -70,10 +71,11 @@ public class TerraChunkGenerator extends GaeaChunkGenerator {
|
||||
int paletteLevel = 0;
|
||||
int cx = xOrig + x;
|
||||
int cz = zOrig + z;
|
||||
Biome orig = getBiomeGrid(world).getBiome(xOrig+x, zOrig+z, GenerationPhase.BASE);
|
||||
Biome b = getBiomeGrid(world).getBiome(xOrig+x, zOrig+z, GenerationPhase.PALETTE_APPLY);
|
||||
BiomeConfig c = config.getBiome((UserDefinedBiome) b);
|
||||
BiomeSlabConfig slab = c.getSlabs();
|
||||
int sea = c.getOcean().getSeaLevel();
|
||||
int sea = config.getBiome((UserDefinedBiome) orig).getOcean().getSeaLevel();
|
||||
Palette<BlockData> seaPalette = c.getOcean().getOcean();
|
||||
for(int y = world.getMaxHeight()-1; y >= 0; y--) {
|
||||
if(super.getInterpolatedNoise(x, y, z) > 0) {
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.dfsek.terra.generation;
|
||||
|
||||
import com.dfsek.terra.math.NoiseFunction2;
|
||||
import com.dfsek.terra.math.NoiseFunction3;
|
||||
import com.dfsek.terra.util.DataUtil;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.block.data.BlockData;
|
||||
import org.polydev.gaea.biome.Generator;
|
||||
|
||||
Reference in New Issue
Block a user