mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-12 16:27:47 +00:00
Add a Slot#isSameInventory() method (#2884)
This fixes shift + double clicking items in Containers that use SlotItemHandler slots.
This commit is contained in:
1 parent
6ca018c2b5
commit
13ed510fcf
3 files changed
+26
-1
No files matched your search
@@ -77,4 +77,10 @@ public class SlotItemHandler extends Slot
|
||||
{
|
||||
return itemHandler;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSameInventory(Slot other)
|
||||
{
|
||||
return other instanceof SlotItemHandler && ((SlotItemHandler) other).getItemHandler() == this.itemHandler;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user