Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-15 19:10:09 +01:00
a981965852
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: b302317a SPIGOT-5877: Add scaffolding for custom dimensions and biomes ccccb625 SPIGOT-6417: Add Creeper fuse ticks API CraftBukkit Changes: 0e26ddb6 SPIGOT-5877: Add scaffolding for custom dimensions and biomes 170d6feb SPIGOT-6417: Add Creeper fuse ticks API
21 Zeilen
794 B
Diff
21 Zeilen
794 B
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Jake Potrebic <jake.m.potrebic@gmail.com>
|
|
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 13b0a5d44860a997fdad7fdf0e68ce72d1b375af..eeeaadbd3aa290fc916f0d465f10cad0687b900d 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
|
@@ -795,5 +795,9 @@ public class CraftBlock implements Block {
|
|
}
|
|
return speed;
|
|
}
|
|
+
|
|
+ public boolean isValidTool(ItemStack itemStack) {
|
|
+ return getDrops(itemStack).size() != 0;
|
|
+ }
|
|
// Paper end
|
|
}
|