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:
alexbegt 2017-04-26 20:28:39 -04:00
parent 07510cf030
commit 3561fb4bca
1 changed files with 2 additions and 2 deletions

View File

@ -35,7 +35,7 @@ public class TileEntityIronChestRenderer extends TileEntitySpecialRenderer<TileE
private ModelChest model; 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 }, 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 EntityItem customitem = new EntityItem(null);
private static float halfPI = (float) (Math.PI / 2D); private static float halfPI = (float) (Math.PI / 2D);
@ -163,7 +163,7 @@ public class TileEntityIronChestRenderer extends TileEntitySpecialRenderer<TileE
customitem.hoverStart = 0F; customitem.hoverStart = 0F;
for (ItemStack item : tile.getTopItemStacks()) for (ItemStack item : tile.getTopItemStacks())
{ {
if (shift > shifts.length) if (shift > shifts.length - 1)
{ {
break; break;
} }