Added Item Routing ritual.

Added performance improvements to magnetism ritual!
This commit is contained in:
WayofTime 2015-01-20 17:27:53 -05:00
parent 2f0a1c9909
commit 1b4879ad64
25 changed files with 429 additions and 149 deletions

View file

@ -1,7 +1,9 @@
package WayofTime.alchemicalWizardry.common.items.routing;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import WayofTime.alchemicalWizardry.api.RoutingFocusLogic;
import WayofTime.alchemicalWizardry.api.RoutingFocusLogicModItems;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@ -16,11 +18,29 @@ public class OutputRoutingFocus extends RoutingFocus
@SideOnly(Side.CLIENT)
public void registerIcons(IIconRegister iconRegister)
{
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:HarvestGoddessSigil_deactivated");
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:OutputRoutingFocus");
}
public boolean doesItemMatch(ItemStack keyStack, ItemStack checkedStack)
@SideOnly(Side.CLIENT)
public IIcon getIconFromDamage(int damage)
{
switch(damage)
{
case 0:
return this.itemIcon;
}
return this.itemIcon;
}
public RoutingFocusLogic getLogic(int damage)
{
return keyStack != null ? checkedStack != null && keyStack.areItemStacksEqual(keyStack, checkedStack) : false;
switch(damage)
{
case 0:
return new RoutingFocusLogic();
case 1:
return new RoutingFocusLogicModItems();
}
return new RoutingFocusLogic();
}
}