32 lines
1.4 KiB
Diff
32 lines
1.4 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Blast-MC <cjblanton2@gmail.com>
|
|
Date: Fri, 15 Dec 2023 20:29:34 -0500
|
|
Subject: [PATCH] Add Block BreakNaturally Overload
|
|
|
|
|
|
diff --git a/src/main/java/org/bukkit/block/Block.java b/src/main/java/org/bukkit/block/Block.java
|
|
index ec7bb05c4fc2f0f1eb42c77dbe5e3eb6c340bdef..3d07006fbab3f075aa72114773ad8e76686b0ad2 100644
|
|
--- a/src/main/java/org/bukkit/block/Block.java
|
|
+++ b/src/main/java/org/bukkit/block/Block.java
|
|
@@ -594,6 +594,20 @@ public interface Block extends Metadatable, Translatable, net.kyori.adventure.tr
|
|
*/
|
|
boolean breakNaturally(@NotNull ItemStack tool, boolean triggerEffect, boolean dropExperience);
|
|
|
|
+ // Parchment Start
|
|
+ /**
|
|
+ * Breaks the block and spawns item drops as if a player had broken it
|
|
+ * with a specific tool
|
|
+ *
|
|
+ * @param player The player to break the block as
|
|
+ * @param tool The tool or item in hand used for digging
|
|
+ * @param triggerEffect Play the block break particle effect and sound
|
|
+ * @param dropExperience drop exp if the block normally does so
|
|
+ * @return true if the block was destroyed
|
|
+ */
|
|
+ boolean breakNaturally(Player player, @NotNull ItemStack tool, boolean triggerEffect, boolean dropExperience);
|
|
+ // Parchment end
|
|
+
|
|
/**
|
|
* Causes the block to be ticked, this is different from {@link Block#randomTick()},
|
|
* in that it is usually scheduled to occur, for example
|