mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-12-30 12:29:20 +00:00
Alright
This commit is contained in:
42
src/main/java/com/volmit/iris/object/IrisCaveLayer.java
Normal file
42
src/main/java/com/volmit/iris/object/IrisCaveLayer.java
Normal file
@@ -0,0 +1,42 @@
|
||||
package com.volmit.iris.object;
|
||||
|
||||
import com.volmit.iris.util.Desc;
|
||||
import com.volmit.iris.util.DontObfuscate;
|
||||
import com.volmit.iris.util.MinNumber;
|
||||
import com.volmit.iris.util.Required;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Desc("Translate objects")
|
||||
@Data
|
||||
public class IrisCaveLayer
|
||||
{
|
||||
@Required
|
||||
@DontObfuscate
|
||||
@Desc("The vertical slope this cave layer follows")
|
||||
private IrisShapedGeneratorStyle verticalSlope = new IrisShapedGeneratorStyle();
|
||||
|
||||
@Required
|
||||
@DontObfuscate
|
||||
@Desc("The horizontal slope this cave layer follows")
|
||||
private IrisShapedGeneratorStyle horizontalSlope = new IrisShapedGeneratorStyle();
|
||||
|
||||
@MinNumber(0.001)
|
||||
@DontObfuscate
|
||||
@Desc("The cave zoom. Higher values makes caves spread out further and branch less often, but are thicker.")
|
||||
private double caveZoom = 1D;
|
||||
|
||||
@MinNumber(0.001)
|
||||
@DontObfuscate
|
||||
@Desc("The cave thickness.")
|
||||
private double caveThickness = 1D;
|
||||
|
||||
@DontObfuscate
|
||||
@Desc("If set to true, this cave layer can break the surface")
|
||||
private boolean canBreakSurface = false;
|
||||
|
||||
public IrisCaveLayer()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -43,24 +43,12 @@ public class IrisDimension extends IrisRegistrant
|
||||
@Desc("The human readable name of this dimension")
|
||||
private String name = "A Dimension";
|
||||
|
||||
@MinNumber(0.0001)
|
||||
@MaxNumber(64)
|
||||
@DontObfuscate
|
||||
@Desc("The Thickness scale of cave veins")
|
||||
private double caveThickness = 1D;
|
||||
|
||||
@Required
|
||||
@MinNumber(0)
|
||||
@DontObfuscate
|
||||
@Desc("The version of this dimension. Changing this will stop users from accidentally upgrading (and breaking their worlds).")
|
||||
private int version = 1;
|
||||
|
||||
@MinNumber(0.0001)
|
||||
@MaxNumber(512)
|
||||
@DontObfuscate
|
||||
@Desc("The cave web scale. Smaller values means scaled up vein networks.")
|
||||
private double caveScale = 1D;
|
||||
|
||||
@DontObfuscate
|
||||
@Desc("The placement style of regions")
|
||||
private IrisGeneratorStyle regionStyle = NoiseStyle.CELLULAR_IRIS_DOUBLE.style();
|
||||
@@ -93,12 +81,6 @@ public class IrisDimension extends IrisRegistrant
|
||||
@Desc("The placement style of biomes")
|
||||
private IrisGeneratorStyle skylandBiomeStyle = NoiseStyle.CELLULAR_IRIS_DOUBLE.style();
|
||||
|
||||
@MinNumber(-256)
|
||||
@MaxNumber(256)
|
||||
@DontObfuscate
|
||||
@Desc("Shift the Y value of the cave networks up or down.")
|
||||
private double caveShift = 0D;
|
||||
|
||||
@DontObfuscate
|
||||
@Desc("Generate caves or not.")
|
||||
private boolean caves = true;
|
||||
@@ -267,6 +249,11 @@ public class IrisDimension extends IrisRegistrant
|
||||
@Desc("The noise style for rock types")
|
||||
private IrisGeneratorStyle rockStyle = NoiseStyle.STATIC.style();
|
||||
|
||||
@ArrayType(min = 1, type = IrisCaveLayer.class)
|
||||
@DontObfuscate
|
||||
@Desc("Define cave layers")
|
||||
private KList<IrisCaveLayer> caveLayers = new KList<>();
|
||||
|
||||
@DontObfuscate
|
||||
@Desc("The noise style for fluid types")
|
||||
private IrisGeneratorStyle fluidStyle = NoiseStyle.STATIC.style();
|
||||
@@ -509,7 +496,7 @@ public class IrisDimension extends IrisRegistrant
|
||||
{
|
||||
return rockLayerGenerator.aquire(() ->
|
||||
{
|
||||
RNG rngx = rng.nextParallelRNG((int) (getRockData().size() * getRegions().size() * getCaveScale() * getLandZoom() * 10357));
|
||||
RNG rngx = rng.nextParallelRNG((int) (getRockData().size() * getRegions().size() * getLandZoom() * 10357));
|
||||
return rockStyle.create(rngx);
|
||||
});
|
||||
}
|
||||
@@ -551,7 +538,7 @@ public class IrisDimension extends IrisRegistrant
|
||||
{
|
||||
return fluidLayerGenerator.aquire(() ->
|
||||
{
|
||||
RNG rngx = rng.nextParallelRNG(getFluidData().size() * (int) (getRockData().size() * getRegions().size() * getCaveScale() * getLandZoom() * 10357));
|
||||
RNG rngx = rng.nextParallelRNG(getFluidData().size() * (int) (getRockData().size() * getRegions().size() * getLandZoom() * 10357));
|
||||
return fluidStyle.create(rngx);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
package com.volmit.iris.object;
|
||||
|
||||
import com.volmit.iris.util.Desc;
|
||||
import com.volmit.iris.util.DontObfuscate;
|
||||
import com.volmit.iris.util.MaxNumber;
|
||||
import com.volmit.iris.util.MinNumber;
|
||||
import com.volmit.iris.util.RNG;
|
||||
import com.volmit.iris.util.Required;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Desc("This represents a generator with a min and max height")
|
||||
@Data
|
||||
public class IrisShapedGeneratorStyle
|
||||
{
|
||||
@Required
|
||||
@DontObfuscate
|
||||
@Desc("The generator id")
|
||||
private IrisGeneratorStyle generator = new IrisGeneratorStyle(NoiseStyle.IRIS);
|
||||
|
||||
@Required
|
||||
@MinNumber(-256)
|
||||
@MaxNumber(256)
|
||||
@DontObfuscate
|
||||
@Desc("The min block value")
|
||||
private int min = 0;
|
||||
|
||||
@Required
|
||||
@MinNumber(-256)
|
||||
@MaxNumber(256)
|
||||
@DontObfuscate
|
||||
@Desc("The max block value")
|
||||
private int max = 0;
|
||||
|
||||
public double get(RNG rng, double... dim)
|
||||
{
|
||||
return generator.create(rng).fitDouble(min, max, dim);
|
||||
}
|
||||
|
||||
public IrisShapedGeneratorStyle()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user