please fix caves super
parent
6e678a0c9d
commit
4cff7b5d64
|
@ -5,12 +5,12 @@ import com.github.halotroop.litecraft.types.block.Block.Properties;
|
||||||
public final class Blocks
|
public final class Blocks
|
||||||
{
|
{
|
||||||
public static final Block AIR = new Block(new Properties("air").visible(false).fullCube(false));
|
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 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.12f));
|
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.11f));
|
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.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.09f));
|
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.12f));
|
public static final Block GNEISS = new Block("block/cubes/stone/basic/gneiss.png", new Properties("gneiss").caveCarveThreshold(0.09f));
|
||||||
|
|
||||||
public static Block init()
|
public static Block init()
|
||||||
{
|
{
|
||||||
|
|
|
@ -15,7 +15,7 @@ public class CavesModifier implements WorldModifier, WorldGenConstants
|
||||||
public void initialize(long seed)
|
public void initialize(long seed)
|
||||||
{
|
{
|
||||||
Random rand = new Random(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
|
@Override
|
||||||
|
@ -35,8 +35,8 @@ public class CavesModifier implements WorldModifier, WorldGenConstants
|
||||||
{
|
{
|
||||||
int scOffsetY = subChunkY << 2; // sub chunk offset y
|
int scOffsetY = subChunkY << 2; // sub chunk offset y
|
||||||
int scTotalY = scOffsetY + chunkStartY;
|
int scTotalY = scOffsetY + chunkStartY;
|
||||||
double scSampleY = (double) scTotalY * 2.0;
|
double scSampleY = (double) scTotalY * 1.5; // squish caves along y axis a bit
|
||||||
double scUpperYOffset = 4.0 * 2.0;
|
double scUpperYOffset = 4.0 * 1.5;
|
||||||
// calculate noise at each corner of the cube [lower|upper][south|north][west|east]
|
// 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 noiseLSW = this.caveNoise.sample(scTotalX, scSampleY, scTotalZ); // base = lower south west
|
||||||
double noiseUSW = this.caveNoise.sample(scTotalX, scSampleY + scUpperYOffset, scTotalZ);
|
double noiseUSW = this.caveNoise.sample(scTotalX, scSampleY + scUpperYOffset, scTotalZ);
|
||||||
|
|
Loading…
Reference in New Issue