Bugfixes for 13

This commit is contained in:
Daniel Mills 2020-10-16 09:50:27 -04:00
parent b9a447453f
commit 4ccfa8c3b6
2 changed files with 24 additions and 4 deletions

View File

@ -81,6 +81,7 @@ public abstract class ContextualTerrainProvider implements TerrainProvider, List
public ContextualTerrainProvider(TerrainTarget target)
{
metrics = new IrisMetrics(256);
warnings = new KSet<>();
this.target = target;
pushLatch = new ChronoLatch(3000);
@ -202,7 +203,7 @@ public abstract class ContextualTerrainProvider implements TerrainProvider, List
if(getNoLoot().size() > 1024)
{
//noinspection ListRemoveInLoop
// noinspection ListRemoveInLoop
for(int i = 0; i < 64; i++)
{
getNoLoot().remove(0);

View File

@ -100,7 +100,7 @@ public class AtomicSliver
public BlockData getOrNull(int h)
{
if(forgetful)
if(forgetful || oob(h))
{
return null;
}
@ -117,7 +117,7 @@ public class AtomicSliver
public void set(int h, BlockData d)
{
if(forgetful)
if(forgetful || oob(h))
{
return;
}
@ -138,7 +138,11 @@ public class AtomicSliver
if(d == null)
{
Iris.warn("Null set at " + h + " of " + x + " " + z);
return;
}
if(oob(h))
{
return;
}
@ -159,13 +163,28 @@ public class AtomicSliver
lock.unlock();
}
private boolean oob(int h)
{
return h > 255 || h < 0;
}
public boolean isSolid(int h)
{
if(oob(h))
{
return false;
}
return getType(h).isSolid();
}
public void set(int h, Biome d)
{
if(oob(h))
{
return;
}
lock.lock();
if(Iris.biome3d)