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 0015bb89899e52d3c8f1ca68807ad7092e690305..2c384d6c1719a3b2b1335a3f2b7e826c1892bd69 100644
|
|
--- a/src/main/java/org/bukkit/block/Block.java
|
|
+++ b/src/main/java/org/bukkit/block/Block.java
|
|
@@ -590,6 +590,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
|