mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-12 16:27:47 +00:00
Added isItemValidForSlot check to hopper extraction (#3444)
This commit is contained in:
1 parent
2f802b6d71
commit
0348760a77
1 file changed
+1
-1
@@ -50,7 +50,7 @@ public class VanillaInventoryCodeHooks
|
||||
for (int j = 0; j < dest.getSizeInventory(); j++)
|
||||
{
|
||||
ItemStack destStack = dest.getStackInSlot(j);
|
||||
if (destStack == null || destStack.stackSize < destStack.getMaxStackSize() && destStack.stackSize < dest.getInventoryStackLimit() && ItemHandlerHelper.canItemStacksStack(extractItem, destStack))
|
||||
if (dest.isItemValidForSlot(j, extractItem) && (destStack == null || destStack.stackSize < destStack.getMaxStackSize() && destStack.stackSize < dest.getInventoryStackLimit() && ItemHandlerHelper.canItemStacksStack(extractItem, destStack)))
|
||||
{
|
||||
extractItem = handler.extractItem(i, 1, false);
|
||||
if (destStack == null)
|
||||
|
||||
Reference in new issue
Block a user