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;
|
private ModelChest model;
|
||||||
|
|
||||||
//@formatter:off
|
//@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
|
//@formatter:on
|
||||||
|
|
||||||
private static EntityItem customitem = new EntityItem(null);
|
private static EntityItem customitem = new EntityItem(null);
|
||||||
|
@ -179,7 +188,7 @@ public class TileEntityIronChestRenderer extends TileEntitySpecialRenderer<TileE
|
||||||
|
|
||||||
for (ItemStack item : te.getTopItems())
|
for (ItemStack item : te.getTopItems())
|
||||||
{
|
{
|
||||||
if (shift > shifts.length)
|
if (shift > shifts.length || shift > 8)
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -181,7 +181,7 @@ public class TileEntityIronShulkerBoxRenderer extends TileEntitySpecialRenderer<
|
||||||
|
|
||||||
for (ItemStack item : te.getTopItems())
|
for (ItemStack item : te.getTopItems())
|
||||||
{
|
{
|
||||||
if (shift > shifts.length)
|
if (shift > shifts.length || shift > 8)
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue