mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-15 10:25:06 -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
|
import de.bixilon.minosoft.util.logging.LogMessageType
|
||||||
|
|
||||||
class PositionRotationS2CP(buffer: PlayInByteBuffer) : PlayS2CPacket {
|
class PositionRotationS2CP(buffer: PlayInByteBuffer) : PlayS2CPacket {
|
||||||
val position: Vec3d = buffer.readVec3d()
|
val position: Vec3d = Vec3d(buffer.readDoubleArray(3))
|
||||||
val rotation: EntityRotation
|
val rotation: EntityRotation
|
||||||
var onGround = false
|
var onGround = false
|
||||||
private var flags: Int = 0
|
private var flags: Int = 0
|
||||||
|
@ -23,11 +23,7 @@ import de.bixilon.minosoft.util.logging.LogMessageType
|
|||||||
|
|
||||||
class TeleportS2CP(buffer: PlayInByteBuffer) : PlayS2CPacket {
|
class TeleportS2CP(buffer: PlayInByteBuffer) : PlayS2CPacket {
|
||||||
val entityId: Int = buffer.readEntityId()
|
val entityId: Int = buffer.readEntityId()
|
||||||
val position: Vec3d = if (buffer.versionId < ProtocolVersions.V_16W06A) {
|
val position: Vec3d = buffer.readVec3d()
|
||||||
Vec3d(buffer.readFixedPointNumberInt(), buffer.readFixedPointNumberInt(), buffer.readFixedPointNumberInt())
|
|
||||||
} else {
|
|
||||||
buffer.readVec3d()
|
|
||||||
}
|
|
||||||
val rotation = buffer.readEntityRotation()
|
val rotation = buffer.readEntityRotation()
|
||||||
val onGround = if (buffer.versionId >= ProtocolVersions.V_14W25B) {
|
val onGround = if (buffer.versionId >= ProtocolVersions.V_14W25B) {
|
||||||
buffer.readBoolean()
|
buffer.readBoolean()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user