package JAKJ . RedstoneInMotion ;

public class BlockPosition implements Comparable < BlockPosition >
{
	public int X ;
	public int Y ;
	public int Z ;

	public int Dimension ;

	public net . minecraft . world . World World ;

	public BlockPosition ( int X , int Y , int Z , int Dimension , net . minecraft . world . World World )
	{
		this . X = X ;
		this . Y = Y ;
		this . Z = Z ;

		this . Dimension = Dimension ;

		this . World = World ;
	}

	@Override
	public String toString ( )
	{
		return ( X + "|" + Y + "|" + Z + "|" + Dimension + "|" + World ) ;
	}

	@Override
	public boolean equals ( Object Object )
	{
		if ( ! ( Object instanceof BlockPosition ) )
		{
			return ( false ) ;
		}

		BlockPosition Target = ( BlockPosition ) Object ;

		if ( Target . X != X )
		{
			return ( false ) ;
		}

		if ( Target . Y != Y )
		{
			return ( false ) ;
		}

		if ( Target . Z != Z )
		{
			return ( false ) ;
		}

		if ( Target . Dimension != Dimension )
		{
			return ( false ) ;
		}

		return ( true ) ;
	}

	@Override
	public int compareTo ( BlockPosition Target )
	{
		int Result = X - Target . X ;

		if ( Result == 0 )
		{
			Result = Y - Target . Y ;

			if ( Result == 0 )
			{
				Result = Z - Target . Z ;

				if ( Result == 0 )
				{
					Result = Dimension - Target . Dimension ;
				}
			}
		}

		return ( Result ) ;
	}
}
