diff options
author | Nassim Jahnke <[email protected]> | 2024-01-23 18:01:39 +0100 |
---|---|---|
committer | Nassim Jahnke <[email protected]> | 2024-01-23 18:06:51 +0100 |
commit | c57d1aa24560ec71331e685e9fd27aa3d9274f69 (patch) | |
tree | b585b2246be85ecc5047b02b704c0a5f59c96dd9 /patches/server/0714-Fix-Entity-Position-Desync.patch | |
parent | e66037960b02c7b22bbed75318904c55a4177977 (diff) | |
download | Paper-c57d1aa24560ec71331e685e9fd27aa3d9274f69.tar.gz Paper-c57d1aa24560ec71331e685e9fd27aa3d9274f69.zip |
Move diffs around to compile without later ones applied
Diffstat (limited to 'patches/server/0714-Fix-Entity-Position-Desync.patch')
-rw-r--r-- | patches/server/0714-Fix-Entity-Position-Desync.patch | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/patches/server/0714-Fix-Entity-Position-Desync.patch b/patches/server/0714-Fix-Entity-Position-Desync.patch new file mode 100644 index 0000000000..b46e0b1041 --- /dev/null +++ b/patches/server/0714-Fix-Entity-Position-Desync.patch @@ -0,0 +1,23 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Owen1212055 <[email protected]> +Date: Thu, 23 Dec 2021 23:59:12 -0500 +Subject: [PATCH] Fix Entity Position Desync + +If entities were teleported in the first tick it would not be send to the client. + +This excludes hanging entities, as this fix caused problematic behavior due to them having their own +position field. + +diff --git a/src/main/java/net/minecraft/server/level/ServerEntity.java b/src/main/java/net/minecraft/server/level/ServerEntity.java +index c881d6ea6acbcbd1414a0b7d6b5a26076244e34e..b52f86e23a35f8727d827155ebb20f847108d673 100644 +--- a/src/main/java/net/minecraft/server/level/ServerEntity.java ++++ b/src/main/java/net/minecraft/server/level/ServerEntity.java +@@ -171,7 +171,7 @@ public class ServerEntity { + boolean flag4 = false; + boolean flag5 = false; + +- if (this.tickCount > 0 || this.entity instanceof AbstractArrow) { ++ if (!(this.entity instanceof net.minecraft.world.entity.decoration.HangingEntity) || this.tickCount > 0 || this.entity instanceof AbstractArrow) { // Paper - Always update position to fix first-tick teleports + long k = this.positionCodec.encodeX(vec3d); + long l = this.positionCodec.encodeY(vec3d); + long i1 = this.positionCodec.encodeZ(vec3d); |