From 4cff7b5d644f5cacaeb48dd0d09ca5ceafb5c7d5 Mon Sep 17 00:00:00 2001 From: valoeghese Date: Sun, 1 Mar 2020 16:41:15 +1300 Subject: [PATCH] please fix caves super --- .../halotroop/litecraft/types/block/Blocks.java | 12 ++++++------ .../halotroop/litecraft/world/gen/CavesModifier.java | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/main/java/com/github/halotroop/litecraft/types/block/Blocks.java b/src/main/java/com/github/halotroop/litecraft/types/block/Blocks.java index 8065a7c..d215f77 100644 --- a/src/main/java/com/github/halotroop/litecraft/types/block/Blocks.java +++ b/src/main/java/com/github/halotroop/litecraft/types/block/Blocks.java @@ -5,12 +5,12 @@ import com.github.halotroop.litecraft.types.block.Block.Properties; public final class Blocks { public static final Block AIR = new Block(new Properties("air").visible(false).fullCube(false)); - public static final Block GRASS = new Block(new Properties("block/cubes/soil/grass/grass_top.png").caveCarveThreshold(0.12f)); - public static final Block DIRT = new Block("block/cubes/soil/dirt.png", new Properties("dirt").caveCarveThreshold(0.12f)); - public static final Block ANDESITE = new Block("block/cubes/stone/basic/andesite.png", new Properties("andesite").caveCarveThreshold(0.11f)); - public static final Block DIORITE = new Block("block/cubes/stone/basic/diorite.png", new Properties("diorite").caveCarveThreshold(0.08f)); - public static final Block GRANITE = new Block("block/cubes/stone/basic/granite.png", new Properties("granite").caveCarveThreshold(0.09f)); - public static final Block GNEISS = new Block("block/cubes/stone/basic/gneiss.png", new Properties("gneiss").caveCarveThreshold(0.12f)); + public static final Block GRASS = new Block(new Properties("block/cubes/soil/grass/grass_top.png").caveCarveThreshold(0.04f)); + public static final Block DIRT = new Block("block/cubes/soil/dirt.png", new Properties("dirt").caveCarveThreshold(0.04f)); + public static final Block ANDESITE = new Block("block/cubes/stone/basic/andesite.png", new Properties("andesite").caveCarveThreshold(0.08f)); + public static final Block DIORITE = new Block("block/cubes/stone/basic/diorite.png", new Properties("diorite").caveCarveThreshold(0.05f)); + public static final Block GRANITE = new Block("block/cubes/stone/basic/granite.png", new Properties("granite").caveCarveThreshold(0.06f)); + public static final Block GNEISS = new Block("block/cubes/stone/basic/gneiss.png", new Properties("gneiss").caveCarveThreshold(0.09f)); public static Block init() { diff --git a/src/main/java/com/github/halotroop/litecraft/world/gen/CavesModifier.java b/src/main/java/com/github/halotroop/litecraft/world/gen/CavesModifier.java index c64ffb4..a1edd57 100644 --- a/src/main/java/com/github/halotroop/litecraft/world/gen/CavesModifier.java +++ b/src/main/java/com/github/halotroop/litecraft/world/gen/CavesModifier.java @@ -15,7 +15,7 @@ public class CavesModifier implements WorldModifier, WorldGenConstants public void initialize(long seed) { Random rand = new Random(seed); - this.caveNoise = new OctaveSimplexNoise(rand, 1, 43.0, 1.0, 1.0); + this.caveNoise = new OctaveSimplexNoise(rand, 2, 65.0, 1.0, 1.0); } @Override @@ -35,8 +35,8 @@ public class CavesModifier implements WorldModifier, WorldGenConstants { int scOffsetY = subChunkY << 2; // sub chunk offset y int scTotalY = scOffsetY + chunkStartY; - double scSampleY = (double) scTotalY * 2.0; - double scUpperYOffset = 4.0 * 2.0; + double scSampleY = (double) scTotalY * 1.5; // squish caves along y axis a bit + double scUpperYOffset = 4.0 * 1.5; // calculate noise at each corner of the cube [lower|upper][south|north][west|east] double noiseLSW = this.caveNoise.sample(scTotalX, scSampleY, scTotalZ); // base = lower south west double noiseUSW = this.caveNoise.sample(scTotalX, scSampleY + scUpperYOffset, scTotalZ);