    001package net.minecraft.network.packet;
    002
    003import cpw.mods.fml.relauncher.Side;
    004import cpw.mods.fml.relauncher.SideOnly;
    005import java.io.DataInputStream;
    006import java.io.DataOutputStream;
    007import java.io.IOException;
    008
    009public class Packet12PlayerLook extends Packet10Flying
    010{
    011    public Packet12PlayerLook()
    012    {
    013        this.rotating = true;
    014    }
    015
    016    @SideOnly(Side.CLIENT)
    017    public Packet12PlayerLook(float par1, float par2, boolean par3)
    018    {
    019        this.yaw = par1;
    020        this.pitch = par2;
    021        this.onGround = par3;
    022        this.rotating = true;
    023    }
    024
    025    /**
    026     * Abstract. Reads the raw packet data from the data stream.
    027     */
    028    public void readPacketData(DataInputStream par1DataInputStream) throws IOException
    029    {
    030        this.yaw = par1DataInputStream.readFloat();
    031        this.pitch = par1DataInputStream.readFloat();
    032        super.readPacketData(par1DataInputStream);
    033    }
    034
    035    /**
    036     * Abstract. Writes the raw packet data to the data stream.
    037     */
    038    public void writePacketData(DataOutputStream par1DataOutputStream) throws IOException
    039    {
    040        par1DataOutputStream.writeFloat(this.yaw);
    041        par1DataOutputStream.writeFloat(this.pitch);
    042        super.writePacketData(par1DataOutputStream);
    043    }
    044
    045    /**
    046     * Abstract. Return the size of the packet (not counting the header).
    047     */
    048    public int getPacketSize()
    049    {
    050        return 9;
    051    }
    052}