From affe83c7dee4add1f9ae1dcf347cdd07244b7b0e Mon Sep 17 00:00:00 2001 From: Christian Date: Thu, 27 Dec 2012 23:20:21 -0500 Subject: [PATCH] Fix silly item stack displays with 3d items. Should help crystal chest performance --- .../mods/ironchest/client/TileEntityIronChestRenderer.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/IronChests2/common/cpw/mods/ironchest/client/TileEntityIronChestRenderer.java b/IronChests2/common/cpw/mods/ironchest/client/TileEntityIronChestRenderer.java index bf47c07..2362649 100644 --- a/IronChests2/common/cpw/mods/ironchest/client/TileEntityIronChestRenderer.java +++ b/IronChests2/common/cpw/mods/ironchest/client/TileEntityIronChestRenderer.java @@ -73,10 +73,10 @@ public class TileEntityIronChestRenderer extends TileEntitySpecialRenderer { itemRenderer = new RenderItem() { @Override public byte getMiniBlockCountForItemStack(ItemStack stack) { - return SignedBytes.saturatedCast((stack.stackSize / 32) + 1); + return SignedBytes.saturatedCast(Math.min(stack.stackSize / 32, 15) + 1); } public byte getMiniItemCountForItemStack(ItemStack stack) { - return SignedBytes.saturatedCast((stack.stackSize / 32) + 1); + return SignedBytes.saturatedCast(Math.min(stack.stackSize / 32, 7) + 1); }; public boolean shouldBob() { return false;