Updated Upstream (Bukkit/CraftBukkit) (#7009)

This commit is contained in:
Jake Potrebic 2021-12-03 17:33:56 -08:00 committed by GitHub
parent a41444735a
commit b653ee1a91
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 9 deletions

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Entity AddTo/RemoveFrom World Events
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index afaaff4f49f083c1071d082856181e3d815ea227..8c5133defa9d3166cf987a6f1d02f02f0515746d 100644 index 4611c44a460f87df864dd88f9ae961f9c0bc0d29..6869a07e4a3cfc19b5e814c7e3162d5315ec8908 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java --- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -1993,6 +1993,7 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -1993,6 +1993,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
@ -16,10 +16,10 @@ index afaaff4f49f083c1071d082856181e3d815ea227..8c5133defa9d3166cf987a6f1d02f02f
} }
public void onTrackingEnd(Entity entity) { public void onTrackingEnd(Entity entity) {
@@ -2057,6 +2058,7 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -2064,6 +2065,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
} }
}
entity.valid = false; // CraftBukkit // CraftBukkit end
+ new com.destroystokyo.paper.event.entity.EntityRemoveFromWorldEvent(entity.getBukkitEntity()).callEvent(); // Paper - fire while valid + new com.destroystokyo.paper.event.entity.EntityRemoveFromWorldEvent(entity.getBukkitEntity()).callEvent(); // Paper - fire while valid
} }
} }

View File

@ -26,7 +26,7 @@ index 00ef714294b6cce5fec7613eed4ba228a48e3e11..67b300574655854249c1f7440f56a6e8
uniqueId = gameProfile.getId(); uniqueId = gameProfile.getId();
// Paper end // Paper end
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 853d6b7e329240b701854256419bea0d4fc4bd67..a440c8b56e21abab7774486d35dc64c454aa1a2b 100644 index a411c03a64eb8aa56d73fd288696857029380de2..ad1b450c77fae0dea734e8b09de14b5b36702317 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -71,6 +71,7 @@ import net.minecraft.world.entity.ai.attributes.Attributes; @@ -71,6 +71,7 @@ import net.minecraft.world.entity.ai.attributes.Attributes;
@ -116,5 +116,5 @@ index 853d6b7e329240b701854256419bea0d4fc4bd67..a440c8b56e21abab7774486d35dc64c4
+ } + }
+ // Paper end + // Paper end
public void removeDisconnectingPlayer(Player player) { public void onEntityRemove(Entity entity) {
this.hiddenEntities.remove(player.getUniqueId()); this.hiddenEntities.remove(entity.getUUID());

@ -1 +1 @@
Subproject commit 9115281ff1762658109d43c1bd4fca8b7814d7f2 Subproject commit 1c9ca4054853af6e4210a63cb71fc537d4d4af95

@ -1 +1 @@
Subproject commit fd3478bc77e3b1280e1e02dba6822490a51f011d Subproject commit 1825cc0b04ff9e14df7a511aec855ad80a896d19