Added Item Routing ritual.
Added performance improvements to magnetism ritual!
This commit is contained in:
parent
2f0a1c9909
commit
1b4879ad64
25 changed files with 429 additions and 149 deletions
|
@ -15,6 +15,6 @@ public class InputRoutingFocus extends RoutingFocus
|
|||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister iconRegister)
|
||||
{
|
||||
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:HarvestGoddessSigil_deactivated");
|
||||
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:InputRoutingFocus");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,6 +11,8 @@ import net.minecraft.tileentity.TileEntity;
|
|||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.RoutingFocusPosAndFacing;
|
||||
import WayofTime.alchemicalWizardry.common.Int3;
|
||||
|
||||
public class RoutingFocus extends Item
|
||||
{
|
||||
|
@ -21,6 +23,11 @@ public class RoutingFocus extends Item
|
|||
this.setCreativeTab(AlchemicalWizardry.tabBloodMagic);
|
||||
}
|
||||
|
||||
public RoutingFocusPosAndFacing getPosAndFacing(ItemStack itemStack)
|
||||
{
|
||||
return new RoutingFocusPosAndFacing(new Int3(this.xCoord(itemStack), this.yCoord(itemStack), this.zCoord(itemStack)), this.getSetDirection(itemStack));
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer player)
|
||||
{
|
||||
|
@ -68,7 +75,7 @@ public class RoutingFocus extends Item
|
|||
@Override
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4)
|
||||
{
|
||||
par3List.add("An Enderpearl imbued with blood");
|
||||
par3List.add(this.getFocusDescription());
|
||||
|
||||
if (!(par1ItemStack.getTagCompound() == null))
|
||||
{
|
||||
|
@ -78,6 +85,11 @@ public class RoutingFocus extends Item
|
|||
par3List.add("Direction: " + this.getSetDirection(par1ItemStack));
|
||||
}
|
||||
}
|
||||
|
||||
public String getFocusDescription()
|
||||
{
|
||||
return "An Enderpearl imbued with blood";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onItemUseFirst(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue