package common.packet;

import java.io.IOException;

import common.network.PacketBuffer;

public class SPacketEntityLookMove extends SPacketEntity
{
    public SPacketEntityLookMove()
    {
        this.rotation = true;
    }

    public SPacketEntityLookMove(int p_i45973_1_, byte p_i45973_2_, byte p_i45973_3_, byte p_i45973_4_, byte p_i45973_5_, byte p_i45973_6_, boolean p_i45973_7_)
    {
        super(p_i45973_1_);
        this.posX = p_i45973_2_;
        this.posY = p_i45973_3_;
        this.posZ = p_i45973_4_;
        this.yaw = p_i45973_5_;
        this.pitch = p_i45973_6_;
        this.onGround = p_i45973_7_;
        this.rotation = true;
    }

    public void readPacketData(PacketBuffer buf) throws IOException
    {
        super.readPacketData(buf);
        this.posX = buf.readByte();
        this.posY = buf.readByte();
        this.posZ = buf.readByte();
        this.yaw = buf.readByte();
        this.pitch = buf.readByte();
        this.onGround = buf.readBoolean();
    }

    public void writePacketData(PacketBuffer buf) throws IOException
    {
        super.writePacketData(buf);
        buf.writeByte(this.posX);
        buf.writeByte(this.posY);
        buf.writeByte(this.posZ);
        buf.writeByte(this.yaw);
        buf.writeByte(this.pitch);
        buf.writeBoolean(this.onGround);
    }
}