2022-02-23 03:20:29 +01:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Owen1212055 <23108066+Owen1212055@users.noreply.github.com>
|
|
|
|
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.
|
|
|
|
|
2022-03-29 10:42:46 +02:00
|
|
|
This excludes hanging entities, as this fix caused problematic behavior due to them having their own
|
|
|
|
position field.
|
|
|
|
|
2022-02-23 03:20:29 +01:00
|
|
|
diff --git a/src/main/java/net/minecraft/server/level/ServerEntity.java b/src/main/java/net/minecraft/server/level/ServerEntity.java
|
2022-06-09 10:51:45 +02:00
|
|
|
index c476c4f16edfb0d5c1d94c86f13b35a428d6137a..0bc963fc214da203a6e505fdd5edee3b1efc03df 100644
|
2022-02-23 03:20:29 +01:00
|
|
|
--- a/src/main/java/net/minecraft/server/level/ServerEntity.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/level/ServerEntity.java
|
2022-06-08 17:45:54 +02:00
|
|
|
@@ -152,7 +152,7 @@ public class ServerEntity {
|
2022-06-08 15:12:28 +02:00
|
|
|
boolean flag2 = flag1 || this.tickCount % 60 == 0;
|
|
|
|
boolean flag3 = Math.abs(i - this.yRotp) >= 1 || Math.abs(j - this.xRotp) >= 1;
|
2022-02-23 03:20:29 +01:00
|
|
|
|
|
|
|
- if (this.tickCount > 0 || this.entity instanceof AbstractArrow) {
|
2022-03-29 10:42:46 +02:00
|
|
|
+ if (!(this.entity instanceof net.minecraft.world.entity.decoration.HangingEntity) || this.tickCount > 0 || this.entity instanceof AbstractArrow) { // Paper - Always update position
|
2022-06-08 15:12:28 +02:00
|
|
|
long k = this.positionCodec.encodeX(vec3d);
|
|
|
|
long l = this.positionCodec.encodeY(vec3d);
|
|
|
|
long i1 = this.positionCodec.encodeZ(vec3d);
|