2015-01-16 11:22:50 -05:00
|
|
|
package WayofTime.alchemicalWizardry.common.items.routing;
|
|
|
|
|
|
|
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
2015-01-23 07:53:40 -05:00
|
|
|
import net.minecraft.item.ItemStack;
|
2015-01-20 17:27:53 -05:00
|
|
|
import net.minecraft.util.IIcon;
|
|
|
|
import WayofTime.alchemicalWizardry.api.RoutingFocusLogic;
|
2015-01-23 07:53:40 -05:00
|
|
|
import WayofTime.alchemicalWizardry.api.RoutingFocusLogicIgnMeta;
|
|
|
|
import WayofTime.alchemicalWizardry.api.RoutingFocusLogicMatchNBT;
|
2015-01-20 17:27:53 -05:00
|
|
|
import WayofTime.alchemicalWizardry.api.RoutingFocusLogicModItems;
|
2015-01-16 11:22:50 -05:00
|
|
|
import cpw.mods.fml.relauncher.Side;
|
|
|
|
import cpw.mods.fml.relauncher.SideOnly;
|
|
|
|
|
|
|
|
public class OutputRoutingFocus extends RoutingFocus
|
|
|
|
{
|
2015-01-23 07:53:40 -05:00
|
|
|
IIcon modItemIcon;
|
2015-01-16 11:22:50 -05:00
|
|
|
public OutputRoutingFocus()
|
|
|
|
{
|
|
|
|
super();
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@SideOnly(Side.CLIENT)
|
|
|
|
public void registerIcons(IIconRegister iconRegister)
|
|
|
|
{
|
2015-01-20 17:27:53 -05:00
|
|
|
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:OutputRoutingFocus");
|
2015-01-23 07:53:40 -05:00
|
|
|
this.modItemIcon = iconRegister.registerIcon("AlchemicalWizardry:OutputRoutingFocusModItems");
|
2015-01-16 11:22:50 -05:00
|
|
|
}
|
|
|
|
|
2015-01-20 17:27:53 -05:00
|
|
|
@SideOnly(Side.CLIENT)
|
|
|
|
public IIcon getIconFromDamage(int damage)
|
|
|
|
{
|
|
|
|
switch(damage)
|
|
|
|
{
|
|
|
|
case 0:
|
|
|
|
return this.itemIcon;
|
2015-01-23 07:53:40 -05:00
|
|
|
case 1:
|
|
|
|
return this.modItemIcon;
|
2015-01-20 17:27:53 -05:00
|
|
|
}
|
|
|
|
return this.itemIcon;
|
|
|
|
}
|
|
|
|
|
2015-01-23 07:53:40 -05:00
|
|
|
@Override
|
|
|
|
public String getUnlocalizedName(ItemStack itemStack)
|
|
|
|
{
|
|
|
|
String addedString = "";
|
|
|
|
|
|
|
|
switch(itemStack.getItemDamage())
|
|
|
|
{
|
|
|
|
case 0:
|
|
|
|
addedString = "default";
|
|
|
|
break;
|
|
|
|
case 1:
|
|
|
|
addedString = "modItem";
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
return super.getUnlocalizedName() + "." + addedString;
|
|
|
|
}
|
|
|
|
|
2015-01-20 17:27:53 -05:00
|
|
|
public RoutingFocusLogic getLogic(int damage)
|
2015-01-16 11:22:50 -05:00
|
|
|
{
|
2015-01-20 17:27:53 -05:00
|
|
|
switch(damage)
|
|
|
|
{
|
|
|
|
case 0:
|
|
|
|
return new RoutingFocusLogic();
|
|
|
|
case 1:
|
|
|
|
return new RoutingFocusLogicModItems();
|
2015-01-23 07:53:40 -05:00
|
|
|
case 2:
|
|
|
|
return new RoutingFocusLogicIgnMeta();
|
|
|
|
case 3:
|
|
|
|
return new RoutingFocusLogicMatchNBT();
|
2015-01-20 17:27:53 -05:00
|
|
|
}
|
|
|
|
return new RoutingFocusLogic();
|
2015-01-16 11:22:50 -05:00
|
|
|
}
|
|
|
|
}
|