Add a Slot#isSameInventory() method (#2884)

This fixes shift + double clicking items in Containers that use
SlotItemHandler slots.
This commit is contained in:
Matti Ruohonen authored and LexManos committed 2016-06-03 17:26:51 -07:00
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;
}
}