package JAKJ . RedstoneInMotion ;

public class CarriageItem extends BlockItem
{
	public CarriageItem ( int Id )
	{
		super ( Id ) ;
	}

	@Override
	public int getMetadata ( int Damage )
	{
		return ( Damage ) ;
	}

	@Override
	public String GetName ( Stack Stack )
	{
		return ( Carriage . Types . values ( ) [ Stack . GetDamage ( ) ] . Name ) ;
	}

	@Override
	public void PopulateTooltip ( Stack Stack )
	{
		PopulateTooltip ( Carriage . Types . values ( ) [ Stack . GetDamage ( ) ] . Tooltip ) ;

		if ( Stack . HasTag ( ) )
		{
			Stack Decoration = Stack . GetStack ( "Decoration" ) ;

			if ( Decoration != null )
			{
				String DecorationLine = "Decoration: " ;

				try
				{
					DecorationLine += ( ( net . minecraft . item . ItemBlock ) Decoration . Stack . getItem ( ) ) . getItemDisplayName ( Decoration . Stack ) ;
				}
				catch ( Throwable Throwable )
				{
					Throwable . printStackTrace ( ) ;

					DecorationLine += "(invalid)" ;
				}

				PopulateTooltip ( DecorationLine ) ;
			}
		}
	}
}
