Paper/patches/api/0417-Properly-remove-the-experimental-smithing-inventory-.patch

43 lines
1.8 KiB
Diff
Raw Normal View History

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Jake Potrebic <jake.m.potrebic@gmail.com>
Date: Thu, 8 Jun 2023 14:45:30 -0700
Subject: [PATCH] Properly remove the experimental smithing inventory type
diff --git a/src/main/java/org/bukkit/event/inventory/InventoryType.java b/src/main/java/org/bukkit/event/inventory/InventoryType.java
index b821fa535b23fe5af5884e536b1708460076ee40..daddb12947e61ee69c100b422f6d07d49f76d724 100644
--- a/src/main/java/org/bukkit/event/inventory/InventoryType.java
+++ b/src/main/java/org/bukkit/event/inventory/InventoryType.java
@@ -146,9 +146,9 @@ public enum InventoryType {
/**
* The new smithing inventory, with 3 CRAFTING slots and 1 RESULT slot.
*
- * @apiNote draft, experimental 1.20 API
+ * @deprecated use {@link #SMITHING}
*/
- @MinecraftExperimental
+ @Deprecated(forRemoval = true) // Paper
SMITHING_NEW(4, "Upgrade Gear"),
;
diff --git a/src/main/java/org/bukkit/inventory/InventoryView.java b/src/main/java/org/bukkit/inventory/InventoryView.java
index 002acfbdce1db10f7ba1b6a013e678f504ac6e69..77a0cd901038405ed0e267f0432f13deccae3ab5 100644
--- a/src/main/java/org/bukkit/inventory/InventoryView.java
+++ b/src/main/java/org/bukkit/inventory/InventoryView.java
@@ -370,7 +370,6 @@ public abstract class InventoryView {
type = InventoryType.SlotType.CRAFTING;
break;
case ANVIL:
- case SMITHING:
case CARTOGRAPHY:
case GRINDSTONE:
case MERCHANT:
@@ -388,6 +387,7 @@ public abstract class InventoryView {
}
break;
case LOOM:
+ case SMITHING: // Paper
case SMITHING_NEW:
if (slot == 3) {
type = InventoryType.SlotType.RESULT;