Skip to content

Commit 7ba5418

Browse files
authored
Merge pull request #1387 from Axionize/fix/lp-vector-3
Fix incorrect encoding of LPVector3d
2 parents efeb901 + b4e5b10 commit 7ba5418

File tree

1 file changed

+1
-1
lines changed
  • api/src/main/java/com/github/retrooper/packetevents/protocol/util

1 file changed

+1
-1
lines changed

api/src/main/java/com/github/retrooper/packetevents/protocol/util/LpVector3d.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public static void write(PacketWrapper<?> wrapper, Vector3d vector) {
6767
}
6868
long maxLong = MathUtil.ceilLong(max);
6969
boolean large = (maxLong & 0b11L) != maxLong;
70-
long mul = large ? ((maxLong % 0b11L) | 0b100L) : maxLong;
70+
long mul = large ? ((maxLong & 0b11L) | 0b100L) : maxLong;
7171
long packedX = pack(x / (double) maxLong) << 3;
7272
long packedY = pack(y / (double) maxLong) << 18;
7373
long packedZ = pack(z / (double) maxLong) << 33;

0 commit comments

Comments
 (0)