mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-14 18:05:51 -04:00
network: fix 1.8 PositionRotationS2CP reading
This commit is contained in:
parent
2a78b941d3
commit
f786af9178
@ -27,7 +27,7 @@ import de.bixilon.minosoft.util.logging.LogLevels
|
||||
import de.bixilon.minosoft.util.logging.LogMessageType
|
||||
|
||||
class PositionRotationS2CP(buffer: PlayInByteBuffer) : PlayS2CPacket {
|
||||
val position: Vec3d = buffer.readVec3d()
|
||||
val position: Vec3d = Vec3d(buffer.readDoubleArray(3))
|
||||
val rotation: EntityRotation
|
||||
var onGround = false
|
||||
private var flags: Int = 0
|
||||
|
@ -23,11 +23,7 @@ import de.bixilon.minosoft.util.logging.LogMessageType
|
||||
|
||||
class TeleportS2CP(buffer: PlayInByteBuffer) : PlayS2CPacket {
|
||||
val entityId: Int = buffer.readEntityId()
|
||||
val position: Vec3d = if (buffer.versionId < ProtocolVersions.V_16W06A) {
|
||||
Vec3d(buffer.readFixedPointNumberInt(), buffer.readFixedPointNumberInt(), buffer.readFixedPointNumberInt())
|
||||
} else {
|
||||
buffer.readVec3d()
|
||||
}
|
||||
val position: Vec3d = buffer.readVec3d()
|
||||
val rotation = buffer.readEntityRotation()
|
||||
val onGround = if (buffer.versionId >= ProtocolVersions.V_14W25B) {
|
||||
buffer.readBoolean()
|
||||
|
Loading…
x
Reference in New Issue
Block a user