diff options
author | Owen <[email protected]> | 2022-03-29 04:42:46 -0400 |
---|---|---|
committer | GitHub <[email protected]> | 2022-03-29 10:42:46 +0200 |
commit | fa68bb1e816d8c7013dd2ce512724d8b4c8135a5 (patch) | |
tree | 0ba7fc8281f29c11758a651e56b964fbb7b8ddbd | |
parent | 7fa88700431093064d324745c3227c6544c0c7b3 (diff) | |
download | Paper-fa68bb1e816d8c7013dd2ce512724d8b4c8135a5.tar.gz Paper-fa68bb1e816d8c7013dd2ce512724d8b4c8135a5.zip |
Fix entity position desync for hanging entities (#7659)
-rw-r--r-- | patches/server/0866-Fix-Entity-Position-Desync.patch | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/patches/server/0866-Fix-Entity-Position-Desync.patch b/patches/server/0866-Fix-Entity-Position-Desync.patch index 32aeaec69d..8e9bd01077 100644 --- a/patches/server/0866-Fix-Entity-Position-Desync.patch +++ b/patches/server/0866-Fix-Entity-Position-Desync.patch @@ -5,12 +5,15 @@ Subject: [PATCH] Fix Entity Position Desync If entities were teleported in the first tick it would not be send to the client. -This also fixes desync caused be relatively teleporting paintings. +This excludes hanging entities, as this fix caused problematic behavior due to them having their own +position field. + +This also fixes desync caused be relatively teleporting paintings. (https://bugs.mojang.com/browse/MC-249169) This is caused by the fact that setPacketCoordinates isn't called on paintings when they are spawned (unlike every other entity, like XP orbs) on the client for some reason. This causes it to be relatively teleported to the world origin (0,0,0). diff --git a/src/main/java/net/minecraft/server/level/ServerEntity.java b/src/main/java/net/minecraft/server/level/ServerEntity.java -index fe29bf349b987d633b185b9d44d221053fa2cc83..1092ba200a945d8d70e48f956535f56e2743302d 100644 +index fe29bf349b987d633b185b9d44d221053fa2cc83..f91e1a876ad4c46a7c92cead18947a941b4d9e68 100644 --- a/src/main/java/net/minecraft/server/level/ServerEntity.java +++ b/src/main/java/net/minecraft/server/level/ServerEntity.java @@ -164,13 +164,14 @@ public class ServerEntity { @@ -18,7 +21,7 @@ index fe29bf349b987d633b185b9d44d221053fa2cc83..1092ba200a945d8d70e48f956535f56e // CraftBukkit end - if (this.tickCount > 0 || this.entity instanceof AbstractArrow) { -+ if (true || this.tickCount > 0 || this.entity instanceof AbstractArrow) { // Paper - Always update position ++ if (!(this.entity instanceof net.minecraft.world.entity.decoration.HangingEntity) || this.tickCount > 0 || this.entity instanceof AbstractArrow) { // Paper - Always update position // Paper start - remove allocation of Vec3D here long k = ClientboundMoveEntityPacket.entityToPacket(vec3d_dx); long l = ClientboundMoveEntityPacket.entityToPacket(vec3d_dy); |