mirror of
https://github.com/PaperMC/Paper.git
synced 2025-03-13 11:18:23 +01:00
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. By: md_5 <git@md-5.net>
This commit is contained in:
parent
f359c7a3ec
commit
47c7562765
1 changed files with 9 additions and 0 deletions
|
@ -74,6 +74,15 @@
|
|||
public void b(ICrafting 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 @@
|
||||
l = this.getCarried().getCount();
|
||||
Iterator iterator = this.quickcraftSlots.iterator();
|
||||
|
|
Loading…
Add table
Reference in a new issue