#1209: Clean up various patches
By: Owen1212055 <23108066+Owen1212055@users.noreply.github.com>
This commit is contained in:
@@ -1,11 +1,25 @@
|
||||
--- a/net/minecraft/world/level/block/BlockWaterLily.java
|
||||
+++ b/net/minecraft/world/level/block/BlockWaterLily.java
|
||||
@@ -24,7 +24,7 @@
|
||||
@Override
|
||||
@@ -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) {
|
||||
+ if (world instanceof WorldServer && entity instanceof EntityBoat && !org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(entity, blockposition, Blocks.AIR.defaultBlockState()).isCancelled()) { // CraftBukkit
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user