mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-14 09:56:37 -04:00
network: fix BlockPlace packet writing, fix gamemode in JoinGame (remove debug statement)
This commit is contained in:
parent
3e49afab2f
commit
3cc6a57859
@ -51,9 +51,7 @@ class BlockPlaceC2SP(
|
||||
buffer.writeVarInt(hand.ordinal)
|
||||
}
|
||||
}
|
||||
if (buffer.versionId >= ProtocolVersions.V_19W03A) {
|
||||
buffer.writeBoolean(insideBlock)
|
||||
}
|
||||
|
||||
if (buffer.versionId < ProtocolVersions.V_16W39C) {
|
||||
buffer.writeByte((cursorPosition.x * 15.0f).toInt())
|
||||
buffer.writeByte((cursorPosition.y * 15.0f).toInt())
|
||||
@ -63,6 +61,10 @@ class BlockPlaceC2SP(
|
||||
buffer.writeFloat(cursorPosition.y)
|
||||
buffer.writeFloat(cursorPosition.z)
|
||||
}
|
||||
|
||||
if (buffer.versionId >= ProtocolVersions.V_19W03A) {
|
||||
buffer.writeBoolean(insideBlock)
|
||||
}
|
||||
}
|
||||
|
||||
override fun log() {
|
||||
|
@ -83,8 +83,7 @@ class JoinGameS2CP(buffer: PlayInByteBuffer) : PlayS2CPacket() {
|
||||
gamemode = Gamemodes[(gamemodeRaw and (0x8.inv()))]
|
||||
} else {
|
||||
isHardcore = buffer.readBoolean()
|
||||
buffer.readUnsignedByte()
|
||||
gamemode = Gamemodes.SURVIVAL
|
||||
gamemode = Gamemodes[buffer.readUnsignedByte()]
|
||||
}
|
||||
|
||||
if (buffer.versionId < ProtocolVersions.V_1_9_1) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user