Only call EntityPortalExitEvent if entity is actually in a portal

This commit is contained in:
Jake Potrebic 2024-09-22 14:35:04 -07:00
parent e8297c4cca
commit 4514c71a7f
No known key found for this signature in database
GPG key ID: ECE0B3C133C016C5
7 changed files with 36 additions and 34 deletions

View file

@ -21,10 +21,10 @@ index 61fda6927f060cdf8bcfddaaa08bbbe2c514c630..dca6087dc4e1c177c3dfdae01f140cf8
} else if (this.seenBy.remove(player.connection)) {
this.serverEntity.removePairing(player);
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 1aa3396a33e24f3849725769fe58b57374ee7611..3c7175b015262ed354d9a9ae237aff6d34cec713 100644
index 3170f7246f55799fd5783e747920940ab33c3e40..d5df4ddb33600479e6edb93a18db9400ffc6c699 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -3868,7 +3868,14 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -3870,7 +3870,14 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
public void startSeenByPlayer(ServerPlayer player) {}