Added isItemValidForSlot check to hopper extraction (#3444)

(cherry picked from commit 0348760a77)
This commit is contained in:
LexManos committed 2016-12-05 12:06:16 -08:00
1 parent c1e832bff0
commit f9c74cfc77
1 file changed
+1 -1
@@ -59,7 +59,7 @@ public class VanillaInventoryCodeHooks
for (int j = 0; j < dest.getSizeInventory(); j++)
{
ItemStack destStack = dest.getStackInSlot(j);
if (destStack.func_190926_b() || destStack.func_190916_E() < destStack.getMaxStackSize() && destStack.func_190916_E() < dest.getInventoryStackLimit() && ItemHandlerHelper.canItemStacksStack(extractItem, destStack))
if (dest.isItemValidForSlot(j, extractItem) && (destStack.func_190926_b() || destStack.func_190916_E() < destStack.getMaxStackSize() && destStack.func_190916_E() < dest.getInventoryStackLimit() && ItemHandlerHelper.canItemStacksStack(extractItem, destStack)))
{
extractItem = handler.extractItem(i, 1, false);
if (destStack.func_190926_b())