    001package net.minecraft.network.packet;
    002
    003import java.io.DataInputStream;
    004import java.io.DataOutputStream;
    005import java.io.IOException;
    006import net.minecraft.scoreboard.ScoreObjective;
    007
    008public class Packet206SetObjective extends Packet
    009{
    010    public String field_96484_a;
    011    public String field_96482_b;
    012    public int field_96483_c;
    013
    014    public Packet206SetObjective() {}
    015
    016    public Packet206SetObjective(ScoreObjective par1, int par2)
    017    {
    018        this.field_96484_a = par1.func_96679_b();
    019        this.field_96482_b = par1.func_96678_d();
    020        this.field_96483_c = par2;
    021    }
    022
    023    /**
    024     * Abstract. Reads the raw packet data from the data stream.
    025     */
    026    public void readPacketData(DataInputStream par1DataInputStream) throws IOException
    027    {
    028        this.field_96484_a = readString(par1DataInputStream, 16);
    029        this.field_96482_b = readString(par1DataInputStream, 32);
    030        this.field_96483_c = par1DataInputStream.readByte();
    031    }
    032
    033    /**
    034     * Abstract. Writes the raw packet data to the data stream.
    035     */
    036    public void writePacketData(DataOutputStream par1DataOutputStream) throws IOException
    037    {
    038        writeString(this.field_96484_a, par1DataOutputStream);
    039        writeString(this.field_96482_b, par1DataOutputStream);
    040        par1DataOutputStream.writeByte(this.field_96483_c);
    041    }
    042
    043    /**
    044     * Passes this Packet on to the NetHandler for processing.
    045     */
    046    public void processPacket(NetHandler par1NetHandler)
    047    {
    048        par1NetHandler.func_96436_a(this);
    049    }
    050
    051    /**
    052     * Abstract. Return the size of the packet (not counting the header).
    053     */
    054    public int getPacketSize()
    055    {
    056        return 2 + this.field_96484_a.length() + 2 + this.field_96482_b.length() + 1;
    057    }
    058}