mirror of
https://github.com/Nan1t/NanoLimbo.git
synced 2025-07-14 05:20:12 +02:00
Fixed packet for 1.8
This commit is contained in:
parent
515fd392c3
commit
e4c2c1f472
@ -88,7 +88,16 @@ public class PacketJoinGame implements PacketOut {
|
||||
public void encode(ByteMessage msg, Version version) {
|
||||
msg.writeInt(entityId);
|
||||
|
||||
if (version.fromTo(Version.V1_8, Version.V1_13_2)) {
|
||||
if (version.fromTo(Version.V1_8, Version.V1_9_1)) {
|
||||
msg.writeByte(gameMode);
|
||||
msg.writeByte(dimension.getId());
|
||||
msg.writeByte(0); // Difficulty
|
||||
msg.writeByte(maxPlayers);
|
||||
msg.writeString("flat"); // Level type
|
||||
msg.writeBoolean(reducedDebugInfo);
|
||||
}
|
||||
|
||||
if (version.fromTo(Version.V1_9_2, Version.V1_13_2)) {
|
||||
msg.writeByte(gameMode);
|
||||
msg.writeInt(dimension.getId());
|
||||
msg.writeByte(0); // Difficulty
|
||||
|
@ -51,7 +51,7 @@ public class PacketPlayerPositionAndLook implements PacketOut {
|
||||
msg.writeFloat(pitch);
|
||||
|
||||
if (version.less(Version.V1_9)) {
|
||||
msg.writeBoolean(false); // On ground
|
||||
msg.writeBoolean(true); // On ground
|
||||
} else {
|
||||
msg.writeByte(flags);
|
||||
msg.writeVarInt(teleportId);
|
||||
|
Loading…
x
Reference in New Issue
Block a user