mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-29 03:32:46 +01:00
SPIGOT-1762: Call EntityChangeBlockEvent for boats destroying lily pads
This commit is contained in:
parent
55b0def5d9
commit
be0bbbabef
1 changed files with 11 additions and 0 deletions
11
nms-patches/BlockWaterLily.patch
Normal file
11
nms-patches/BlockWaterLily.patch
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- a/net/minecraft/server/BlockWaterLily.java
|
||||
+++ b/net/minecraft/server/BlockWaterLily.java
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
public void a(World world, BlockPosition blockposition, IBlockData iblockdata, Entity entity) {
|
||||
super.a(world, blockposition, iblockdata, entity);
|
||||
- if (entity instanceof EntityBoat) {
|
||||
+ if (entity instanceof EntityBoat && !org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(entity, blockposition.getX(), blockposition.getY(), blockposition.getZ(), Blocks.AIR, 0).isCancelled()) { // CraftBukkit
|
||||
world.setAir(new BlockPosition(blockposition), true);
|
||||
}
|
||||
|
Loading…
Reference in a new issue