[ci skip] Replace some magic values with constant references

This commit is contained in:
Nassim Jahnke 2024-01-04 14:38:26 +01:00
parent b2a6d575dd
commit 7eaff48d7c
No known key found for this signature in database
GPG key ID: EF6771C01F6EF02F
10 changed files with 30 additions and 30 deletions

View file

@ -25,7 +25,7 @@ index 0ff6e1f3f24b4086ce62faecf400c493f31fc964..7431b66079406a311a8e46ccabc8f3ef
public void onTrackingEnd(Entity entity) {
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index fa3d294b36eb0c23b293466fc72bd2970a452b55..9f3598371c854ec74f3b5752c9779d6c0d99ec39 100644
index fa3d294b36eb0c23b293466fc72bd2970a452b55..30f7702f4fa3452cdc15df5ca8873bed08c9b30f 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -317,7 +317,27 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
@ -77,7 +77,7 @@ index fa3d294b36eb0c23b293466fc72bd2970a452b55..9f3598371c854ec74f3b5752c9779d6c
// CraftBukkit end
+ // Paper start - Restore the entity's origin location
+ ListTag originTag = nbt.getList("Paper.Origin", 6);
+ ListTag originTag = nbt.getList("Paper.Origin", net.minecraft.nbt.Tag.TAG_DOUBLE);
+ if (!originTag.isEmpty()) {
+ UUID originWorld = null;
+ if (nbt.contains("Paper.OriginWorld")) {