3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-19 21:10:10 +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.
Dieser Commit ist enthalten in:
Celtic Minstrel 2012-03-13 20:33:43 -04:00 committet von EvilSeph
Ursprung f7da5d2ad7
Commit db5f804482

Datei anzeigen

@ -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);