3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-09-08 22:02:50 +02:00

Fix encoding of position

Huge thanks to those involved on this goose hunt.
Dieser Commit ist enthalten in:
Myles 2019-04-23 22:15:05 +01:00
Ursprung b4418c02ca
Commit 2e289a1d18

Datei anzeigen

@ -12,9 +12,10 @@ public class Position1_14Type extends Type<Position> {
@Override
public Position read(ByteBuf buffer) {
long val = buffer.readLong();
long x = (val >> 38);
long y = val & 0xfff;
long z = (((val << 38) >> 38)) >> 12;
long y = val << 52 >> 52;
long z = val << 26 >> 38;
return new Position(x, y, z);
}