package net.minecraft.nbt;

import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;

public class NBTTagInt extends NBTBase.NBTPrimitive
{
	private int data;
	private static final String __OBFID = "CL_00001223";

	NBTTagInt() {}

	public NBTTagInt(int p_i45133_1_)
	{
		this.data = p_i45133_1_;
	}

	void write(DataOutput par1DataOutput) throws IOException
	{
		par1DataOutput.writeInt(this.data);
	}

	void load(DataInput par1DataInput, int par2) throws IOException
	{
		this.data = par1DataInput.readInt();
	}

	public byte getId()
	{
		return (byte)3;
	}

	public String toString()
	{
		return "" + this.data;
	}

	public NBTBase copy()
	{
		return new NBTTagInt(this.data);
	}

	public boolean equals(Object par1Obj)
	{
		if (super.equals(par1Obj))
		{
			NBTTagInt nbttagint = (NBTTagInt)par1Obj;
			return this.data == nbttagint.data;
		}
		else
		{
			return false;
		}
	}

	public int hashCode()
	{
		return super.hashCode() ^ this.data;
	}

	public long func_150291_c()
	{
		return (long)this.data;
	}

	public int func_150287_d()
	{
		return this.data;
	}

	public short func_150289_e()
	{
		return (short)(this.data & 65535);
	}

	public byte func_150290_f()
	{
		return (byte)(this.data & 255);
	}

	public double func_150286_g()
	{
		return (double)this.data;
	}

	public float func_150288_h()
	{
		return (float)this.data;
	}
}