Make sure the Shift never goes past the max value. Closes #130
This commit is contained in:
parent
c9c1c30d3b
commit
ba6bf6831f
|
@ -37,7 +37,16 @@ public class TileEntityIronChestRenderer extends TileEntitySpecialRenderer<TileE
|
|||
private ModelChest model;
|
||||
|
||||
//@formatter:off
|
||||
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 } };
|
||||
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 } };
|
||||
//@formatter:on
|
||||
|
||||
private static EntityItem customitem = new EntityItem(null);
|
||||
|
@ -179,7 +188,7 @@ public class TileEntityIronChestRenderer extends TileEntitySpecialRenderer<TileE
|
|||
|
||||
for (ItemStack item : te.getTopItems())
|
||||
{
|
||||
if (shift > shifts.length)
|
||||
if (shift > shifts.length || shift > 8)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -181,7 +181,7 @@ public class TileEntityIronShulkerBoxRenderer extends TileEntitySpecialRenderer<
|
|||
|
||||
for (ItemStack item : te.getTopItems())
|
||||
{
|
||||
if (shift > shifts.length)
|
||||
if (shift > shifts.length || shift > 8)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue