Skip to content

PlayerPositionAndLookPacket #274

@ytka-ciber

Description

@ytka-ciber

I tried to move the character 1 block forward, but I still didn't figure out how to write the PlayerPositionAndLookPacket package.
Code:

current_position = clientbound.play.PlayerPositionAndLookPacket.PositionAndLook(
x=-13, y=70, z=-48, yaw=1, pitch=1)

packet = clientbound.play.PlayerPositionAndLookPacket()
packet.x = -13
packet.y = 70
packet.z = -48
packet.yaw = 4.0
packet.pitch = 5.0

packet.flags = 0

packet.apply(current_position)
connection.write_packet(packet)

Error: AttributeError: 'PlayerPositionAndLookPacket' object has no attribute 'teleport_id'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions