SPIGOT-5047: Correct slot types for 1.14 inventories

By: md_5 <git@md-5.net>
This commit is contained in:
Bukkit/Spigot
2019-06-13 21:25:58 +10:00
parent aa6ffe2455
commit 1399237b6b
2 changed files with 23 additions and 13 deletions

View File

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