De-deprecate BlockData#getDestroySpeed
This commit is contained in:
parent
f594b47eda
commit
3753d8b292
3 changed files with 195 additions and 17 deletions
|
@ -58,10 +58,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ *
|
||||
+ * @param itemStack {@link ItemStack} used to mine this Block
|
||||
+ * @return the speed that this Block will be mined by the given {@link ItemStack}
|
||||
+ * @deprecated the destroy speed of a block was never purely tied to an item stack. Since 1.21 enchantments
|
||||
+ * also use complex effects that require a consuming player to compute their effects, including mining efficiency.
|
||||
+ * @apiNote this method assumes default player state and hence, e.g., does not take into account changed
|
||||
+ * player attributes or potion effects.
|
||||
+ */
|
||||
+ @Deprecated(forRemoval = true, since = "1.21")
|
||||
+ default float getDestroySpeed(final @NotNull ItemStack itemStack) {
|
||||
+ return this.getDestroySpeed(itemStack, false);
|
||||
+ }
|
||||
|
@ -74,10 +73,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ * @param itemStack {@link ItemStack} used to mine this Block
|
||||
+ * @param considerEnchants true to look at enchants on the itemstack
|
||||
+ * @return the speed that this Block will be mined by the given {@link ItemStack}
|
||||
+ * @deprecated the destroy speed of a block was never purely tied to an item stack. Since 1.21 enchantments
|
||||
+ * also use complex effects that require a consuming player to compute their effects, including mining efficiency.
|
||||
+ * @apiNote this method assumes default player state and hence, e.g., does not take into account changed
|
||||
+ * player attributes or potion effects.
|
||||
+ */
|
||||
+ @Deprecated(forRemoval = true, since = "1.21")
|
||||
+ float getDestroySpeed(@NotNull ItemStack itemStack, boolean considerEnchants);
|
||||
+ // Paper end - destroy speed API
|
||||
}
|
||||
|
|
|
@ -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
|
||||
+
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue