diff --git a/src/main/java/ninja/bytecode/iris/Settings.java b/src/main/java/ninja/bytecode/iris/Settings.java index 7bc215a21..786484f3e 100644 --- a/src/main/java/ninja/bytecode/iris/Settings.java +++ b/src/main/java/ninja/bytecode/iris/Settings.java @@ -42,7 +42,7 @@ public class Settings public double heightScale = 0.56; public double baseHeight = 0.065; public int seaLevel = 63; - public double biomeScale = 0.5; + public double biomeScale = 0.75; public boolean flatBedrock = false; } } diff --git a/src/main/java/ninja/bytecode/iris/generator/IrisGenerator.java b/src/main/java/ninja/bytecode/iris/generator/IrisGenerator.java index 4995ade1e..545533b04 100644 --- a/src/main/java/ninja/bytecode/iris/generator/IrisGenerator.java +++ b/src/main/java/ninja/bytecode/iris/generator/IrisGenerator.java @@ -538,144 +538,6 @@ public class IrisGenerator extends ParallaxWorldGenerator } } } - - KList hs = plan.getCaveHeights(x, z); - - if(hs != null && !hs.isEmpty()) - { - int h = 0; - int border = 0; - for(int hx : hs) - { - h = hx - 1; - border = 0; - - if(x == 0 || x == 15) - { - border++; - } - - if(z == 0 || z == 15) - { - border++; - } - - if(h > 1) - { - above = 0; - below = 0; - - if(x + 1 <= 15) - { - v = plan.getRealHeight(x + 1, z); - - if(v > h) - { - above++; - } - - else if(v < h) - { - below++; - } - } - - if(x - 1 >= 0) - { - v = plan.getRealHeight(x - 1, z); - - if(v > h) - { - above++; - } - - else if(v < h) - { - below++; - } - } - - if(z + 1 <= 15) - { - v = plan.getRealHeight(x, z + 1); - - if(v > h) - { - above++; - } - - else if(v < h) - { - below++; - } - } - - if(z - 1 >= 0) - { - v = plan.getRealHeight(x, z - 1); - - if(v > h) - { - above++; - } - - else if(v < h) - { - below++; - } - } - - // Patch Hole - if(above >= 4 - border) - { - data.setBlock(x, h + 1, z, data.getMB(x, h, z)); - plan.setRealHeight(x, z, h + 1); - } - - // Remove Nipple - else if(below >= 4 - border) - { - data.setBlock(x, h - 1, z, data.getMB(x, h, z)); - data.setBlock(x, h, z, Material.AIR); - plan.setRealHeight(x, z, h - 1); - } - - // Slab Smoothing - else if(below == 0 && above > 0 && f == Iris.settings.gen.blockSmoothing - 1) - { - MB d = data.getMB(x, h, z); - - if(d.material.equals(Material.STAINED_CLAY) && d.data == 1) - { - data.setBlock(x, h + 1, z, Material.STONE_SLAB2); - } - - else if(d.material.equals(Material.SAND)) - { - if(d.data == 0) - { - data.setBlock(x, h + 1, z, Material.STEP, (byte) 1); - } - - if(d.data == 1) - { - data.setBlock(x, h + 1, z, Material.STONE_SLAB2); - } - } - - else if(d.material.equals(Material.SNOW_BLOCK)) - { - data.setBlock(x, h + 1, z, Material.SNOW, (byte) 4); - } - - else if(d.material.equals(Material.STONE) || d.material.equals(Material.SMOOTH_BRICK) || d.material.equals(Material.COBBLESTONE) || d.material.equals(Material.GRAVEL)) - { - data.setBlock(x, h + 1, z, Material.STEP, (byte) 5); - } - } - } - } - } } } } diff --git a/src/main/java/ninja/bytecode/iris/generator/layer/GenLayerBiome.java b/src/main/java/ninja/bytecode/iris/generator/layer/GenLayerBiome.java index f0f7b5eb5..76c5d5104 100644 --- a/src/main/java/ninja/bytecode/iris/generator/layer/GenLayerBiome.java +++ b/src/main/java/ninja/bytecode/iris/generator/layer/GenLayerBiome.java @@ -11,6 +11,7 @@ import ninja.bytecode.iris.generator.IrisGenerator; import ninja.bytecode.iris.pack.IrisBiome; import ninja.bytecode.iris.pack.IrisRegion; import ninja.bytecode.iris.util.BiomeLayer; +import ninja.bytecode.iris.util.Borders; import ninja.bytecode.iris.util.GenLayer; import ninja.bytecode.iris.util.PolygonGenerator; import ninja.bytecode.shuriken.collections.KList; @@ -156,6 +157,17 @@ public class GenLayerBiome extends GenLayer return biome; } + if(!Borders.isBorderWithin(x, z, 24, 45, (x / 10D) + (z / 10D), (a, b) -> ocean.getIndex(a, b))) + { + if(region.getDeepOcean() == null) + { + L.f(C.YELLOW + "Cannot find Deep Ocean in Region" + C.RED + biome.getRegionID()); + return biome; + } + + return getRegion(biome.getRegionID()).getDeepOcean(); + } + if(region.getOcean() == null) { L.f(C.YELLOW + "Cannot find Ocean in Region" + C.RED + biome.getRegionID()); diff --git a/src/main/java/ninja/bytecode/iris/generator/layer/GenLayerCaves.java b/src/main/java/ninja/bytecode/iris/generator/layer/GenLayerCaves.java index 3009f9b46..706c2776a 100644 --- a/src/main/java/ninja/bytecode/iris/generator/layer/GenLayerCaves.java +++ b/src/main/java/ninja/bytecode/iris/generator/layer/GenLayerCaves.java @@ -82,11 +82,6 @@ public class GenLayerCaves extends GenLayer } } } - - if(lowest < 256) - { - plan.setCaveHeight(x, z, lowest); - } } } diff --git a/src/main/java/ninja/bytecode/iris/pack/IrisRegion.java b/src/main/java/ninja/bytecode/iris/pack/IrisRegion.java index 98b977af2..c3ab94851 100644 --- a/src/main/java/ninja/bytecode/iris/pack/IrisRegion.java +++ b/src/main/java/ninja/bytecode/iris/pack/IrisRegion.java @@ -12,6 +12,7 @@ public class IrisRegion private String name; private KList biomes; private IrisBiome ocean; + private IrisBiome deepOcean; private IrisBiome lake; private IrisBiome lakeBeach; private IrisBiome channel; @@ -23,6 +24,7 @@ public class IrisRegion this.biomes = new KList<>(); beach = null; ocean = null; + deepOcean = null; lake = null; lakeBeach = null; channel = null; @@ -35,6 +37,7 @@ public class IrisRegion JSONObject o = Iris.pack().loadJSON("pack/regions/" + name + ".json"); J.attempt(() -> name = o.getString("name")); J.attempt(() -> ocean = Iris.pack().getBiomeById(o.getString("ocean"))); + J.attempt(() -> deepOcean = Iris.pack().getBiomeById(o.getString("deepOcean"))); J.attempt(() -> beach = Iris.pack().getBiomeById(o.getString("beach"))); J.attempt(() -> lake = Iris.pack().getBiomeById(o.getString("lake"))); J.attempt(() -> lakeBeach = Iris.pack().getBiomeById(o.getString("shore"))); @@ -76,6 +79,11 @@ public class IrisRegion { return ocean; } + + public IrisBiome getDeepOcean() + { + return deepOcean; + } public IrisBiome getLake() {