mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-04-06 07:46:08 +00:00
Fixes grow on trees (#458)
- Made the download command easier to use with less errors than before - Usage is now `/iris download <repo> [branch=master]` - Fixed multiplicitive being useless in noise generators
This commit is contained in:
@@ -50,7 +50,6 @@ public class IrisGenerator extends IrisRegistrant {
|
||||
@Desc("The opacity, essentially a multiplier on the output.")
|
||||
private double opacity = 1;
|
||||
|
||||
|
||||
@Desc("Multiply the compsites instead of adding them")
|
||||
private boolean multiplicitive = false;
|
||||
|
||||
@@ -80,12 +79,10 @@ public class IrisGenerator extends IrisRegistrant {
|
||||
private double offsetZ = 0;
|
||||
|
||||
@Required
|
||||
|
||||
@Desc("The seed for this generator")
|
||||
private long seed = 1;
|
||||
|
||||
@Required
|
||||
|
||||
@Desc("The interpolator to use when smoothing this generator into other regions & generators")
|
||||
private IrisInterpolator interpolator = new IrisInterpolator();
|
||||
|
||||
@@ -227,12 +224,11 @@ public class IrisGenerator extends IrisRegistrant {
|
||||
}
|
||||
|
||||
int hc = (int) ((cliffHeightMin * 10) + 10 + cliffHeightMax * seed + offsetX + offsetZ);
|
||||
double h = 0;
|
||||
double tp = multiplicitive ? 1 : 0;
|
||||
double h = multiplicitive ? 1 : 0;
|
||||
double tp = 0;
|
||||
|
||||
for (IrisNoiseGenerator i : composite) {
|
||||
if (multiplicitive) {
|
||||
tp *= i.getOpacity();
|
||||
h *= i.getNoise(seed + superSeed + hc, (rx + offsetX) / zoom, (rz + offsetZ) / zoom);
|
||||
} else {
|
||||
tp += i.getOpacity();
|
||||
|
||||
@@ -23,6 +23,7 @@ import com.volmit.iris.engine.interpolation.IrisInterpolation;
|
||||
import com.volmit.iris.engine.noise.CNG;
|
||||
import com.volmit.iris.engine.object.annotations.ArrayType;
|
||||
import com.volmit.iris.engine.object.annotations.Desc;
|
||||
import com.volmit.iris.engine.object.annotations.MaxNumber;
|
||||
import com.volmit.iris.engine.object.annotations.MinNumber;
|
||||
import com.volmit.iris.engine.object.annotations.Required;
|
||||
import com.volmit.iris.util.collection.KList;
|
||||
@@ -48,6 +49,7 @@ public class IrisNoiseGenerator {
|
||||
private boolean negative = false;
|
||||
|
||||
@MinNumber(0)
|
||||
@MaxNumber(1)
|
||||
@Desc("The output multiplier")
|
||||
private double opacity = 1;
|
||||
|
||||
@@ -56,7 +58,7 @@ public class IrisNoiseGenerator {
|
||||
private double offsetX = 0;
|
||||
|
||||
|
||||
@Desc("Height output offset y")
|
||||
@Desc("Height output offset y. Avoid using with terrain generation.")
|
||||
private double offsetY = 0;
|
||||
|
||||
|
||||
@@ -64,7 +66,6 @@ public class IrisNoiseGenerator {
|
||||
private double offsetZ = 0;
|
||||
|
||||
@Required
|
||||
|
||||
@Desc("The seed")
|
||||
private long seed = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user