Fix improper logic in ItemHandlerHelper.giveItemToPlayer causing some items to not be added. Closes #2705

This commit is contained in:
LexManos 2016-04-04 15:44:03 -07:00
parent 9f1505dd53
commit ce4bb8fe93

View file

@ -142,7 +142,7 @@ public class ItemHandlerHelper
World world = player.worldObj; World world = player.worldObj;
// try adding it into the inventory // try adding it into the inventory
ItemStack remainder = null; ItemStack remainder = stack;
// insert into preferred slot first // insert into preferred slot first
if(preferredSlot >= 0) if(preferredSlot >= 0)
{ {
@ -151,7 +151,7 @@ public class ItemHandlerHelper
// then into the inventory in general // then into the inventory in general
if(remainder != null) if(remainder != null)
{ {
remainder = insertItemStacked(inventory, stack, false); remainder = insertItemStacked(inventory, remainder, false);
} }
// play sound if something got picked up // play sound if something got picked up