Fix the Crystal Chest crashing users due to a overflow of the array when it tries to get a value that doesn't exist. Closes #10.
This commit is contained in:
parent
07510cf030
commit
3561fb4bca
|
|
@ -35,7 +35,7 @@ public class TileEntityIronChestRenderer extends TileEntitySpecialRenderer<TileE
|
|||
private ModelChest model;
|
||||
|
||||
private static float[][] shifts = { { 0.3F, 0.45F, 0.3F }, { 0.7F, 0.45F, 0.3F }, { 0.3F, 0.45F, 0.7F }, { 0.7F, 0.45F, 0.7F }, { 0.3F, 0.1F, 0.3F },
|
||||
{ 0.7F, 0.1F, 0.3F }, { 0.3F, 0.1F, 0.7F }, { 0.7F, 0.1F, 0.7F }, { 0.5F, 0.32F, 0.5F }, };
|
||||
{ 0.7F, 0.1F, 0.3F }, { 0.3F, 0.1F, 0.7F }, { 0.7F, 0.1F, 0.7F }, { 0.5F, 0.32F, 0.5F } };
|
||||
private static EntityItem customitem = new EntityItem(null);
|
||||
private static float halfPI = (float) (Math.PI / 2D);
|
||||
|
||||
|
|
@ -163,7 +163,7 @@ public class TileEntityIronChestRenderer extends TileEntitySpecialRenderer<TileE
|
|||
customitem.hoverStart = 0F;
|
||||
for (ItemStack item : tile.getTopItemStacks())
|
||||
{
|
||||
if (shift > shifts.length)
|
||||
if (shift > shifts.length - 1)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue