aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0471-MC-4-Fix-item-position-desync.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/server/0471-MC-4-Fix-item-position-desync.patch')
-rw-r--r--patches/server/0471-MC-4-Fix-item-position-desync.patch18
1 files changed, 9 insertions, 9 deletions
diff --git a/patches/server/0471-MC-4-Fix-item-position-desync.patch b/patches/server/0471-MC-4-Fix-item-position-desync.patch
index 5b680e0dd0..597d2419e2 100644
--- a/patches/server/0471-MC-4-Fix-item-position-desync.patch
+++ b/patches/server/0471-MC-4-Fix-item-position-desync.patch
@@ -9,26 +9,26 @@ loss, which forces the server to lose the same precision as the client
keeping them in sync.
diff --git a/src/main/java/net/minecraft/network/protocol/game/VecDeltaCodec.java b/src/main/java/net/minecraft/network/protocol/game/VecDeltaCodec.java
-index 05ac41e136da43284fb24a6b698ebd36318278fb..3c4ac79c094dc2fff7de94150a34b7bf814ac0de 100644
+index fb44116303ab1fed9d867087531c7601c015ddb9..a3d247c93ac1a2d872ff0e3841efc3d7b84fcbc1 100644
--- a/src/main/java/net/minecraft/network/protocol/game/VecDeltaCodec.java
+++ b/src/main/java/net/minecraft/network/protocol/game/VecDeltaCodec.java
@@ -9,12 +9,12 @@ public class VecDeltaCodec {
@VisibleForTesting
static long encode(double value) {
-- return Math.round(value * 4096.0D);
-+ return Math.round(value * 4096.0D); // Paper - Fix MC-4; diff on change
+- return Math.round(value * 4096.0);
++ return Math.round(value * 4096.0); // Paper - Fix MC-4; diff on change
}
@VisibleForTesting
static double decode(long value) {
-- return (double)value / 4096.0D;
-+ return (double)value / 4096.0D; // Paper - Fix MC-4; diff on change
+- return value / 4096.0;
++ return value / 4096.0; // Paper - Fix MC-4; diff on change
}
public Vec3 decode(long x, long y, long z) {
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
-index 82ccfd91dfd3cce35a35edf8f73ccdd1ddd1fd6a..18cf11ddcf51e8b6251fd6df97f85e0ed15900c4 100644
+index 82ccfd91dfd3cce35a35edf8f73ccdd1ddd1fd6a..c3ca11cc4abe85132b099af1cb27772dbf40bfe1 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -4186,6 +4186,16 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
@@ -39,9 +39,9 @@ index 82ccfd91dfd3cce35a35edf8f73ccdd1ddd1fd6a..18cf11ddcf51e8b6251fd6df97f85e0e
+ if (this instanceof ItemEntity) {
+ if (io.papermc.paper.configuration.GlobalConfiguration.get().misc.fixEntityPositionDesync) {
+ // encode/decode from ClientboundMoveEntityPacket
-+ x = Mth.lfloor(x * 4096.0D) * (1 / 4096.0D);
-+ y = Mth.lfloor(y * 4096.0D) * (1 / 4096.0D);
-+ z = Mth.lfloor(z * 4096.0D) * (1 / 4096.0D);
++ x = Mth.lfloor(x * 4096.0) * (1 / 4096.0);
++ y = Mth.lfloor(y * 4096.0) * (1 / 4096.0);
++ z = Mth.lfloor(z * 4096.0) * (1 / 4096.0);
+ }
+ }
+ // Paper end - Fix MC-4