mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-04-19 14:42:42 +00:00
Unfuck the decorator stacks
This commit is contained in:
@@ -18,6 +18,7 @@
|
|||||||
|
|
||||||
package com.volmit.iris.engine.actuator;
|
package com.volmit.iris.engine.actuator;
|
||||||
|
|
||||||
|
import com.volmit.iris.Iris;
|
||||||
import com.volmit.iris.engine.decorator.*;
|
import com.volmit.iris.engine.decorator.*;
|
||||||
import com.volmit.iris.engine.framework.Engine;
|
import com.volmit.iris.engine.framework.Engine;
|
||||||
import com.volmit.iris.engine.framework.EngineAssignedActuator;
|
import com.volmit.iris.engine.framework.EngineAssignedActuator;
|
||||||
|
|||||||
@@ -77,10 +77,6 @@ public class IrisSurfaceDecorator extends IrisEngineDecorator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int stack = decorator.getHeight(getRng().nextParallelRNG(Cache.key(realX, realZ)), realX, realZ, getData());
|
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) {
|
if (stack == 1) {
|
||||||
data.set(x, height, z, decorator.getBlockDataForTop(biome, getRng(), realX, height, realZ, getData()));
|
data.set(x, height, z, decorator.getBlockDataForTop(biome, getRng(), realX, height, realZ, getData()));
|
||||||
|
|||||||
@@ -107,7 +107,10 @@ public class IrisDecorator {
|
|||||||
return stackMin;
|
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) {
|
public CNG getHeightGenerator(RNG rng, IrisData data) {
|
||||||
|
|||||||
Reference in New Issue
Block a user