mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-05 10:24:46 +01:00
call EntityInsideBlockEvent for eyeblossom
This commit is contained in:
parent
4806ce5cd5
commit
bb4fb5334e
2 changed files with 15 additions and 2 deletions
|
@ -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
|
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
|
new file mode 100644
|
||||||
index 0000000000000000000000000000000000000000..314aab3eb4c802e6ebbe5a4ee7d5fbbd3f504c1b
|
index 0000000000000000000000000000000000000000..a1a7a0af23e8833b9f127335950a0e5649d5f11b
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/main/java/io/papermc/paper/event/entity/EntityInsideBlockEvent.java
|
+++ 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;
|
+package io.papermc.paper.event.entity;
|
||||||
+
|
+
|
||||||
+import org.bukkit.block.Block;
|
+import org.bukkit.block.Block;
|
||||||
|
@ -37,6 +37,7 @@ index 0000000000000000000000000000000000000000..314aab3eb4c802e6ebbe5a4ee7d5fbbd
|
||||||
+ * <li>Crops</li>
|
+ * <li>Crops</li>
|
||||||
+ * <li>End Gateway</li>
|
+ * <li>End Gateway</li>
|
||||||
+ * <li>Ender Portal</li>
|
+ * <li>Ender Portal</li>
|
||||||
|
+ * <li>Eye blossom</li>
|
||||||
+ * <li>Fires</li>
|
+ * <li>Fires</li>
|
||||||
+ * <li>Frogspawn</li>
|
+ * <li>Frogspawn</li>
|
||||||
+ * <li>Honey</li>
|
+ * <li>Honey</li>
|
||||||
|
|
|
@ -136,6 +136,18 @@ index 8887d35d188510cf10da3dc46b0b56373ac346bd..8ca226641588a88c8b068a7acac9d7e9
|
||||||
if (entity.canUsePortal(false)) {
|
if (entity.canUsePortal(false)) {
|
||||||
// CraftBukkit start - Entity in portal
|
// CraftBukkit start - Entity in portal
|
||||||
EntityPortalEnterEvent event = new EntityPortalEnterEvent(entity.getBukkitEntity(), new org.bukkit.Location(world.getWorld(), pos.getX(), pos.getY(), pos.getZ()));
|
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
|
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
|
index aee71779f31def5f1ef7438cf06219d1de7092ec..34be6b349722240e99f91d28067578aa0b4bd1fe 100644
|
||||||
--- a/src/main/java/net/minecraft/world/level/block/FrogspawnBlock.java
|
--- a/src/main/java/net/minecraft/world/level/block/FrogspawnBlock.java
|
||||||
|
|
Loading…
Reference in a new issue