Deprecate BlockData#getDestroySpeed for removal

The method sadly is not usable in 1.21 without a player as all of an
enchantments attribtue modifiers rely on a base value supplied by a
player. The method could only offer a rough estimate based on some
default values, however a better method for this should be added down
the line rather than trying to force such logic into the existing one.
This commit is contained in:
Bjarne Koll
2024-06-16 00:19:10 +02:00
parent 26f246b908
commit a2c7a9b490
3 changed files with 17 additions and 8 deletions

View File

@@ -55,7 +55,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
--- a/src/main/java/org/bukkit/block/data/BlockData.java
+++ b/src/main/java/org/bukkit/block/data/BlockData.java
@@ -0,0 +0,0 @@ public interface BlockData extends Cloneable {
*/
@Deprecated(forRemoval = true, since = "1.21")
float getDestroySpeed(@NotNull ItemStack itemStack, boolean considerEnchants);
// Paper end - destroy speed API
+