mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-07-18 18:23:06 +00:00
Adapt getHeight complex function to negative limits
This commit is contained in:
parent
0b77986034
commit
525dfab3e3
@ -95,7 +95,7 @@ public class IrisComplex implements DataProvider {
|
|||||||
UUID focusUUID = UUID.nameUUIDFromBytes("focus".getBytes());
|
UUID focusUUID = UUID.nameUUIDFromBytes("focus".getBytes());
|
||||||
this.rng = new RNG(engine.getSeedManager().getComplex());
|
this.rng = new RNG(engine.getSeedManager().getComplex());
|
||||||
this.data = engine.getData();
|
this.data = engine.getData();
|
||||||
double height = engine.getHeight();
|
double height = engine.getMaxHeight();
|
||||||
fluidHeight = engine.getDimension().getFluidHeight();
|
fluidHeight = engine.getDimension().getFluidHeight();
|
||||||
generators = new KMap<>();
|
generators = new KMap<>();
|
||||||
focusBiome = engine.getFocus();
|
focusBiome = engine.getFocus();
|
||||||
@ -336,8 +336,8 @@ public class IrisComplex implements DataProvider {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private double getHeight(Engine engine, IrisBiome b, double x, double z, long seed) {
|
private double getHeight(Engine engine, IrisBiome b, double x, double z, long seed) {
|
||||||
return Math.min(engine.getHeight(),
|
return Math.min(engine.getWorld().maxHeight(),
|
||||||
Math.max(getInterpolatedHeight(engine, x, z, seed) + fluidHeight + overlayStream.get(x, z), 0));
|
Math.max(getInterpolatedHeight(engine, x, z, seed) + fluidHeight + overlayStream.get(x, z), engine.getWorld().minHeight()));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void registerGenerator(IrisGenerator cachedGenerator) {
|
private void registerGenerator(IrisGenerator cachedGenerator) {
|
||||||
|
@ -136,6 +136,10 @@ public interface Engine extends DataProvider, Fallible, LootProvider, BlockUpdat
|
|||||||
|
|
||||||
EngineTarget getTarget();
|
EngineTarget getTarget();
|
||||||
|
|
||||||
|
default int getMaxHeight() {
|
||||||
|
return getTarget().getWorld().maxHeight();
|
||||||
|
}
|
||||||
|
|
||||||
default int getMinHeight() {
|
default int getMinHeight() {
|
||||||
return getTarget().getWorld().minHeight();
|
return getTarget().getWorld().minHeight();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user