This commit is contained in:
Daniel Mills 2020-10-31 19:26:06 -04:00
parent 7f3b9ec89a
commit 736deca1fc

View File

@ -45,6 +45,11 @@ public class GenLayerUpdate extends BlockPopulator
@Override @Override
public void populate(World w, Random r, Chunk c) public void populate(World w, Random r, Chunk c)
{ {
if(gen == null)
{
return;
}
AtomicSliverMap map = null; AtomicSliverMap map = null;
try try
@ -57,15 +62,23 @@ public class GenLayerUpdate extends BlockPopulator
map = new AtomicSliverMap(); map = new AtomicSliverMap();
} }
RNG rx = rng.nextParallelRNG(c.getX() + r.nextInt()).nextParallelRNG(c.getZ() + r.nextInt()); try
if(gen.getDimension().isVanillaCaves())
{ {
generateDepositsWithVanillaSaftey(w, rx, c); RNG rx = rng.nextParallelRNG(c.getX() + r.nextInt()).nextParallelRNG(c.getZ() + r.nextInt());
if(gen.getDimension().isVanillaCaves())
{
generateDepositsWithVanillaSaftey(w, rx, c);
}
updateBlocks(rx, c, map);
spawnInitials(c, rx);
} }
updateBlocks(rx, c, map); catch(Throwable e)
spawnInitials(c, rx); {
}
} }
public void spawnInitials(Chunk c, RNG rx) public void spawnInitials(Chunk c, RNG rx)