diff --git a/paper-api/src/main/java/org/bukkit/event/inventory/InventoryType.java b/paper-api/src/main/java/org/bukkit/event/inventory/InventoryType.java index 23bea34240..75e719ae8e 100644 --- a/paper-api/src/main/java/org/bukkit/event/inventory/InventoryType.java +++ b/paper-api/src/main/java/org/bukkit/event/inventory/InventoryType.java @@ -54,7 +54,7 @@ public enum InventoryType { */ ENCHANTING(2,"Enchanting"), /** - * A brewing stand inventory, with one FUEL slot and three CRAFTING slots. + * A brewing stand inventory, with one FUEL slot and four CRAFTING slots. */ BREWING(5,"Brewing"), /** @@ -70,7 +70,7 @@ public enum InventoryType { */ CREATIVE(9,"Creative", false), /** - * The merchant inventory, with 2 TRADE-IN slots, and 1 RESULT slot. + * The merchant inventory, with 2 CRAFTING slots, and 1 RESULT slot. */ MERCHANT(3,"Villager", false), /** @@ -111,19 +111,19 @@ public enum InventoryType { */ SMOKER(3, "Smoker"), /** - * Loom inventory, with 3 INPUT slots, and 1 RESULT slot. + * Loom inventory, with 3 CRAFTING slots, and 1 RESULT slot. */ LOOM(4, "Loom"), /** - * Cartography inventory with 2 INPUT slots, and 1 RESULT slot. + * Cartography inventory with 2 CRAFTING slots, and 1 RESULT slot. */ CARTOGRAPHY(3, "Cartography Table"), /** - * Grindstone inventory with 2 INPUT slots, and 1 RESULT slot. + * Grindstone inventory with 2 CRAFTING slots, and 1 RESULT slot. */ GRINDSTONE(3, "Repair & Disenchant"), /** - * Stonecutter inventory with 1 INPUT slot, and 1 RESULT slot. + * Stonecutter inventory with 1 CRAFTING slot, and 1 RESULT slot. */ STONECUTTER(2, "Stonecutter") ; @@ -167,9 +167,7 @@ public enum InventoryType { */ RESULT, /** - * A slot in the crafting matrix, or the input slot in a furnace - * inventory, the potion slot in the brewing stand, or the enchanting - * slot. + * A slot in the crafting matrix, or an 'input' slot. */ CRAFTING, /** diff --git a/paper-api/src/main/java/org/bukkit/inventory/InventoryView.java b/paper-api/src/main/java/org/bukkit/inventory/InventoryView.java index f5fb03f1ee..62d79142ae 100644 --- a/paper-api/src/main/java/org/bukkit/inventory/InventoryView.java +++ b/paper-api/src/main/java/org/bukkit/inventory/InventoryView.java @@ -329,7 +329,9 @@ public abstract class InventoryView { InventoryType.SlotType type = InventoryType.SlotType.CONTAINER; if (slot >= 0 && slot < this.getTopInventory().getSize()) { switch(this.getType()) { + case BLAST_FURNACE: case FURNACE: + case SMOKER: if (slot == 2) { type = InventoryType.SlotType.RESULT; } else if(slot == 1) { @@ -356,6 +358,12 @@ public abstract class InventoryView { type = InventoryType.SlotType.CRAFTING; } break; + case BEACON: + type = InventoryType.SlotType.CRAFTING; + break; + case ANVIL: + case CARTOGRAPHY: + case GRINDSTONE: case MERCHANT: if (slot == 2) { type = InventoryType.SlotType.RESULT; @@ -363,11 +371,15 @@ public abstract class InventoryView { type = InventoryType.SlotType.CRAFTING; } break; - case BEACON: - type = InventoryType.SlotType.CRAFTING; + case STONECUTTER: + if (slot == 1) { + type = InventoryType.SlotType.RESULT; + } else { + type = InventoryType.SlotType.CRAFTING; + } break; - case ANVIL: - if (slot == 2) { + case LOOM: + if (slot == 3) { type = InventoryType.SlotType.RESULT; } else { type = InventoryType.SlotType.CRAFTING;