mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-01 04:32:11 -07:00
Allow forcing break effects when using breakNaturally (#12734)
This commit is contained in:
@@ -591,6 +591,18 @@ public interface Block extends Metadatable, Translatable, net.kyori.adventure.tr
|
||||
*/
|
||||
boolean breakNaturally(@NotNull ItemStack tool, boolean triggerEffect, boolean dropExperience);
|
||||
|
||||
/**
|
||||
* 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
|
||||
* @param dropExperience drop exp if the block normally does so
|
||||
* @param forceEffect Forces the break effect to be triggered even if the tool is not the correct tool for the block
|
||||
* @return true if the block was destroyed
|
||||
*/
|
||||
boolean breakNaturally(@NotNull ItemStack tool, boolean triggerEffect, boolean dropExperience, boolean forceEffect);
|
||||
|
||||
/**
|
||||
* Causes the block to be ticked, this is different from {@link Block#randomTick()},
|
||||
* in that it is usually scheduled to occur, for example
|
||||
|
Reference in New Issue
Block a user