Skip to content

Commit

Permalink
Merge pull request #269 from way2muchnoise/1.7-update
Browse files Browse the repository at this point in the history
fixes #268
  • Loading branch information
jakimfett committed Oct 16, 2014
2 parents 8d52334 + 991aebe commit b9cd1a6
Showing 1 changed file with 3 additions and 15 deletions.
18 changes: 3 additions & 15 deletions src/main/java/minechem/tileentity/prefab/TileEntityProxy.java
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ public void closeInventory()
@Override
public boolean isItemValidForSlot(int i, ItemStack itemstack)
{
if (this.getManager() != null && this.getManager() instanceof ISidedInventory)
if (this.manager != null && this.manager != this)
{
return ((ISidedInventory) this.getManager()).isItemValidForSlot(i, itemstack);
}
Expand All @@ -225,21 +225,9 @@ public boolean isItemValidForSlot(int i, ItemStack itemstack)
@Override
public int[] getAccessibleSlotsFromSide(int var1)
{
if (this.getManager() != null && this.getManager() instanceof ISidedInventory)
if (this.manager != null && this.manager != this)
{
try
{
return ((ISidedInventory) this.getManager()).getAccessibleSlotsFromSide(var1);
} catch (StackOverflowError o)
{
// wrapped in a try-catch
// prevents right clicking failure
// with a buildcraft pipe
if (Settings.DebugMode)
{
Minechem.LOGGER.info("TileEntity generated a StackOverflowError at: x" + this.xCoord + " y" + this.yCoord + " z" + this.zCoord);
}
}
return ((ISidedInventory) this.getManager()).getAccessibleSlotsFromSide(var1);
}
return new int[0];
}
Expand Down

0 comments on commit b9cd1a6

Please sign in to comment.