mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-27 21:19:00 +01:00
[Bleeding] Check top inventory type when determining whether a click event is a craft event. Fixes BUKKIT-1112
- Credit to Taufiq Hoven for locating the root cause of the issue.
This commit is contained in:
parent
f7da5d2ad7
commit
db5f804482
@ -1147,8 +1147,8 @@ public class NetServerHandler extends NetHandler implements ICommandListener {
|
||||
SlotType type = CraftInventoryView.getSlotType(inventory, packet102windowclick.slot);
|
||||
|
||||
InventoryClickEvent event;
|
||||
if (inventory instanceof CraftingInventory) {
|
||||
Recipe recipe = ((CraftingInventory)inventory.getTopInventory()).getRecipe();
|
||||
if (packet102windowclick.slot == 0 && inventory.getTopInventory() instanceof CraftingInventory) {
|
||||
Recipe recipe = ((CraftingInventory) inventory.getTopInventory()).getRecipe();
|
||||
event = new CraftItemEvent(recipe, inventory, type, packet102windowclick.slot, packet102windowclick.button != 0, packet102windowclick.shift);
|
||||
} else {
|
||||
event = new InventoryClickEvent(inventory, type, packet102windowclick.slot, packet102windowclick.button != 0, packet102windowclick.shift);
|
||||
|
Loading…
Reference in New Issue
Block a user