Supercarves

This commit is contained in:
Daniel Mills
2020-09-03 03:59:03 -04:00
parent 3663b9f957
commit 607a7be337
13 changed files with 274 additions and 99 deletions

View File

@@ -59,13 +59,10 @@ public class PostSlabber extends IrisPostBlockFilter
return;
}
if(isAirOrWater(x, h + 2, z, currentPostX, currentPostZ, currentData))
if(isAirOrWater(x, h + 1, z, currentPostX, currentPostZ, currentData))
{
queue(() ->
{
setPostBlock(x, h + 1, z, d, currentPostX, currentPostZ, currentData);
updateHeight(x, z, h + 1);
});
setPostBlock(x, h + 1, z, d, currentPostX, currentPostZ, currentData);
updateHeight(x, z, h + 1);
}
}
}

View File

@@ -45,17 +45,8 @@ public class PostWallPatcher extends IrisPostBlockFilter
if(ha < h - 2 || hb < h - 2 || hc < h - 2 || hd < h - 2)
{
boolean brokeGround = false;
int max = Math.abs(Math.max(h - ha, Math.max(h - hb, Math.max(h - hc, h - hd))));
BlockData s = gen.sampleTrueBiome(x, z).getSlab().get(rng, x, h, z);
if(s != null)
{
if(!s.getMaterial().equals(AIR))
{
setPostBlock(x, h + 1, z, s, currentPostX, currentPostZ, currentData);
updateHeight(x, z, h + 1);
}
}
for(int i = h; i > h - max; i--)
{
@@ -63,17 +54,18 @@ public class PostWallPatcher extends IrisPostBlockFilter
if(d != null)
{
if(d.getMaterial().equals(AIR))
{
continue;
}
if(isAirOrWater(x, i, z, currentPostX, currentPostZ, currentData))
{
if(brokeGround)
{
return;
}
continue;
}
setPostBlock(x, i, z, d, currentPostX, currentPostZ, currentData);
brokeGround = true;
}
}
}

View File

@@ -36,21 +36,20 @@ public class PostWaterlogger extends IrisPostBlockFilter
if(b instanceof Waterlogged)
{
Waterlogged ww = (Waterlogged) b;
if(ww.isWaterlogged())
boolean w = false;
if(isWaterOrWaterlogged(x, h + 1, z, currentPostX, currentPostZ, currentData))
{
return;
w = true;
}
if(isWaterOrWaterlogged(x, h + 1, z, currentPostX, currentPostZ, currentData) && !ww.isWaterlogged())
else if((isWaterOrWaterlogged(x + 1, h, z, currentPostX, currentPostZ, currentData) || isWaterOrWaterlogged(x - 1, h, z, currentPostX, currentPostZ, currentData) || isWaterOrWaterlogged(x, h, z + 1, currentPostX, currentPostZ, currentData) || isWaterOrWaterlogged(x, h, z - 1, currentPostX, currentPostZ, currentData)))
{
ww.setWaterlogged(true);
setPostBlock(x, h, z, ww, currentPostX, currentPostZ, currentData);
w = true;
}
else if(!ww.isWaterlogged() && (isWaterOrWaterlogged(x + 1, h, z, currentPostX, currentPostZ, currentData) || isWaterOrWaterlogged(x - 1, h, z, currentPostX, currentPostZ, currentData) || isWaterOrWaterlogged(x, h, z + 1, currentPostX, currentPostZ, currentData) || isWaterOrWaterlogged(x, h, z - 1, currentPostX, currentPostZ, currentData)))
if(w != ww.isWaterlogged())
{
ww.setWaterlogged(true);
ww.setWaterlogged(w);
setPostBlock(x, h, z, ww, currentPostX, currentPostZ, currentData);
}
}