package JAKJ . RedstoneInMotion ;

public class ToolItemSet extends Item
{
	public static int Id ;

	public enum Types
	{
		Screwdriver ;

		public net . minecraft . util . Icon Icon ;
	}

	public ToolItemSet ( )
	{
		super ( Id ) ;

		setMaxStackSize ( 1 ) ;
	}

	@Override
	public String getItemDisplayName ( net . minecraft . item . ItemStack Item )
	{
		try
		{
			switch ( Types . values ( ) [ Item . itemDamage ] )
			{
				case Screwdriver :

					return ( "Screwdriver" ) ;
			}
		}
		catch ( Throwable Throwable )
		{
			Throwable . printStackTrace ( ) ;
		}

		return ( "INVALID ITEM" ) ;
	}

	@Override
	public void AddShowcaseStacks ( java . util . List Showcase )
	{
		for ( Types Type : Types . values ( ) )
		{
			Showcase . add ( Stack . New ( this , Type ) ) ;
		}
	}

	@Override
	public void registerIcons ( net . minecraft . client . renderer . texture . IconRegister IconRegister )
	{
		for ( Types Type : Types . values ( ) )
		{
			Type . Icon = Registry . RegisterIcon ( IconRegister , Type . name ( ) ) ;
		}
	}

	@Override
	public net . minecraft . util . Icon getIconFromDamage ( int Damage )
	{
		try
		{
			return ( Types . values ( ) [ Damage ] . Icon ) ;
		}
		catch ( Throwable Throwable )
		{
			Throwable . printStackTrace ( ) ;

			return ( super . getIconFromDamage ( Damage ) ) ;
		}
	}

	public static boolean IsScrewdriverOrEquivalent ( net . minecraft . item . ItemStack Item )
	{
		if ( Item == null )
		{
			return ( false ) ;
		}

		if ( Item . itemID == Items . ToolItemSet . itemID )
		{
			if ( Item . itemDamage == Types . Screwdriver . ordinal ( ) )
			{
				return ( true ) ;
			}
		}

		if ( ModInteraction . OmniwrenchClass != null )
		{
			if ( ModInteraction . OmniwrenchClass . isInstance ( Item . getItem ( ) ) )
			{
				return ( true ) ;
			}
		}

		return ( false ) ;
	}
}
