mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-06 10:44:39 +01:00
SPIGOT-7568: Call EntityChangeBlockEvent for DecoratedPot
By: Doc <nachito94@msn.com>
This commit is contained in:
parent
f5b984c8a0
commit
67ab2cd516
1 changed files with 14 additions and 0 deletions
|
@ -0,0 +1,14 @@
|
|||
--- a/net/minecraft/world/level/block/DecoratedPotBlock.java
|
||||
+++ b/net/minecraft/world/level/block/DecoratedPotBlock.java
|
||||
@@ -230,6 +230,11 @@
|
||||
BlockPosition blockposition = movingobjectpositionblock.getBlockPos();
|
||||
|
||||
if (!world.isClientSide && iprojectile.mayInteract(world, blockposition) && iprojectile.mayBreak(world)) {
|
||||
+ // CraftBukkit start - call EntityChangeBlockEvent
|
||||
+ if (!org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(iprojectile, blockposition, this.getFluidState(iblockdata).createLegacyBlock())) {
|
||||
+ return;
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
world.setBlock(blockposition, (IBlockData) iblockdata.setValue(DecoratedPotBlock.CRACKED, true), 4);
|
||||
world.destroyBlock(blockposition, true, iprojectile);
|
||||
}
|
Loading…
Reference in a new issue