PaperMC/paper-server/nms-patches/net/minecraft/world/level/block/BlockWaterLily.patch
CraftBukkit/Spigot b97cc9b99f #1209: Clean up various patches
By: Owen1212055 <23108066+Owen1212055@users.noreply.github.com>
2023-06-24 17:15:05 +10:00

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);
}