geforkt von Mirrors/Paper
928bcc8d3a
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: 09943450 Update SnakeYAML version 5515734f SPIGOT-7162: Incorrect description for Entity#getVehicle javadoc 6f82b381 PR-788: Add getHand() to all relevant events CraftBukkit Changes: aaf484f6f SPIGOT-7163: CraftMerchantRecipe doesn't copy demand and specialPrice from BukkitMerchantRecipe 5329dd6fd PR-1107: Add getHand() to all relevant events 93061706e SPIGOT-7045: Ocelots never spawn with babies with spawn reason OCELOT_BABY
38 Zeilen
1.4 KiB
Diff
38 Zeilen
1.4 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
|
Date: Thu, 2 Jan 2020 12:25:16 -0600
|
|
Subject: [PATCH] Add effect to block break naturally
|
|
|
|
|
|
diff --git a/src/main/java/org/bukkit/block/Block.java b/src/main/java/org/bukkit/block/Block.java
|
|
index db441e463b02ee734f85c855f5538cd41041dbae..1e7ee68e56f8d4399c2cbf26aa45bf8b599b3b02 100644
|
|
--- a/src/main/java/org/bukkit/block/Block.java
|
|
+++ b/src/main/java/org/bukkit/block/Block.java
|
|
@@ -480,6 +480,26 @@ public interface Block extends Metadatable {
|
|
*/
|
|
boolean breakNaturally(@Nullable ItemStack tool);
|
|
|
|
+ // Paper start
|
|
+ /**
|
|
+ * Breaks the block and spawns item drops as if a player had broken it
|
|
+ *
|
|
+ * @param triggerEffect Play the block break particle effect and sound
|
|
+ * @return true if the block was destroyed
|
|
+ */
|
|
+ boolean breakNaturally(boolean triggerEffect);
|
|
+
|
|
+ /**
|
|
+ * Breaks the block and spawns item drops as if a player had broken it
|
|
+ * with a specific tool
|
|
+ *
|
|
+ * @param tool The tool or item in hand used for digging
|
|
+ * @param triggerEffect Play the block break particle effect and sound
|
|
+ * @return true if the block was destroyed
|
|
+ */
|
|
+ boolean breakNaturally(@NotNull ItemStack tool, boolean triggerEffect);
|
|
+ // Paper end
|
|
+
|
|
/**
|
|
* Simulate bone meal application to this block (if possible).
|
|
*
|