A few bin fixes

This commit is contained in:
Aidan C. Brady 2015-03-17 17:26:59 -04:00
parent 9a704f2812
commit 088cd2f4d3
3 changed files with 13 additions and 5 deletions

View file

@ -88,9 +88,10 @@ public class RenderBin extends TileEntitySpecialRenderer
TextureManager renderEngine = Minecraft.getMinecraft().renderEngine; TextureManager renderEngine = Minecraft.getMinecraft().renderEngine;
GL11.glDisable(GL11.GL_LIGHTING); GL11.glDisable(GL11.GL_LIGHTING);
GL11.glEnable(GL11.GL_DEPTH_TEST);
renderItem.renderItemAndEffectIntoGUI(func_147498_b()/*getFontRenderer()*/, renderEngine, itemStack, 0, 0); renderItem.renderItemAndEffectIntoGUI(func_147498_b()/*getFontRenderer()*/, renderEngine, itemStack, 0, 0);
GL11.glEnable(GL11.GL_LIGHTING); GL11.glEnable(GL11.GL_LIGHTING);
GL11.glPopMatrix(); GL11.glPopMatrix();
} }

View file

@ -364,9 +364,15 @@ public class TileEntityBin extends TileEntityBasicBlock implements ISidedInvento
} }
else if(i == 1) else if(i == 1)
{ {
if(isValid(itemstack)) if(itemstack == null)
{ {
add(itemstack); topStack = null;
}
else {
if(isValid(itemstack) && itemstack.stackSize > StackUtils.getSize(topStack))
{
add(StackUtils.size(itemstack, itemstack.stackSize-StackUtils.getSize(topStack)));
}
} }
} }
} }

View file

@ -170,8 +170,9 @@ public final class InventoryUtils
return toInsert; return toInsert;
} }
public static boolean areItemsStackable(ItemStack toInsert, ItemStack inSlot) { public static boolean areItemsStackable(ItemStack toInsert, ItemStack inSlot)
return inSlot.isItemEqual(toInsert) && ItemStack.areItemStackTagsEqual(inSlot, toInsert); {
return inSlot.isItemEqual(toInsert) && ItemStack.areItemStackTagsEqual(inSlot, toInsert);
} }
public static InvStack takeTopItem(IInventory inventory, int side) public static InvStack takeTopItem(IInventory inventory, int side)