Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-11-03 14:50:30 +01: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