aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorLulu13022002 <[email protected]>2024-12-04 21:49:46 +0100
committerLulu13022002 <[email protected]>2024-12-04 21:49:46 +0100
commitbb4fb5334e7f7231c86c6ef9951d3eb24db9e6ea (patch)
tree0ddff95b45a3b6d37c2738acea791f55e85a1249
parent4806ce5cd5755bb3323d27b1302b282f5c9316a3 (diff)
downloadPaper-bb4fb5334e7f7231c86c6ef9951d3eb24db9e6ea.tar.gz
Paper-bb4fb5334e7f7231c86c6ef9951d3eb24db9e6ea.zip
call EntityInsideBlockEvent for eyeblossom
-rw-r--r--patches/api/0276-Add-EntityInsideBlockEvent.patch5
-rw-r--r--patches/server/0531-Add-EntityInsideBlockEvent.patch12
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
+ * <li>Crops</li>
+ * <li>End Gateway</li>
+ * <li>Ender Portal</li>
++ * <li>Eye blossom</li>
+ * <li>Fires</li>
+ * <li>Frogspawn</li>
+ * <li>Honey</li>
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