mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-01 12:42:05 -07:00
So it begins...
This commit is contained in:
20
patches/unapplied/server/Add-Block-isValidTool.patch
Normal file
20
patches/unapplied/server/Add-Block-isValidTool.patch
Normal file
@@ -0,0 +1,20 @@
|
||||
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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
||||
@@ -0,0 +0,0 @@ public class CraftBlock implements Block {
|
||||
public String translationKey() {
|
||||
return this.getNMS().getBlock().getDescriptionId();
|
||||
}
|
||||
+
|
||||
+ public boolean isValidTool(ItemStack itemStack) {
|
||||
+ return getDrops(itemStack).size() != 0;
|
||||
+ }
|
||||
// Paper end
|
||||
}
|
Reference in New Issue
Block a user