3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-15 11:00:06 +01:00

Fix wrong world being passed into portal event (#8174)

Dieser Commit ist enthalten in:
Jake Potrebic 2022-07-22 17:42:34 -07:00 committet von GitHub
Ursprung 4952c04610
Commit 1a8bea734a
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23

Datei anzeigen

@ -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 {