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:
Ursprung
b4418c02ca
Commit
2e289a1d18
@ -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);
|
||||
}
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren