call EntityInsideBlockEvent for eyeblossom

This commit is contained in:
Lulu13022002 2024-12-04 21:49:46 +01:00
parent 7d18cb068e
commit 4758f1202f
2 changed files with 13 additions and 0 deletions

View file

@ -37,6 +37,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ * <li>Crops</li>
+ * <li>End Gateway</li>
+ * <li>Ender Portal</li>
+ * <li>Eye blossom</li>
+ * <li>Fires</li>
+ * <li>Frogspawn</li>
+ * <li>Honey</li>

View file

@ -136,6 +136,18 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
if (entity.canUsePortal(false)) {
// 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/EyeblossomBlock.java b/src/main/java/net/minecraft/world/level/block/EyeblossomBlock.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/world/level/block/EyeblossomBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/EyeblossomBlock.java
@@ -0,0 +0,0 @@ public class EyeblossomBlock 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
&& entity instanceof Bee bee
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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/world/level/block/FrogspawnBlock.java