mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-12 08:17:35 +00:00
Fix improper logic in ItemHandlerHelper.giveItemToPlayer causing some items to not be added. Closes #2705
This commit is contained in:
1 parent
9f1505dd53
commit
ce4bb8fe93
1 file changed
+2
-2
@@ -142,7 +142,7 @@ public class ItemHandlerHelper
|
||||
World world = player.worldObj;
|
||||
|
||||
// try adding it into the inventory
|
||||
ItemStack remainder = null;
|
||||
ItemStack remainder = stack;
|
||||
// insert into preferred slot first
|
||||
if(preferredSlot >= 0)
|
||||
{
|
||||
@@ -151,7 +151,7 @@ public class ItemHandlerHelper
|
||||
// then into the inventory in general
|
||||
if(remainder != null)
|
||||
{
|
||||
remainder = insertItemStacked(inventory, stack, false);
|
||||
remainder = insertItemStacked(inventory, remainder, false);
|
||||
}
|
||||
|
||||
// play sound if something got picked up
|
||||
|
||||
Reference in new issue
Block a user