001package net.minecraft.network.packet;
002
003import java.io.DataInputStream;
004import java.io.DataOutputStream;
005import java.io.IOException;
006
007public class Packet4UpdateTime extends Packet
008{
009    public long field_82562_a;
010
011    /** The world time in minutes. */
012    public long time;
013
014    public Packet4UpdateTime() {}
015
016    public Packet4UpdateTime(long par1, long par3)
017    {
018        this.field_82562_a = par1;
019        this.time = par3;
020    }
021
022    /**
023     * Abstract. Reads the raw packet data from the data stream.
024     */
025    public void readPacketData(DataInputStream par1DataInputStream) throws IOException
026    {
027        this.field_82562_a = par1DataInputStream.readLong();
028        this.time = par1DataInputStream.readLong();
029    }
030
031    /**
032     * Abstract. Writes the raw packet data to the data stream.
033     */
034    public void writePacketData(DataOutputStream par1DataOutputStream) throws IOException
035    {
036        par1DataOutputStream.writeLong(this.field_82562_a);
037        par1DataOutputStream.writeLong(this.time);
038    }
039
040    /**
041     * Passes this Packet on to the NetHandler for processing.
042     */
043    public void processPacket(NetHandler par1NetHandler)
044    {
045        par1NetHandler.handleUpdateTime(this);
046    }
047
048    /**
049     * Abstract. Return the size of the packet (not counting the header).
050     */
051    public int getPacketSize()
052    {
053        return 16;
054    }
055
056    /**
057     * only false for the abstract Packet class, all real packets return true
058     */
059    public boolean isRealPacket()
060    {
061        return true;
062    }
063
064    /**
065     * eg return packet30entity.entityId == entityId; WARNING : will throw if you compare a packet to a different packet
066     * class
067     */
068    public boolean containsSameEntityIDAs(Packet par1Packet)
069    {
070        return true;
071    }
072
073    /**
074     * If this returns true, the packet may be processed on any thread; otherwise it is queued for the main thread to
075     * handle.
076     */
077    public boolean canProcessAsync()
078    {
079        return true;
080    }
081}