Deprecate for removal Block#isValidTool (#11439)

The method's implementation uses Block#getDrops
which re-computes the drops from the loot table each
call leading to isValidTool returning different values
with subsequent calls.
This commit is contained in:
Jake Potrebic 2024-09-27 09:28:04 -07:00 committed by GitHub
parent 01c4820450
commit 9c76642f99
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 18 additions and 13 deletions

View file

@ -5,10 +5,10 @@ Subject: [PATCH] Block Ticking API
diff --git a/src/main/java/org/bukkit/block/Block.java b/src/main/java/org/bukkit/block/Block.java
index 87327df6a37668eaf87394b6b049e6d4badec6df..a13c8ddd4a1222e7a16debb61769af3758502d7c 100644
index f7d999d702151b50fd6ed956b59645ae2820fd27..0efd8bb70ebdb86372022c9e12ec89f229ab3b52 100644
--- a/src/main/java/org/bukkit/block/Block.java
+++ b/src/main/java/org/bukkit/block/Block.java
@@ -589,6 +589,41 @@ public interface Block extends Metadatable, Translatable, net.kyori.adventure.tr
@@ -593,6 +593,41 @@ public interface Block extends Metadatable, Translatable, net.kyori.adventure.tr
* @return true if the block was destroyed
*/
boolean breakNaturally(@NotNull ItemStack tool, boolean triggerEffect, boolean dropExperience);