From 1a8bea734a28d5cf81e2e1db130004e8d1d283bc Mon Sep 17 00:00:00 2001 From: Jake Potrebic Date: Fri, 22 Jul 2022 17:42:34 -0700 Subject: [PATCH] Fix wrong world being passed into portal event (#8174) --- patches/server/0927-Add-EntityPortalReadyEvent.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/patches/server/0927-Add-EntityPortalReadyEvent.patch b/patches/server/0927-Add-EntityPortalReadyEvent.patch index 6f58b6fc4..2edd69640 100644 --- a/patches/server/0927-Add-EntityPortalReadyEvent.patch +++ b/patches/server/0927-Add-EntityPortalReadyEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add EntityPortalReadyEvent diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 19a64b582bc042e426220e080d9c21b3a82cf3f7..cff8490a2f08215fdd8c5d819ec76cafd8a8cb90 100644 +index 19a64b582bc042e426220e080d9c21b3a82cf3f7..76b9beb0d8ebeee0f603d2740ba71beabbf19e25 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -2856,6 +2856,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { @@ -13,7 +13,7 @@ index 19a64b582bc042e426220e080d9c21b3a82cf3f7..cff8490a2f08215fdd8c5d819ec76caf this.level.getProfiler().push("portal"); this.portalTime = i; + // Paper start -+ io.papermc.paper.event.entity.EntityPortalReadyEvent event = new io.papermc.paper.event.entity.EntityPortalReadyEvent(this.getBukkitEntity(), worldserver1 == null ? null : worldserver.getWorld(), org.bukkit.PortalType.NETHER); ++ io.papermc.paper.event.entity.EntityPortalReadyEvent event = new io.papermc.paper.event.entity.EntityPortalReadyEvent(this.getBukkitEntity(), worldserver1 == null ? null : worldserver1.getWorld(), org.bukkit.PortalType.NETHER); + if (!event.callEvent()) { + this.portalTime = 0; + } else {