Unfuck the decorator stacks

This commit is contained in:
cyberpwn 2021-08-18 23:26:30 -04:00
parent 7f7397f684
commit b19a7d45d8
3 changed files with 5 additions and 5 deletions

View File

@ -18,6 +18,7 @@
package com.volmit.iris.engine.actuator;
import com.volmit.iris.Iris;
import com.volmit.iris.engine.decorator.*;
import com.volmit.iris.engine.framework.Engine;
import com.volmit.iris.engine.framework.EngineAssignedActuator;

View File

@ -77,10 +77,6 @@ public class IrisSurfaceDecorator extends IrisEngineDecorator {
}
int stack = decorator.getHeight(getRng().nextParallelRNG(Cache.key(realX, realZ)), realX, realZ, getData());
if (decorator.isScaleStack()) {
int maxStack = max - height;
stack = (int) Math.ceil((double) maxStack * ((double) stack / 100));
} else stack = Math.min(height - max, stack);
if (stack == 1) {
data.set(x, height, z, decorator.getBlockDataForTop(biome, getRng(), realX, height, realZ, getData()));

View File

@ -107,7 +107,10 @@ public class IrisDecorator {
return stackMin;
}
return getHeightGenerator(rng, data).fit(stackMin, stackMax, x / heightVariance.getZoom(), z / heightVariance.getZoom()) + 1;
return getHeightGenerator(rng, data)
.fit(stackMin, stackMax,
x / heightVariance.getZoom(),
z / heightVariance.getZoom()) + 1;
}
public CNG getHeightGenerator(RNG rng, IrisData data) {