diff --git a/core/src/main/java/com/volmit/iris/engine/object/IrisCave.java b/core/src/main/java/com/volmit/iris/engine/object/IrisCave.java index b780d257d..af20daab7 100644 --- a/core/src/main/java/com/volmit/iris/engine/object/IrisCave.java +++ b/core/src/main/java/com/volmit/iris/engine/object/IrisCave.java @@ -104,7 +104,7 @@ public class IrisCave extends IrisRegistrant { CNG cng = shape.getNoise(base.nextParallelRNG(8131545), engine); KSet mask = shape.getMasked(rng, engine); writer.setNoiseMasked(points, - girth, cng.noise(x, y, z), cng, mask, true, + girth, shape.getNoiseThreshold() < 0 ? cng.noise(x, y, z) : shape.getNoiseThreshold(), cng, mask, true, (xf, yf, zf) -> yf <= h ? w : c); } diff --git a/core/src/main/java/com/volmit/iris/engine/object/IrisCaveShape.java b/core/src/main/java/com/volmit/iris/engine/object/IrisCaveShape.java index 4972ce516..3245f2485 100644 --- a/core/src/main/java/com/volmit/iris/engine/object/IrisCaveShape.java +++ b/core/src/main/java/com/volmit/iris/engine/object/IrisCaveShape.java @@ -1,9 +1,7 @@ package com.volmit.iris.engine.object; import com.volmit.iris.engine.framework.Engine; -import com.volmit.iris.engine.object.annotations.Desc; -import com.volmit.iris.engine.object.annotations.RegistryListResource; -import com.volmit.iris.engine.object.annotations.Snippet; +import com.volmit.iris.engine.object.annotations.*; import com.volmit.iris.util.collection.KMap; import com.volmit.iris.util.collection.KSet; import com.volmit.iris.util.math.M; @@ -25,6 +23,11 @@ public class IrisCaveShape { @Desc("Noise used for the shape of the cave") private IrisGeneratorStyle noise = new IrisGeneratorStyle(); + @MinNumber(0) + @MaxNumber(1) + @Desc("The threshold for noise mask") + private double noiseThreshold = -1; + @RegistryListResource(IrisObject.class) @Desc("Object used as mask for the shape of the cave") private String object = null;