mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-07-19 18:55:18 +00:00
Bugfixes for 13
This commit is contained in:
parent
b9a447453f
commit
4ccfa8c3b6
@ -81,6 +81,7 @@ public abstract class ContextualTerrainProvider implements TerrainProvider, List
|
|||||||
|
|
||||||
public ContextualTerrainProvider(TerrainTarget target)
|
public ContextualTerrainProvider(TerrainTarget target)
|
||||||
{
|
{
|
||||||
|
metrics = new IrisMetrics(256);
|
||||||
warnings = new KSet<>();
|
warnings = new KSet<>();
|
||||||
this.target = target;
|
this.target = target;
|
||||||
pushLatch = new ChronoLatch(3000);
|
pushLatch = new ChronoLatch(3000);
|
||||||
@ -202,7 +203,7 @@ public abstract class ContextualTerrainProvider implements TerrainProvider, List
|
|||||||
|
|
||||||
if(getNoLoot().size() > 1024)
|
if(getNoLoot().size() > 1024)
|
||||||
{
|
{
|
||||||
//noinspection ListRemoveInLoop
|
// noinspection ListRemoveInLoop
|
||||||
for(int i = 0; i < 64; i++)
|
for(int i = 0; i < 64; i++)
|
||||||
{
|
{
|
||||||
getNoLoot().remove(0);
|
getNoLoot().remove(0);
|
||||||
|
@ -100,7 +100,7 @@ public class AtomicSliver
|
|||||||
|
|
||||||
public BlockData getOrNull(int h)
|
public BlockData getOrNull(int h)
|
||||||
{
|
{
|
||||||
if(forgetful)
|
if(forgetful || oob(h))
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@ -117,7 +117,7 @@ public class AtomicSliver
|
|||||||
|
|
||||||
public void set(int h, BlockData d)
|
public void set(int h, BlockData d)
|
||||||
{
|
{
|
||||||
if(forgetful)
|
if(forgetful || oob(h))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -138,7 +138,11 @@ public class AtomicSliver
|
|||||||
|
|
||||||
if(d == null)
|
if(d == null)
|
||||||
{
|
{
|
||||||
Iris.warn("Null set at " + h + " of " + x + " " + z);
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(oob(h))
|
||||||
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -159,13 +163,28 @@ public class AtomicSliver
|
|||||||
lock.unlock();
|
lock.unlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private boolean oob(int h)
|
||||||
|
{
|
||||||
|
return h > 255 || h < 0;
|
||||||
|
}
|
||||||
|
|
||||||
public boolean isSolid(int h)
|
public boolean isSolid(int h)
|
||||||
{
|
{
|
||||||
|
if(oob(h))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
return getType(h).isSolid();
|
return getType(h).isSolid();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void set(int h, Biome d)
|
public void set(int h, Biome d)
|
||||||
{
|
{
|
||||||
|
if(oob(h))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
lock.lock();
|
lock.lock();
|
||||||
|
|
||||||
if(Iris.biome3d)
|
if(Iris.biome3d)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user