Fix crash issues

This commit is contained in:
Daniel Mills
2020-10-12 19:59:24 -04:00
parent e72ea21b6b
commit ac2dcee6c3
3 changed files with 20 additions and 7 deletions

View File

@@ -48,7 +48,12 @@ public class AtomicSliver
public Material getType(int h)
{
return get(h).getMaterial();
return getTypeSafe(h);
}
public Material getTypeSafe(int h)
{
return get(h > 255 ? 255 : h < 0 ? 0 : h).getMaterial();
}
public KList<Byte> getUpdatables()