diff options
Diffstat (limited to 'patches/server/0603-Add-Block-isValidTool.patch')
-rw-r--r-- | patches/server/0603-Add-Block-isValidTool.patch | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/patches/server/0603-Add-Block-isValidTool.patch b/patches/server/0603-Add-Block-isValidTool.patch new file mode 100644 index 0000000000..95bf6c3432 --- /dev/null +++ b/patches/server/0603-Add-Block-isValidTool.patch @@ -0,0 +1,20 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Jake Potrebic <[email protected]> +Date: Mon, 6 Jul 2020 12:44:31 -0700 +Subject: [PATCH] Add Block#isValidTool + + +diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java +index 817d7143fb60916a6747ee4b9f7c77becd9071c1..1bd1f5993fc296b7d8255cabaf28382c2e258099 100644 +--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java ++++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java +@@ -718,5 +718,9 @@ public class CraftBlock implements Block { + } + return speed; + } ++ ++ public boolean isValidTool(ItemStack itemStack) { ++ return getDrops(itemStack).size() != 0; ++ } + // Paper end + } |