From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Jake Potrebic Date: Sat, 8 May 2021 18:02:36 -0700 Subject: [PATCH] Add EntityInsideBlockEvent diff --git a/src/main/java/net/minecraft/world/level/block/BaseFireBlock.java b/src/main/java/net/minecraft/world/level/block/BaseFireBlock.java index 83f48d543eac94276ee4d7f7a4c21abdfa8eb8e6..39a92a25c55fb16f1371b0dfe2fb94258e4b7f0d 100644 --- a/src/main/java/net/minecraft/world/level/block/BaseFireBlock.java +++ b/src/main/java/net/minecraft/world/level/block/BaseFireBlock.java @@ -124,6 +124,7 @@ public abstract class BaseFireBlock extends Block { @Override protected void entityInside(BlockState state, Level world, BlockPos pos, Entity entity) { + if (!new io.papermc.paper.event.entity.EntityInsideBlockEvent(entity.getBukkitEntity(), org.bukkit.craftbukkit.block.CraftBlock.at(world, pos)).callEvent()) { return; } // Paper - Add EntityInsideBlockEvent if (!entity.fireImmune()) { entity.setRemainingFireTicks(entity.getRemainingFireTicks() + 1); if (entity.getRemainingFireTicks() == 0) { diff --git a/src/main/java/net/minecraft/world/level/block/BasePressurePlateBlock.java b/src/main/java/net/minecraft/world/level/block/BasePressurePlateBlock.java index 2b6e126f57cf67cd719f67e925fee97b2485f73f..8b33e35c843e5c0b8988a2ef2a38a2673035292f 100644 --- a/src/main/java/net/minecraft/world/level/block/BasePressurePlateBlock.java +++ b/src/main/java/net/minecraft/world/level/block/BasePressurePlateBlock.java @@ -77,6 +77,7 @@ public abstract class BasePressurePlateBlock extends Block { @Override protected void entityInside(BlockState state, Level world, BlockPos pos, Entity entity) { + if (!new io.papermc.paper.event.entity.EntityInsideBlockEvent(entity.getBukkitEntity(), org.bukkit.craftbukkit.block.CraftBlock.at(world, pos)).callEvent()) { return; } // Paper - Add EntityInsideBlockEvent if (!world.isClientSide) { int i = this.getSignalForState(state); diff --git a/src/main/java/net/minecraft/world/level/block/BigDripleafBlock.java b/src/main/java/net/minecraft/world/level/block/BigDripleafBlock.java index c1f020efdc5a1170fc43b2579531be8bdcacc83b..8240c32d676a88aa23dcd052ee0136767e54fb0d 100644 --- a/src/main/java/net/minecraft/world/level/block/BigDripleafBlock.java +++ b/src/main/java/net/minecraft/world/level/block/BigDripleafBlock.java @@ -178,6 +178,7 @@ public class BigDripleafBlock extends HorizontalDirectionalBlock implements Bone @Override protected void entityInside(BlockState state, Level world, BlockPos pos, Entity entity) { + if (!new io.papermc.paper.event.entity.EntityInsideBlockEvent(entity.getBukkitEntity(), org.bukkit.craftbukkit.block.CraftBlock.at(world, pos)).callEvent()) { return; } // Paper - Add EntityInsideBlockEvent if (!world.isClientSide) { if (state.getValue(BigDripleafBlock.TILT) == Tilt.NONE && BigDripleafBlock.canEntityTilt(pos, entity) && !world.hasNeighborSignal(pos)) { // CraftBukkit start - tilt dripleaf diff --git a/src/main/java/net/minecraft/world/level/block/BubbleColumnBlock.java b/src/main/java/net/minecraft/world/level/block/BubbleColumnBlock.java index 7c70c98ee27a6a09e73942ff4dc0f88ceb77936f..4c1f20fafdbd86011959cc2d4983b6c2f8e87a5f 100644 --- a/src/main/java/net/minecraft/world/level/block/BubbleColumnBlock.java +++ b/src/main/java/net/minecraft/world/level/block/BubbleColumnBlock.java @@ -47,6 +47,7 @@ public class BubbleColumnBlock extends Block implements BucketPickup { @Override protected void entityInside(BlockState state, Level world, BlockPos pos, Entity entity) { + if (!new io.papermc.paper.event.entity.EntityInsideBlockEvent(entity.getBukkitEntity(), org.bukkit.craftbukkit.block.CraftBlock.at(world, pos)).callEvent()) { return; } // Paper - Add EntityInsideBlockEvent BlockState blockState = world.getBlockState(pos.above()); if (blockState.isAir()) { entity.onAboveBubbleCol(state.getValue(DRAG_DOWN)); diff --git a/src/main/java/net/minecraft/world/level/block/ButtonBlock.java b/src/main/java/net/minecraft/world/level/block/ButtonBlock.java index dc9dca35ec406b8046372719392d20acc3f5dac9..776357342c76127af0868591a56a059f89a55f20 100644 --- a/src/main/java/net/minecraft/world/level/block/ButtonBlock.java +++ b/src/main/java/net/minecraft/world/level/block/ButtonBlock.java @@ -206,6 +206,7 @@ public class ButtonBlock extends FaceAttachedHorizontalDirectionalBlock { @Override protected void entityInside(BlockState state, Level world, BlockPos pos, Entity entity) { + if (!new io.papermc.paper.event.entity.EntityInsideBlockEvent(entity.getBukkitEntity(), org.bukkit.craftbukkit.block.CraftBlock.at(world, pos)).callEvent()) { return; } // Paper - Add EntityInsideBlockEvent if (!world.isClientSide && this.type.canButtonBeActivatedByArrows() && !(Boolean) state.getValue(ButtonBlock.POWERED)) { this.checkPressed(state, world, pos); } diff --git a/src/main/java/net/minecraft/world/level/block/CactusBlock.java b/src/main/java/net/minecraft/world/level/block/CactusBlock.java index fd344c5cf0d6d523abe34d5e3f8d939106942cbb..ff4dda48116a2969704b355ff96407ba869b466e 100644 --- a/src/main/java/net/minecraft/world/level/block/CactusBlock.java +++ b/src/main/java/net/minecraft/world/level/block/CactusBlock.java @@ -121,6 +121,7 @@ public class CactusBlock extends Block { @Override protected void entityInside(BlockState state, Level world, BlockPos pos, Entity entity) { + if (!new io.papermc.paper.event.entity.EntityInsideBlockEvent(entity.getBukkitEntity(), org.bukkit.craftbukkit.block.CraftBlock.at(world, pos)).callEvent()) { return; } // Paper - Add EntityInsideBlockEvent entity.hurt(world.damageSources().cactus().directBlock(world, pos), 1.0F); // CraftBukkit } diff --git a/src/main/java/net/minecraft/world/level/block/CampfireBlock.java b/src/main/java/net/minecraft/world/level/block/CampfireBlock.java index 47f1f2fec847ff19b994c98d0f5b01d063f37067..d6fffb0953494e8667cc456137cac0f5deebfbb6 100644 --- a/src/main/java/net/minecraft/world/level/block/CampfireBlock.java +++ b/src/main/java/net/minecraft/world/level/block/CampfireBlock.java @@ -105,6 +105,7 @@ public class CampfireBlock extends BaseEntityBlock implements SimpleWaterloggedB @Override protected void entityInside(BlockState state, Level world, BlockPos pos, Entity entity) { + if (!new io.papermc.paper.event.entity.EntityInsideBlockEvent(entity.getBukkitEntity(), org.bukkit.craftbukkit.block.CraftBlock.at(world, pos)).callEvent()) { return; } // Paper - Add EntityInsideBlockEvent if ((Boolean) state.getValue(CampfireBlock.LIT) && entity instanceof LivingEntity && !EnchantmentHelper.hasFrostWalker((LivingEntity) entity)) { entity.hurt(world.damageSources().inFire().directBlock(world, pos), (float) this.fireDamage); // CraftBukkit } diff --git a/src/main/java/net/minecraft/world/level/block/CropBlock.java b/src/main/java/net/minecraft/world/level/block/CropBlock.java index fcaf6b4bb7371ce9f00a7d4306f7b2b6884b7c4c..73595922dcff8e7a8595fcf033ab238bc4096630 100644 --- a/src/main/java/net/minecraft/world/level/block/CropBlock.java +++ b/src/main/java/net/minecraft/world/level/block/CropBlock.java @@ -174,6 +174,7 @@ public class CropBlock extends BushBlock implements BonemealableBlock { @Override protected void entityInside(BlockState state, Level world, BlockPos pos, Entity entity) { + if (!new io.papermc.paper.event.entity.EntityInsideBlockEvent(entity.getBukkitEntity(), org.bukkit.craftbukkit.block.CraftBlock.at(world, pos)).callEvent()) { return; } // Paper - Add EntityInsideBlockEvent if (entity instanceof Ravager && CraftEventFactory.callEntityChangeBlockEvent(entity, pos, Blocks.AIR.defaultBlockState(), !world.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING))) { // CraftBukkit world.destroyBlock(pos, true, entity); } diff --git a/src/main/java/net/minecraft/world/level/block/DetectorRailBlock.java b/src/main/java/net/minecraft/world/level/block/DetectorRailBlock.java index 55a97da8786ec0ae98abe56876c00f4678ba0007..9d69e439ff853465303c2abd896e6c5314752e1e 100644 --- a/src/main/java/net/minecraft/world/level/block/DetectorRailBlock.java +++ b/src/main/java/net/minecraft/world/level/block/DetectorRailBlock.java @@ -51,6 +51,7 @@ public class DetectorRailBlock extends BaseRailBlock { @Override protected void entityInside(BlockState state, Level world, BlockPos pos, Entity entity) { + if (!new io.papermc.paper.event.entity.EntityInsideBlockEvent(entity.getBukkitEntity(), org.bukkit.craftbukkit.block.CraftBlock.at(world, pos)).callEvent()) { return; } // Paper - Add EntityInsideBlockEvent if (!world.isClientSide) { if (!(Boolean) state.getValue(DetectorRailBlock.POWERED)) { this.checkPressed(world, pos, state); diff --git a/src/main/java/net/minecraft/world/level/block/EndPortalBlock.java b/src/main/java/net/minecraft/world/level/block/EndPortalBlock.java index 6845beea2a10adf5eab08744c7eef63c0bd42254..a2de13a366e4a462b746dab035372838127f4994 100644 --- a/src/main/java/net/minecraft/world/level/block/EndPortalBlock.java +++ b/src/main/java/net/minecraft/world/level/block/EndPortalBlock.java @@ -52,6 +52,7 @@ public class EndPortalBlock extends BaseEntityBlock { @Override protected void entityInside(BlockState state, Level world, BlockPos pos, Entity entity) { + if (!new io.papermc.paper.event.entity.EntityInsideBlockEvent(entity.getBukkitEntity(), org.bukkit.craftbukkit.block.CraftBlock.at(world, pos)).callEvent()) { return; } // Paper - Add EntityInsideBlockEvent if (world instanceof ServerLevel && entity.canChangeDimensions() && Shapes.joinIsNotEmpty(Shapes.create(entity.getBoundingBox().move((double) (-pos.getX()), (double) (-pos.getY()), (double) (-pos.getZ()))), state.getShape(world, pos), BooleanOp.AND)) { ResourceKey resourcekey = world.getTypeKey() == LevelStem.END ? Level.OVERWORLD : Level.END; // CraftBukkit - SPIGOT-6152: send back to main overworld in custom ends ServerLevel worldserver = ((ServerLevel) world).getServer().getLevel(resourcekey); diff --git a/src/main/java/net/minecraft/world/level/block/FrogspawnBlock.java b/src/main/java/net/minecraft/world/level/block/FrogspawnBlock.java index d7a6d4f11325791767be8fcb2355916ca2f63f11..a3339b47165814238351d307c729af14d5e5d1ff 100644 --- a/src/main/java/net/minecraft/world/level/block/FrogspawnBlock.java +++ b/src/main/java/net/minecraft/world/level/block/FrogspawnBlock.java @@ -79,6 +79,7 @@ public class FrogspawnBlock extends Block { @Override protected void entityInside(BlockState state, Level world, BlockPos pos, Entity entity) { + if (!new io.papermc.paper.event.entity.EntityInsideBlockEvent(entity.getBukkitEntity(), org.bukkit.craftbukkit.block.CraftBlock.at(world, pos)).callEvent()) { return; } // Paper - Add EntityInsideBlockEvent if (entity.getType().equals(EntityType.FALLING_BLOCK)) { this.destroyBlock(world, pos); } diff --git a/src/main/java/net/minecraft/world/level/block/HoneyBlock.java b/src/main/java/net/minecraft/world/level/block/HoneyBlock.java index 1ed883c62be357d32365ef182e391e96172d2b56..c6f7815b5fad3aad4635208aa2e5c6739e13cb45 100644 --- a/src/main/java/net/minecraft/world/level/block/HoneyBlock.java +++ b/src/main/java/net/minecraft/world/level/block/HoneyBlock.java @@ -60,6 +60,7 @@ public class HoneyBlock extends HalfTransparentBlock { @Override protected void entityInside(BlockState state, Level world, BlockPos pos, Entity entity) { + if (!new io.papermc.paper.event.entity.EntityInsideBlockEvent(entity.getBukkitEntity(), org.bukkit.craftbukkit.block.CraftBlock.at(world, pos)).callEvent()) { return; } // Paper - Add EntityInsideBlockEvent if (this.isSlidingDown(pos, entity)) { this.maybeDoSlideAchievement(entity, pos); this.doSlideMovement(entity); diff --git a/src/main/java/net/minecraft/world/level/block/HopperBlock.java b/src/main/java/net/minecraft/world/level/block/HopperBlock.java index 089ead2d55c4fbe361255391f553822715269c38..86e5617d445ce762aa374e236a0ccdfe5901fce5 100644 --- a/src/main/java/net/minecraft/world/level/block/HopperBlock.java +++ b/src/main/java/net/minecraft/world/level/block/HopperBlock.java @@ -187,6 +187,7 @@ public class HopperBlock extends BaseEntityBlock { @Override protected void entityInside(BlockState state, Level world, BlockPos pos, Entity entity) { + if (!new io.papermc.paper.event.entity.EntityInsideBlockEvent(entity.getBukkitEntity(), org.bukkit.craftbukkit.block.CraftBlock.at(world, pos)).callEvent()) { return; } // Paper - Add EntityInsideBlockEvent BlockEntity blockEntity = world.getBlockEntity(pos); if (blockEntity instanceof HopperBlockEntity) { HopperBlockEntity.entityInside(world, pos, state, entity, (HopperBlockEntity)blockEntity); diff --git a/src/main/java/net/minecraft/world/level/block/LavaCauldronBlock.java b/src/main/java/net/minecraft/world/level/block/LavaCauldronBlock.java index 7bf2c33a194517d4e52511fe32a8434cbed0361f..d29a62775913922ffb8e3c58ae0db7e37f77226e 100644 --- a/src/main/java/net/minecraft/world/level/block/LavaCauldronBlock.java +++ b/src/main/java/net/minecraft/world/level/block/LavaCauldronBlock.java @@ -32,6 +32,7 @@ public class LavaCauldronBlock extends AbstractCauldronBlock { @Override protected void entityInside(BlockState state, Level world, BlockPos pos, Entity entity) { + if (!new io.papermc.paper.event.entity.EntityInsideBlockEvent(entity.getBukkitEntity(), org.bukkit.craftbukkit.block.CraftBlock.at(world, pos)).callEvent()) { return; } // Paper - Add EntityInsideBlockEvent if (this.isEntityInsideContent(state, pos, entity)) { entity.lavaHurt(); } diff --git a/src/main/java/net/minecraft/world/level/block/LayeredCauldronBlock.java b/src/main/java/net/minecraft/world/level/block/LayeredCauldronBlock.java index 5f778ea22efa76ced1ba4455d50b94b3519113fc..7c67efa6e344870b764eb39d5508190349e2e911 100644 --- a/src/main/java/net/minecraft/world/level/block/LayeredCauldronBlock.java +++ b/src/main/java/net/minecraft/world/level/block/LayeredCauldronBlock.java @@ -66,6 +66,7 @@ public class LayeredCauldronBlock extends AbstractCauldronBlock { @Override protected void entityInside(BlockState state, Level world, BlockPos pos, Entity entity) { + if (!new io.papermc.paper.event.entity.EntityInsideBlockEvent(entity.getBukkitEntity(), org.bukkit.craftbukkit.block.CraftBlock.at(world, pos)).callEvent()) { return; } // Paper - Add EntityInsideBlockEvent if (!world.isClientSide && entity.isOnFire() && this.isEntityInsideContent(state, pos, entity)) { // CraftBukkit start if (entity.mayInteract(world, pos)) { diff --git a/src/main/java/net/minecraft/world/level/block/NetherPortalBlock.java b/src/main/java/net/minecraft/world/level/block/NetherPortalBlock.java index d3f2c0e3107a781b462a2b67c10cd1e5f05feefb..a9e3078cefcae8cc4672d514a7add162590d48df 100644 --- a/src/main/java/net/minecraft/world/level/block/NetherPortalBlock.java +++ b/src/main/java/net/minecraft/world/level/block/NetherPortalBlock.java @@ -90,6 +90,7 @@ public class NetherPortalBlock extends Block { @Override protected void entityInside(BlockState state, Level world, BlockPos pos, Entity entity) { + if (!new io.papermc.paper.event.entity.EntityInsideBlockEvent(entity.getBukkitEntity(), org.bukkit.craftbukkit.block.CraftBlock.at(world, pos)).callEvent()) { return; } // Paper - Add EntityInsideBlockEvent if (entity.canChangeDimensions()) { // CraftBukkit start - Entity in portal EntityPortalEnterEvent event = new EntityPortalEnterEvent(entity.getBukkitEntity(), new org.bukkit.Location(world.getWorld(), pos.getX(), pos.getY(), pos.getZ())); diff --git a/src/main/java/net/minecraft/world/level/block/PitcherCropBlock.java b/src/main/java/net/minecraft/world/level/block/PitcherCropBlock.java index 15696602249465fa1d13eaec3b8b06574ec06f07..c9ed129db2cadd0a33d69993961f43088725c3cb 100644 --- a/src/main/java/net/minecraft/world/level/block/PitcherCropBlock.java +++ b/src/main/java/net/minecraft/world/level/block/PitcherCropBlock.java @@ -98,6 +98,7 @@ public class PitcherCropBlock extends DoublePlantBlock implements BonemealableBl @Override public void entityInside(BlockState state, Level world, BlockPos pos, Entity entity) { + if (!new io.papermc.paper.event.entity.EntityInsideBlockEvent(entity.getBukkitEntity(), org.bukkit.craftbukkit.block.CraftBlock.at(world, pos)).callEvent()) { return; } // Paper - Add EntityInsideBlockEvent if (entity instanceof Ravager && world.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)) { world.destroyBlock(pos, true, entity); } diff --git a/src/main/java/net/minecraft/world/level/block/PowderSnowBlock.java b/src/main/java/net/minecraft/world/level/block/PowderSnowBlock.java index 1f9cab69fb19c96fb01fff0d7a5ecfdfff46a5d4..a6e6545402904141ffc6218a0158b0e9c67217c8 100644 --- a/src/main/java/net/minecraft/world/level/block/PowderSnowBlock.java +++ b/src/main/java/net/minecraft/world/level/block/PowderSnowBlock.java @@ -63,6 +63,7 @@ public class PowderSnowBlock extends Block implements BucketPickup { @Override protected void entityInside(BlockState state, Level world, BlockPos pos, Entity entity) { + if (!new io.papermc.paper.event.entity.EntityInsideBlockEvent(entity.getBukkitEntity(), org.bukkit.craftbukkit.block.CraftBlock.at(world, pos)).callEvent()) { return; } // Paper - Add EntityInsideBlockEvent if (!(entity instanceof LivingEntity) || entity.getInBlockState().is((Block) this)) { entity.makeStuckInBlock(state, new Vec3(0.8999999761581421D, 1.5D, 0.8999999761581421D)); if (world.isClientSide) { diff --git a/src/main/java/net/minecraft/world/level/block/SweetBerryBushBlock.java b/src/main/java/net/minecraft/world/level/block/SweetBerryBushBlock.java index 49fce6000ffafc6f53767c971db951b20261b91d..6008c634c408c4eed563815da4d57b2eef69835c 100644 --- a/src/main/java/net/minecraft/world/level/block/SweetBerryBushBlock.java +++ b/src/main/java/net/minecraft/world/level/block/SweetBerryBushBlock.java @@ -85,6 +85,7 @@ public class SweetBerryBushBlock extends BushBlock implements BonemealableBlock @Override protected void entityInside(BlockState state, Level world, BlockPos pos, Entity entity) { + if (!new io.papermc.paper.event.entity.EntityInsideBlockEvent(entity.getBukkitEntity(), org.bukkit.craftbukkit.block.CraftBlock.at(world, pos)).callEvent()) { return; } // Paper - Add EntityInsideBlockEvent if (entity instanceof LivingEntity && entity.getType() != EntityType.FOX && entity.getType() != EntityType.BEE) { entity.makeStuckInBlock(state, new Vec3(0.800000011920929D, 0.75D, 0.800000011920929D)); if (!world.isClientSide && (Integer) state.getValue(SweetBerryBushBlock.AGE) > 0 && (entity.xOld != entity.getX() || entity.zOld != entity.getZ())) { diff --git a/src/main/java/net/minecraft/world/level/block/TripWireBlock.java b/src/main/java/net/minecraft/world/level/block/TripWireBlock.java index 65b30286020b65e23d05307aade344cde827fcf2..e032d8907045c653c3dd449f65e93e40fd0bb6be 100644 --- a/src/main/java/net/minecraft/world/level/block/TripWireBlock.java +++ b/src/main/java/net/minecraft/world/level/block/TripWireBlock.java @@ -135,6 +135,7 @@ public class TripWireBlock extends Block { @Override protected void entityInside(BlockState state, Level world, BlockPos pos, Entity entity) { + if (!new io.papermc.paper.event.entity.EntityInsideBlockEvent(entity.getBukkitEntity(), org.bukkit.craftbukkit.block.CraftBlock.at(world, pos)).callEvent()) { return; } // Paper - Add EntityInsideBlockEvent if (!world.isClientSide) { if (!(Boolean) state.getValue(TripWireBlock.POWERED)) { this.checkPressed(world, pos); diff --git a/src/main/java/net/minecraft/world/level/block/WaterlilyBlock.java b/src/main/java/net/minecraft/world/level/block/WaterlilyBlock.java index 7f5e092e400c3a8422b677ca246031a945a0d359..edc20745649b0837f1371c8d29e71fc0c8e5528f 100644 --- a/src/main/java/net/minecraft/world/level/block/WaterlilyBlock.java +++ b/src/main/java/net/minecraft/world/level/block/WaterlilyBlock.java @@ -34,6 +34,7 @@ public class WaterlilyBlock extends BushBlock { @Override protected void entityInside(BlockState state, Level world, BlockPos pos, Entity entity) { super.entityInside(state, world, pos, entity); + if (!new io.papermc.paper.event.entity.EntityInsideBlockEvent(entity.getBukkitEntity(), org.bukkit.craftbukkit.block.CraftBlock.at(world, pos)).callEvent()) { return; } // Paper - Add EntityInsideBlockEvent if (world instanceof ServerLevel && entity instanceof Boat) { // CraftBukkit start if (!CraftEventFactory.callEntityChangeBlockEvent(entity, pos, Blocks.AIR.defaultBlockState())) { diff --git a/src/main/java/net/minecraft/world/level/block/WebBlock.java b/src/main/java/net/minecraft/world/level/block/WebBlock.java index 4b621793da3d6fbc44f90df863b099ba992930fb..fc209fab3ed1ccb35706a5529ec23ad8b902e491 100644 --- a/src/main/java/net/minecraft/world/level/block/WebBlock.java +++ b/src/main/java/net/minecraft/world/level/block/WebBlock.java @@ -24,6 +24,7 @@ public class WebBlock extends Block { @Override protected void entityInside(BlockState state, Level world, BlockPos pos, Entity entity) { + if (!new io.papermc.paper.event.entity.EntityInsideBlockEvent(entity.getBukkitEntity(), org.bukkit.craftbukkit.block.CraftBlock.at(world, pos)).callEvent()) { return; } // Paper - Add EntityInsideBlockEvent Vec3 vec3 = new Vec3(0.25, 0.05F, 0.25); if (entity instanceof LivingEntity livingEntity && livingEntity.hasEffect(MobEffects.WEAVING)) { vec3 = new Vec3(0.5, 0.25, 0.5); diff --git a/src/main/java/net/minecraft/world/level/block/WitherRoseBlock.java b/src/main/java/net/minecraft/world/level/block/WitherRoseBlock.java index e861cf48aae27a8299437d76f6a84336cdcaddb7..3445916c2915b42967eb396b50b62d1912e3a49f 100644 --- a/src/main/java/net/minecraft/world/level/block/WitherRoseBlock.java +++ b/src/main/java/net/minecraft/world/level/block/WitherRoseBlock.java @@ -62,6 +62,7 @@ public class WitherRoseBlock extends FlowerBlock { @Override protected void entityInside(BlockState state, Level world, BlockPos pos, Entity entity) { + if (!new io.papermc.paper.event.entity.EntityInsideBlockEvent(entity.getBukkitEntity(), org.bukkit.craftbukkit.block.CraftBlock.at(world, pos)).callEvent()) { return; } // Paper - Add EntityInsideBlockEvent if (!world.isClientSide && world.getDifficulty() != Difficulty.PEACEFUL) { if (entity instanceof LivingEntity) { LivingEntity entityliving = (LivingEntity) entity;