    001    package net.minecraft.src;
    002
    003    import java.io.DataInput;
    004    import java.io.DataOutput;
    005    import java.io.IOException;
    006
    007    public class NBTTagLong extends NBTBase
    008    {
    009        /** The long value for the tag. */
    010        public long data;
    011
    012        public NBTTagLong(String par1Str)
    013        {
    014            super(par1Str);
    015        }
    016
    017        public NBTTagLong(String par1Str, long par2)
    018        {
    019            super(par1Str);
    020            this.data = par2;
    021        }
    022
    023        /**
    024         * Write the actual data contents of the tag, implemented in NBT extension classes
    025         */
    026        void write(DataOutput par1DataOutput) throws IOException
    027        {
    028            par1DataOutput.writeLong(this.data);
    029        }
    030
    031        /**
    032         * Read the actual data contents of the tag, implemented in NBT extension classes
    033         */
    034        void load(DataInput par1DataInput) throws IOException
    035        {
    036            this.data = par1DataInput.readLong();
    037        }
    038
    039        /**
    040         * Gets the type byte for the tag.
    041         */
    042        public byte getId()
    043        {
    044            return (byte)4;
    045        }
    046
    047        public String toString()
    048        {
    049            return "" + this.data;
    050        }
    051
    052        /**
    053         * Creates a clone of the tag.
    054         */
    055        public NBTBase copy()
    056        {
    057            return new NBTTagLong(this.getName(), this.data);
    058        }
    059
    060        public boolean equals(Object par1Obj)
    061        {
    062            if (super.equals(par1Obj))
    063            {
    064                NBTTagLong var2 = (NBTTagLong)par1Obj;
    065                return this.data == var2.data;
    066            }
    067            else
    068            {
    069                return false;
    070            }
    071        }
    072
    073        public int hashCode()
    074        {
    075            return super.hashCode() ^(int)(this.data ^ this.data >>> 32);
    076        }
    077    }