SPIGOT-7568: Call EntityChangeBlockEvent for DecoratedPot
This commit is contained in:
parent
b44bf5aa87
commit
292ec79e09
@ -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…
x
Reference in New Issue
Block a user