Add forRemoval to material data deprecations (#10996)

2018 is calling
This commit is contained in:
Nassim Jahnke 2024-06-29 10:58:37 +02:00 committed by GitHub
parent 1f5db50424
commit aa8d38d3db
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
19 changed files with 871 additions and 44 deletions

File diff suppressed because it is too large Load Diff

View File

@ -20,7 +20,7 @@ index da997507b96908027c49dabc6daf7c787dcad95d..cb7aef53cbffc76dea9fec28445ea8ae
// Paper end
}
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
index d5dd79c98f4d37b09d232214f06ed7dca3a7e6dd..abdb3b5d3bc96fc48ee53208f77ae0f9c295d771 100644
index e9c29fc1db686b80bc2477d78ec2b361b8600b9e..4b4c364dad70126dee17aabca2c3da9f148dd6d0 100644
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
@@ -661,6 +661,30 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat

View File

@ -526,7 +526,7 @@ index 5bd252c0ae3b09fe141d131360c67bb9bfbf5422..78587d9fabe6371a23a7963917b054db
+
}
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
index abdb3b5d3bc96fc48ee53208f77ae0f9c295d771..03f50bcf60ce868d633912e53e804a2b25999f6e 100644
index 4b4c364dad70126dee17aabca2c3da9f148dd6d0..ef36a696f2f926d70c5d93ce08f75fa9a749e32f 100644
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
@@ -27,7 +27,7 @@ import org.jetbrains.annotations.Nullable;

View File

@ -24,7 +24,7 @@ index 88852215d01f3fc4866449f7b826f6603b0ed9d8..f7548098bcdd033d9c530fdc584fc553
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/entity/Minecart.java b/src/main/java/org/bukkit/entity/Minecart.java
index 7f9c4d4b430a3f0276461346ff2621bacf864075..bc1e62759c995a1463ebcd10d73c7d502c9acc45 100644
index a1e4328994a119de2966dce5470581b5a520d55e..d1f602faa34cc5cc4563e18b63a40078e406641d 100644
--- a/src/main/java/org/bukkit/entity/Minecart.java
+++ b/src/main/java/org/bukkit/entity/Minecart.java
@@ -1,5 +1,6 @@

View File

@ -110,7 +110,7 @@ index e7931f73f10fe35ebd5fe4a04b036d53bb117ebd..cbce835ed6d44e5b8c9aaae4e36a77f8
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
index 03f50bcf60ce868d633912e53e804a2b25999f6e..e2f8a0d3a9dcab3fce2d71221751434abc9ab94f 100644
index ef36a696f2f926d70c5d93ce08f75fa9a749e32f..fb1d7ff51f267225ac76c29a56d67fb443d3a92f 100644
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
@@ -907,5 +907,17 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat

View File

@ -25,7 +25,7 @@ index 8635846c9f672e39f0929eec7bf83b22536ed284..51f1a09164d501de6d2561ed90175f2c
// Paper end
}
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
index e2f8a0d3a9dcab3fce2d71221751434abc9ab94f..057c87bc25b23f5fb3c34d0de781b7e125921439 100644
index fb1d7ff51f267225ac76c29a56d67fb443d3a92f..b38154b45935ec45154e89277a8c2b1b9e46522d 100644
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
@@ -919,5 +919,27 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat

View File

@ -5,7 +5,7 @@ Subject: [PATCH] ItemStack#editMeta
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
index 057c87bc25b23f5fb3c34d0de781b7e125921439..7915521e3640ffc12d87dbbab4cd1a777e3801c9 100644
index b38154b45935ec45154e89277a8c2b1b9e46522d..7789c57ee27dc0e95764a6a5830de4cba210aa3b 100644
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
@@ -574,6 +574,50 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat

View File

@ -380,7 +380,7 @@ index c4537080ee1875e984356eee42337a1342f4c9a3..f89edd9c129802f70eac022ff6bf80be
* Gets the entity's absorption amount.
*
diff --git a/src/main/java/org/bukkit/entity/Enderman.java b/src/main/java/org/bukkit/entity/Enderman.java
index 58191017244f3949f6174fb108e3a245738a53c4..61672c6faf94aa497145aadd634bb10103c7b05a 100644
index 875817b807c9f515eb07b03cc85d368955388dc3..db01cc952f0a0efd799454d6c86ee4c250e852d8 100644
--- a/src/main/java/org/bukkit/entity/Enderman.java
+++ b/src/main/java/org/bukkit/entity/Enderman.java
@@ -86,4 +86,36 @@ public interface Enderman extends Monster {

View File

@ -49,7 +49,7 @@ index 6ada8c036f1a112f11a9fbc3baf1f79b3f1bfc8e..02361d58ac723d02d93db80a721b27d3
/**
diff --git a/src/main/java/org/bukkit/block/BlockState.java b/src/main/java/org/bukkit/block/BlockState.java
index fd4a9bdcfb6775dfbdb7492e6c9eb90722d2ecdc..e573e70d9e74e444783a7363e6cdac126124d86d 100644
index f4a739d8022d19a7ae0ee9bf93eb5c4846b4bd40..94e1278340c0d9d2be9edc68f645414380aab353 100644
--- a/src/main/java/org/bukkit/block/BlockState.java
+++ b/src/main/java/org/bukkit/block/BlockState.java
@@ -245,4 +245,13 @@ public interface BlockState extends Metadatable {

View File

@ -70,7 +70,7 @@ index 96546712f788e091749a1b4eebc6b1d6c3db7814..bd0e55562f1cabef3078573182e0cf9f
+ // Paper end - enchantWithLevels API
}
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
index 7915521e3640ffc12d87dbbab4cd1a777e3801c9..c9fc93b2f4f3cf971ccb496cafce44c93c4b83c6 100644
index 7789c57ee27dc0e95764a6a5830de4cba210aa3b..ab74890e9b6a13b76756f884d6d176bb45470191 100644
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
@@ -678,6 +678,24 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat

View File

@ -7,7 +7,7 @@ Originally added isPreferredTool to BlockData but
upstream added that.
diff --git a/src/main/java/org/bukkit/block/BlockState.java b/src/main/java/org/bukkit/block/BlockState.java
index e573e70d9e74e444783a7363e6cdac126124d86d..80e5d39afe8a6cf882b29c0da78450b958812137 100644
index 94e1278340c0d9d2be9edc68f645414380aab353..8c7c8c0e54682dc4276109d19d92394cdd4bc189 100644
--- a/src/main/java/org/bukkit/block/BlockState.java
+++ b/src/main/java/org/bukkit/block/BlockState.java
@@ -253,5 +253,41 @@ public interface BlockState extends Metadatable {

View File

@ -66,7 +66,7 @@ index 8dd993ce32686431e1c759d446a3620cb52f7ec1..0d665a31152c9a667576f2e9d91ffec5
+ // Paper end - ItemStack damage API
}
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
index c9fc93b2f4f3cf971ccb496cafce44c93c4b83c6..db128d14931ec2afea5205faa58fb5410ec9a54c 100644
index ab74890e9b6a13b76756f884d6d176bb45470191..659191a226cae406a14c67cc0992f7026f6188e6 100644
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
@@ -1003,5 +1003,19 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat

View File

@ -6,7 +6,7 @@ Subject: [PATCH] Allow proper checking of empty item stacks
This adds a method to check if an item stack is empty or not. This mirrors vanilla's implementation of the same method.
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
index db128d14931ec2afea5205faa58fb5410ec9a54c..9d397c395d777f337a421fac8fea064680065661 100644
index 659191a226cae406a14c67cc0992f7026f6188e6..5b918d510b9c8a6f8c6d146e90e1d0ef4a204b5a 100644
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
@@ -1017,5 +1017,24 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat

View File

@ -9,7 +9,7 @@ By removing this check we avoid unnecessarily allocating useless `ItemMeta` obje
This is a leftover from when checking for the item's durability was "free" because the durability was stored in the `ItemStack` itself, this [was changed in Minecraft 1.13](https://hub.spigotmc.org/stash/projects/SPIGOT/repos/bukkit/commits/f8b2086d60942eb2cd7ac25a2a1408cb790c222c#src/main/java/org/bukkit/inventory/ItemStack.java).
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
index 9d397c395d777f337a421fac8fea064680065661..c5e22bca27f3199eb2a466f41aa82047f5fd0e44 100644
index 5b918d510b9c8a6f8c6d146e90e1d0ef4a204b5a..13d035ace9fbe93c3754595ac6cadbfbe30062a5 100644
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
@@ -307,7 +307,7 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat

View File

@ -119,7 +119,7 @@ index 3f1b48fd65df954e874e6dc6b9093cb12370e2c5..0e9ccfee7a03d341e7c4d271f53b4ed1
+ @NotNull java.util.List<net.kyori.adventure.text.Component> computeTooltipLines(@NotNull ItemStack itemStack, @NotNull io.papermc.paper.inventory.tooltip.TooltipContext tooltipContext, @Nullable org.bukkit.entity.Player player); // Paper - expose itemstack tooltip lines
}
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
index c5e22bca27f3199eb2a466f41aa82047f5fd0e44..235d41b0078bb513470b17a0dad46fae3ac73a16 100644
index 13d035ace9fbe93c3754595ac6cadbfbe30062a5..718070359c644de65c8fc2b34ad39913525d18c6 100644
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
@@ -1037,4 +1037,21 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Deprecate ItemStack#setType
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
index 235d41b0078bb513470b17a0dad46fae3ac73a16..2866f10f954f6d3fb1d58c216a2d5ae1372adbad 100644
index 718070359c644de65c8fc2b34ad39913525d18c6..5b261bcffa7d04c9e7db57fee37d4a1471cbbd64 100644
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
@@ -143,8 +143,18 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat

View File

@ -47,7 +47,7 @@ index 5b8dac777bb1640dc00bbe98feb6460c36eebb98..1af15fd327e0613cd1a179bd7fef1e83
/**
* Setting to show/hide item-specific information, including, but not limited to:
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
index 2866f10f954f6d3fb1d58c216a2d5ae1372adbad..7f5633e7689b82b937d5b985c3e6ae15dc94a20f 100644
index 5b261bcffa7d04c9e7db57fee37d4a1471cbbd64..1d2ffdf88daa9186993c69c5ab2b96520b41920b 100644
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
@@ -588,6 +588,13 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat

View File

@ -16,7 +16,7 @@ index 7332034bb1753f48f7904dafab1ef4b3ee117ea3..11bccf6c27b8b2a2ed558a1375a3b3ad
+ ItemStack createEmptyStack(); // Paper - proxy ItemStack
}
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
index 7f5633e7689b82b937d5b985c3e6ae15dc94a20f..2b414b01f80f9c683381c92deb1fca2ec15be2c7 100644
index 1d2ffdf88daa9186993c69c5ab2b96520b41920b..4fe68a22576933676271f841a5af0ee45b90216f 100644
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
@@ -28,10 +28,38 @@ import org.jetbrains.annotations.Nullable;

View File

@ -207,7 +207,7 @@ index 0000000000000000000000000000000000000000..9789916f949374bfb50da535b0761807
+ @NonNull PersistentDataContainerView getPersistentDataContainer();
+}
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
index 2b414b01f80f9c683381c92deb1fca2ec15be2c7..8bbd98ea729755e7666403b96f277fd419560951 100644
index 4fe68a22576933676271f841a5af0ee45b90216f..b3abe3bde05d4a360e31e490bff8a859dc2bd4a6 100644
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
@@ -27,7 +27,7 @@ import org.jetbrains.annotations.Nullable;