mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-12 08:17:35 +00:00
Fix ownership leak in ItemStackHandler (#6580)
- Triggered by invoking ItemStackHandler#extractItem with `simulate=true`
This commit is contained in:
1 parent
dd1d8737ad
commit
fcee09cab2
1 file changed
+5
-1
@@ -141,8 +141,12 @@ public class ItemStackHandler implements IItemHandler, IItemHandlerModifiable, I
|
||||
{
|
||||
this.stacks.set(slot, ItemStack.EMPTY);
|
||||
onContentsChanged(slot);
|
||||
return existing;
|
||||
}
|
||||
else
|
||||
{
|
||||
return existing.copy();
|
||||
}
|
||||
return existing;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user