mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-07-18 10:12:53 +00:00
Disable cave lava for now
This commit is contained in:
parent
1aee758f87
commit
ef08319670
@ -18,6 +18,7 @@
|
|||||||
|
|
||||||
package com.volmit.iris.engine.object;
|
package com.volmit.iris.engine.object;
|
||||||
|
|
||||||
|
import com.volmit.iris.Iris;
|
||||||
import com.volmit.iris.core.loader.IrisData;
|
import com.volmit.iris.core.loader.IrisData;
|
||||||
import com.volmit.iris.core.loader.IrisRegistrant;
|
import com.volmit.iris.core.loader.IrisRegistrant;
|
||||||
import com.volmit.iris.engine.framework.Engine;
|
import com.volmit.iris.engine.framework.Engine;
|
||||||
@ -55,9 +56,6 @@ public class IrisCave extends IrisRegistrant {
|
|||||||
@Desc("Limit the worm from ever getting higher or lower than this range")
|
@Desc("Limit the worm from ever getting higher or lower than this range")
|
||||||
private IrisRange verticalRange = new IrisRange(3, 255);
|
private IrisRange verticalRange = new IrisRange(3, 255);
|
||||||
|
|
||||||
@Desc("To fill this cave with lava, set the lava level to a height from the bottom most point of the cave.")
|
|
||||||
private int lavaLevel = -1;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getFolderName() {
|
public String getFolderName() {
|
||||||
return "caves";
|
return "caves";
|
||||||
@ -77,7 +75,6 @@ public class IrisCave extends IrisRegistrant {
|
|||||||
double girth = getWorm().getGirth().get(rng, x, z, engine.getData());
|
double girth = getWorm().getGirth().get(rng, x, z, engine.getData());
|
||||||
KList<IrisPosition> points = getWorm().generate(rng, engine.getData(), writer, verticalRange, x, y, z, (at) -> {});
|
KList<IrisPosition> points = getWorm().generate(rng, engine.getData(), writer, verticalRange, x, y, z, (at) -> {});
|
||||||
int highestWater = Math.max(waterHint, -1);
|
int highestWater = Math.max(waterHint, -1);
|
||||||
int lowestPoint = Integer.MAX_VALUE;
|
|
||||||
|
|
||||||
if (highestWater == -1) {
|
if (highestWater == -1) {
|
||||||
for (IrisPosition i : points) {
|
for (IrisPosition i : points) {
|
||||||
@ -91,13 +88,6 @@ public class IrisCave extends IrisRegistrant {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(lavaLevel >= 0)
|
|
||||||
{
|
|
||||||
for(IrisPosition i : points)
|
|
||||||
{
|
|
||||||
lowestPoint = Math.min(i.getY(), lowestPoint);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
int h = Math.min(Math.max(highestWater, waterHint), engine.getDimension().getFluidHeight());
|
int h = Math.min(Math.max(highestWater, waterHint), engine.getDimension().getFluidHeight());
|
||||||
|
|
||||||
@ -107,11 +97,10 @@ public class IrisCave extends IrisRegistrant {
|
|||||||
|
|
||||||
MatterCavern c = new MatterCavern(true, customBiome, (byte) 0);
|
MatterCavern c = new MatterCavern(true, customBiome, (byte) 0);
|
||||||
MatterCavern w = new MatterCavern(true, customBiome, (byte) 1);
|
MatterCavern w = new MatterCavern(true, customBiome, (byte) 1);
|
||||||
MatterCavern l = new MatterCavern(true, customBiome, (byte) 2);
|
|
||||||
int flp = lowestPoint - worm.getGirth().getMid();
|
|
||||||
writer.setLineConsumer(points,
|
writer.setLineConsumer(points,
|
||||||
girth, true,
|
girth, true,
|
||||||
(xf, yf, zf) -> (lavaLevel + flp >= yf && lavaLevel >= 0) ? l : (yf <= h ? w : c));
|
(xf, yf, zf) -> yf <= h ? w : c);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
|
|
||||||
package com.volmit.iris.engine.object;
|
package com.volmit.iris.engine.object;
|
||||||
|
|
||||||
|
import com.volmit.iris.Iris;
|
||||||
import com.volmit.iris.core.loader.IrisData;
|
import com.volmit.iris.core.loader.IrisData;
|
||||||
import com.volmit.iris.core.loader.IrisRegistrant;
|
import com.volmit.iris.core.loader.IrisRegistrant;
|
||||||
import com.volmit.iris.engine.framework.Engine;
|
import com.volmit.iris.engine.framework.Engine;
|
||||||
@ -103,15 +104,6 @@ public class IrisRavine extends IrisRegistrant {
|
|||||||
CNG bw = baseWidthStyle.getGenerator().createNoCache(rng, engine.getData());
|
CNG bw = baseWidthStyle.getGenerator().createNoCache(rng, engine.getData());
|
||||||
int highestWater = Math.max(waterHint, -1);
|
int highestWater = Math.max(waterHint, -1);
|
||||||
boolean water = false;
|
boolean water = false;
|
||||||
int lowestPoint = Integer.MAX_VALUE;
|
|
||||||
|
|
||||||
if(lavaLevel >= 0)
|
|
||||||
{
|
|
||||||
for(IrisPosition i : pos)
|
|
||||||
{
|
|
||||||
lowestPoint = Math.min(i.getY(), lowestPoint);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (highestWater == -1) {
|
if (highestWater == -1) {
|
||||||
for (IrisPosition i : pos) {
|
for (IrisPosition i : pos) {
|
||||||
@ -158,7 +150,15 @@ public class IrisRavine extends IrisRegistrant {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
writer.setElipsoid(p.getX(), i, p.getZ(), v, ribThickness, v, true, ((lavaLevel + (lowestPoint - depthStyle.getMid())) >= i) && lavaLevel >= 0 ? l : c);
|
if(lavaLevel >= 0 && i <= lavaLevel + (surface - depthStyle.getMid()))
|
||||||
|
{
|
||||||
|
writer.setElipsoid(p.getX(), i, p.getZ(), v, ribThickness, v, true, l);
|
||||||
|
}
|
||||||
|
|
||||||
|
else
|
||||||
|
{
|
||||||
|
writer.setElipsoid(p.getX(), i, p.getZ(), v, ribThickness, v, true, c);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -174,7 +174,15 @@ public class IrisRavine extends IrisRegistrant {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
writer.setElipsoid(p.getX(), i, p.getZ(), v, ribThickness, v, true, ((lavaLevel + (lowestPoint - depthStyle.getMid())) >= i) && lavaLevel >= 0 ? l : c);
|
if(lavaLevel >= 0 && i <= lavaLevel + (surface - depthStyle.getMid()))
|
||||||
|
{
|
||||||
|
writer.setElipsoid(p.getX(), i, p.getZ(), v, ribThickness, v, true, l);
|
||||||
|
}
|
||||||
|
|
||||||
|
else
|
||||||
|
{
|
||||||
|
writer.setElipsoid(p.getX(), i, p.getZ(), v, ribThickness, v, true, c);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user