Restore 1.16.5 behaviour of InventoryDragEvent being called even when a single item is 'dragged' to its own slot
Ideally this would now be an InventoryClickEvent instead, but that is not so easy with the current structure. See https://www.spigotmc.org/threads/510208/page-9#post-4185501 for further info.
This commit is contained in:
parent
b42e708cf2
commit
384e116efc
@ -74,6 +74,15 @@
|
|||||||
public void b(ICrafting icrafting) {
|
public void b(ICrafting icrafting) {
|
||||||
this.containerListeners.remove(icrafting);
|
this.containerListeners.remove(icrafting);
|
||||||
}
|
}
|
||||||
|
@@ -338,7 +382,7 @@
|
||||||
|
}
|
||||||
|
} else if (this.quickcraftStatus == 2) {
|
||||||
|
if (!this.quickcraftSlots.isEmpty()) {
|
||||||
|
- if (this.quickcraftSlots.size() == 1) {
|
||||||
|
+ if (false && this.quickcraftSlots.size() == 1) { // CraftBukkit - treat everything as a drag since we are unable to easily call InventoryClickEvent instead
|
||||||
|
k = ((Slot) this.quickcraftSlots.iterator().next()).index;
|
||||||
|
this.e();
|
||||||
|
this.b(k, this.quickcraftType, InventoryClickType.PICKUP, entityhuman);
|
||||||
@@ -349,6 +393,7 @@
|
@@ -349,6 +393,7 @@
|
||||||
l = this.getCarried().getCount();
|
l = this.getCarried().getCount();
|
||||||
Iterator iterator = this.quickcraftSlots.iterator();
|
Iterator iterator = this.quickcraftSlots.iterator();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user