From bb4fb5334e7f7231c86c6ef9951d3eb24db9e6ea Mon Sep 17 00:00:00 2001 From: Lulu13022002 <41980282+Lulu13022002@users.noreply.github.com> Date: Wed, 4 Dec 2024 21:49:46 +0100 Subject: [PATCH] call EntityInsideBlockEvent for eyeblossom --- patches/api/0276-Add-EntityInsideBlockEvent.patch | 5 +++-- patches/server/0531-Add-EntityInsideBlockEvent.patch | 12 ++++++++++++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/patches/api/0276-Add-EntityInsideBlockEvent.patch b/patches/api/0276-Add-EntityInsideBlockEvent.patch index 88b7889be9..dafb3010dc 100644 --- a/patches/api/0276-Add-EntityInsideBlockEvent.patch +++ b/patches/api/0276-Add-EntityInsideBlockEvent.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Add EntityInsideBlockEvent diff --git a/src/main/java/io/papermc/paper/event/entity/EntityInsideBlockEvent.java b/src/main/java/io/papermc/paper/event/entity/EntityInsideBlockEvent.java new file mode 100644 -index 0000000000000000000000000000000000000000..314aab3eb4c802e6ebbe5a4ee7d5fbbd3f504c1b +index 0000000000000000000000000000000000000000..a1a7a0af23e8833b9f127335950a0e5649d5f11b --- /dev/null +++ b/src/main/java/io/papermc/paper/event/entity/EntityInsideBlockEvent.java -@@ -0,0 +1,85 @@ +@@ -0,0 +1,86 @@ +package io.papermc.paper.event.entity; + +import org.bukkit.block.Block; @@ -37,6 +37,7 @@ index 0000000000000000000000000000000000000000..314aab3eb4c802e6ebbe5a4ee7d5fbbd + *
  • Crops
  • + *
  • End Gateway
  • + *
  • Ender Portal
  • ++ *
  • Eye blossom
  • + *
  • Fires
  • + *
  • Frogspawn
  • + *
  • Honey
  • diff --git a/patches/server/0531-Add-EntityInsideBlockEvent.patch b/patches/server/0531-Add-EntityInsideBlockEvent.patch index cf9fee7e14..980fe20f4d 100644 --- a/patches/server/0531-Add-EntityInsideBlockEvent.patch +++ b/patches/server/0531-Add-EntityInsideBlockEvent.patch @@ -136,6 +136,18 @@ index 8887d35d188510cf10da3dc46b0b56373ac346bd..8ca226641588a88c8b068a7acac9d7e9 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 be3ddd70a68c43cd8db5d8a25e7d5d7e7b91751d..efe3f34a32fd01c9edba937b4b8ea25f51d86ba0 100644 +--- a/src/main/java/net/minecraft/world/level/block/EyeblossomBlock.java ++++ b/src/main/java/net/minecraft/world/level/block/EyeblossomBlock.java +@@ -100,6 +100,7 @@ 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 aee71779f31def5f1ef7438cf06219d1de7092ec..34be6b349722240e99f91d28067578aa0b4bd1fe 100644 --- a/src/main/java/net/minecraft/world/level/block/FrogspawnBlock.java