All the items !sigils

This commit is contained in:
Arcaratus 2015-07-30 17:24:20 -04:00
parent d88cc2d79e
commit a2c4f4b965
129 changed files with 587 additions and 1134 deletions

View file

@ -3,7 +3,7 @@ package WayofTime.alchemicalWizardry.common.items.sigil;
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade;
import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil;
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
import WayofTime.alchemicalWizardry.common.items.BindableItems;
import cpw.mods.fml.common.eventhandler.Event.Result;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@ -24,7 +24,7 @@ import net.minecraftforge.event.entity.player.BonemealEvent;
import java.util.List;
public class SigilOfGrowth extends EnergyItems implements ArmourUpgrade, ISigil
public class SigilOfGrowth extends BindableItems implements ArmourUpgrade, ISigil
{
@SideOnly(Side.CLIENT)
private IIcon activeIcon;
@ -104,11 +104,11 @@ public class SigilOfGrowth extends EnergyItems implements ArmourUpgrade, ISigil
@Override
public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, int par5, int par6, int par7, float par8, float par9, float par10)
{
if (EnergyItems.checkAndSetItemOwner(par1ItemStack, par2EntityPlayer))
if (BindableItems.checkAndSetItemOwner(par1ItemStack, par2EntityPlayer))
{
if (applyBonemeal(par1ItemStack, par3World, par4, par5, par6, par2EntityPlayer))
{
EnergyItems.syphonBatteries(par1ItemStack, par2EntityPlayer, getEnergyUsed());
BindableItems.syphonBatteries(par1ItemStack, par2EntityPlayer, getEnergyUsed());
if (par3World.isRemote)
{
@ -125,7 +125,7 @@ public class SigilOfGrowth extends EnergyItems implements ArmourUpgrade, ISigil
@Override
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)
{
if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking())
if (!BindableItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking())
{
return par1ItemStack;
}
@ -143,7 +143,7 @@ public class SigilOfGrowth extends EnergyItems implements ArmourUpgrade, ISigil
NBTTagCompound tag = par1ItemStack.getTagCompound();
tag.setBoolean("isActive", !(tag.getBoolean("isActive")));
if (tag.getBoolean("isActive") && EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed()))
if (tag.getBoolean("isActive") && BindableItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed()))
{
par1ItemStack.setItemDamage(1);
tag.setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % tickDelay);
@ -172,7 +172,7 @@ public class SigilOfGrowth extends EnergyItems implements ArmourUpgrade, ISigil
{
if (par2World.getWorldTime() % tickDelay == par1ItemStack.getTagCompound().getInteger("worldTimeDelay"))
{
if(!EnergyItems.syphonBatteries(par1ItemStack, (EntityPlayer) par3Entity, getEnergyUsed()))
if(!BindableItems.syphonBatteries(par1ItemStack, (EntityPlayer) par3Entity, getEnergyUsed()))
{
par1ItemStack.getTagCompound().setBoolean("isActive", false);
}