mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-10 12:02:36 +01:00
b97cc9b99f
By: Owen1212055 <23108066+Owen1212055@users.noreply.github.com>
25 lines
1.1 KiB
Diff
25 lines
1.1 KiB
Diff
--- a/net/minecraft/world/level/block/BlockWaterLily.java
|
|
+++ b/net/minecraft/world/level/block/BlockWaterLily.java
|
|
@@ -13,6 +13,10 @@
|
|
import net.minecraft.world.phys.shapes.VoxelShape;
|
|
import net.minecraft.world.phys.shapes.VoxelShapeCollision;
|
|
|
|
+// CraftBukkit start
|
|
+import org.bukkit.craftbukkit.event.CraftEventFactory;
|
|
+// CraftBukkit end
|
|
+
|
|
public class BlockWaterLily extends BlockPlant {
|
|
|
|
protected static final VoxelShape AABB = Block.box(1.0D, 0.0D, 1.0D, 15.0D, 1.5D, 15.0D);
|
|
@@ -25,6 +29,11 @@
|
|
public void entityInside(IBlockData iblockdata, World world, BlockPosition blockposition, Entity entity) {
|
|
super.entityInside(iblockdata, world, blockposition, entity);
|
|
if (world instanceof WorldServer && entity instanceof EntityBoat) {
|
|
+ // CraftBukkit start
|
|
+ if (!CraftEventFactory.callEntityChangeBlockEvent(entity, blockposition, Blocks.AIR.defaultBlockState())) {
|
|
+ return;
|
|
+ }
|
|
+ // CraftBukkit end
|
|
world.destroyBlock(new BlockPosition(blockposition), true, entity);
|
|
}
|
|
|