Performance Commit --Too lazy to do the Altar recipe
This commit is contained in:
parent
013367cffa
commit
e5b795fddc
217 changed files with 840 additions and 1244 deletions
|
@ -17,8 +17,10 @@ import java.util.List;
|
|||
|
||||
public class ArmourInhibitor extends EnergyItems
|
||||
{
|
||||
private static IIcon activeIcon;
|
||||
private static IIcon passiveIcon;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon activeIcon;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon passiveIcon;
|
||||
private int tickDelay = 200;
|
||||
|
||||
public ArmourInhibitor()
|
||||
|
@ -110,10 +112,6 @@ public class ArmourInhibitor extends EnergyItems
|
|||
{
|
||||
par1ItemStack.setItemDamage(1);
|
||||
tag.setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % tickDelay);
|
||||
|
||||
if (!par3EntityPlayer.capabilities.isCreativeMode)
|
||||
{
|
||||
}
|
||||
} else
|
||||
{
|
||||
par1ItemStack.setItemDamage(par1ItemStack.getMaxDamage());
|
||||
|
@ -139,14 +137,12 @@ public class ArmourInhibitor extends EnergyItems
|
|||
|
||||
if (par1ItemStack.getTagCompound().getBoolean("isActive"))
|
||||
{
|
||||
if (par2World.getWorldTime() % tickDelay == par1ItemStack.getTagCompound().getInteger("worldTimeDelay") && par3Entity instanceof EntityPlayer)
|
||||
if (par2World.getWorldTime() % tickDelay == par1ItemStack.getTagCompound().getInteger("worldTimeDelay"))
|
||||
{
|
||||
}
|
||||
|
||||
//TODO Do stuff
|
||||
par3EntityPlayer.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionInhibit.id, 2, 0));
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,7 +33,6 @@ public class BloodShard extends Item implements ArmourUpgrade
|
|||
if (this.equals(ModItems.demonBloodShard))
|
||||
{
|
||||
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:DemonBloodShard");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -32,8 +32,10 @@ public class BoundAxe extends ItemAxe implements IBindable
|
|||
{
|
||||
public float efficiencyOnProperMaterial = 12.0F;
|
||||
public float damageVsEntity;
|
||||
private static IIcon activeIcon;
|
||||
private static IIcon passiveIcon;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon activeIcon;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon passiveIcon;
|
||||
private int energyUsed;
|
||||
|
||||
public BoundAxe()
|
||||
|
@ -212,7 +214,6 @@ public class BoundAxe extends ItemAxe implements IBindable
|
|||
}
|
||||
|
||||
par1ItemStack.setItemDamage(0);
|
||||
return;
|
||||
}
|
||||
|
||||
public void setActivated(ItemStack par1ItemStack, boolean newActivated)
|
||||
|
@ -260,19 +261,11 @@ public class BoundAxe extends ItemAxe implements IBindable
|
|||
*/
|
||||
public boolean hitEntity(ItemStack par1ItemStack, EntityLivingBase par2EntityLivingBase, EntityLivingBase par3EntityLivingBase)
|
||||
{
|
||||
if (!getActivated(par1ItemStack))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
return getActivated(par1ItemStack);
|
||||
}
|
||||
|
||||
public boolean onBlockDestroyed(ItemStack par1ItemStack, World par2World, Block par3, int par4, int par5, int par6, EntityLivingBase par7EntityLivingBase)
|
||||
{
|
||||
if ((double) par3.getBlockHardness(par2World, par4, par5, par6) != 0.0D)
|
||||
{
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -31,11 +31,12 @@ import cpw.mods.fml.relauncher.SideOnly;
|
|||
|
||||
public class BoundPickaxe extends ItemPickaxe implements IBindable
|
||||
{
|
||||
|
||||
public float efficiencyOnProperMaterial = 12.0F;
|
||||
public float damageVsEntity;
|
||||
private static IIcon activeIcon;
|
||||
private static IIcon passiveIcon;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon activeIcon;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon passiveIcon;
|
||||
|
||||
private int energyUsed;
|
||||
|
||||
|
@ -237,7 +238,6 @@ public class BoundPickaxe extends ItemPickaxe implements IBindable
|
|||
}
|
||||
|
||||
par1ItemStack.setItemDamage(0);
|
||||
return;
|
||||
}
|
||||
|
||||
public void setActivated(ItemStack par1ItemStack, boolean newActivated)
|
||||
|
@ -285,11 +285,7 @@ public class BoundPickaxe extends ItemPickaxe implements IBindable
|
|||
*/
|
||||
public boolean hitEntity(ItemStack par1ItemStack, EntityLivingBase par2EntityLivingBase, EntityLivingBase par3EntityLivingBase)
|
||||
{
|
||||
if (!getActivated(par1ItemStack))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
return getActivated(par1ItemStack);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -35,8 +35,10 @@ public class BoundShovel extends ItemSpade implements IBindable
|
|||
public float efficiencyOnProperMaterial = 12.0F;
|
||||
public float damageVsEntity;
|
||||
|
||||
private static IIcon activeIcon;
|
||||
private static IIcon passiveIcon;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon activeIcon;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon passiveIcon;
|
||||
|
||||
private int energyUsed;
|
||||
|
||||
|
@ -216,7 +218,6 @@ public class BoundShovel extends ItemSpade implements IBindable
|
|||
}
|
||||
|
||||
par1ItemStack.setItemDamage(0);
|
||||
return;
|
||||
}
|
||||
|
||||
public void setActivated(ItemStack par1ItemStack, boolean newActivated)
|
||||
|
@ -264,11 +265,7 @@ public class BoundShovel extends ItemSpade implements IBindable
|
|||
*/
|
||||
public boolean hitEntity(ItemStack par1ItemStack, EntityLivingBase par2EntityLivingBase, EntityLivingBase par3EntityLivingBase)
|
||||
{
|
||||
if (!getActivated(par1ItemStack))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
return getActivated(par1ItemStack);
|
||||
}
|
||||
|
||||
public boolean onBlockDestroyed(ItemStack par1ItemStack, World par2World, int par3, int par4, int par5, int par6, EntityLivingBase par7EntityLivingBase)
|
||||
|
|
|
@ -3,6 +3,7 @@ package WayofTime.alchemicalWizardry.common.items;
|
|||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable;
|
||||
import WayofTime.alchemicalWizardry.api.soulNetwork.LifeEssenceNetwork;
|
||||
import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
@ -24,7 +25,6 @@ public class CheatyItem extends Item implements IBindable
|
|||
public CheatyItem()
|
||||
{
|
||||
super();
|
||||
DamageSource damageSource = DamageSource.generic;
|
||||
setMaxStackSize(1);
|
||||
setCreativeTab(AlchemicalWizardry.tabBloodMagic);
|
||||
}
|
||||
|
@ -81,10 +81,10 @@ public class CheatyItem extends Item implements IBindable
|
|||
|
||||
if (par3EntityPlayer.isSneaking())
|
||||
{
|
||||
EnergyItems.setCurrentEssence(itemTag.getString("ownerName"), 0);
|
||||
SoulNetworkHandler.setCurrentEssence(itemTag.getString("ownerName"), 0);
|
||||
} else
|
||||
{
|
||||
EnergyItems.addEssenceToMaximum(itemTag.getString("ownerName"), 1000000, Integer.MAX_VALUE);
|
||||
SoulNetworkHandler.addCurrentEssenceToMaximum(itemTag.getString("ownerName"), 1000000, Integer.MAX_VALUE);
|
||||
}
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
@ -112,7 +112,7 @@ public class CheatyItem extends Item implements IBindable
|
|||
double posY = player.posY;
|
||||
double posZ = player.posZ;
|
||||
world.playSoundEffect((double) ((float) posX + 0.5F), (double) ((float) posY + 0.5F), (double) ((float) posZ + 0.5F), "random.fizz", 0.5F, 2.6F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.8F);
|
||||
float f = (float) 1.0F;
|
||||
float f = 1.0F;
|
||||
float f1 = f * 0.6F + 0.4F;
|
||||
float f2 = f * f * 0.7F - 0.5F;
|
||||
float f3 = f * f * 0.6F - 0.7F;
|
||||
|
@ -144,7 +144,7 @@ public class CheatyItem extends Item implements IBindable
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean hasContainerItem()
|
||||
public boolean hasContainerItem(ItemStack itemStack)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -1,10 +1,15 @@
|
|||
package WayofTime.alchemicalWizardry.common.items;
|
||||
|
||||
import WayofTime.alchemicalWizardry.api.event.SacrificeKnifeUsedEvent;
|
||||
import WayofTime.alchemicalWizardry.api.sacrifice.PlayerSacrificeHandler;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.common.util.FakePlayer;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.tile.IBloodAltar;
|
||||
|
@ -21,33 +26,59 @@ public class CreativeDagger extends Item
|
|||
setFull3D();
|
||||
}
|
||||
|
||||
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)
|
||||
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player)
|
||||
{
|
||||
if (par3EntityPlayer instanceof FakePlayer)
|
||||
if (this.canUseForSacrifice(stack))
|
||||
{
|
||||
return par1ItemStack;
|
||||
player.setItemInUse(stack, this.getMaxItemUseDuration(stack));
|
||||
return stack;
|
||||
}
|
||||
|
||||
double posX = par3EntityPlayer.posX;
|
||||
double posY = par3EntityPlayer.posY;
|
||||
double posZ = par3EntityPlayer.posZ;
|
||||
par2World.playSoundEffect((double) ((float) posX + 0.5F), (double) ((float) posY + 0.5F), (double) ((float) posZ + 0.5F), "random.fizz", 0.5F, 2.6F + (par2World.rand.nextFloat() - par2World.rand.nextFloat()) * 0.8F);
|
||||
float f = (float) 1.0F;
|
||||
if (!player.capabilities.isCreativeMode)
|
||||
{
|
||||
SacrificeKnifeUsedEvent evt = new SacrificeKnifeUsedEvent(player, true, true, 2);
|
||||
if(MinecraftForge.EVENT_BUS.post(evt))
|
||||
{
|
||||
return stack;
|
||||
}
|
||||
|
||||
if(evt.shouldDrainHealth)
|
||||
{
|
||||
player.setHealth(player.getHealth() - 2);
|
||||
}
|
||||
|
||||
if(!evt.shouldFillAltar)
|
||||
{
|
||||
return stack;
|
||||
}
|
||||
}
|
||||
|
||||
if (player instanceof FakePlayer)
|
||||
{
|
||||
return stack;
|
||||
}
|
||||
|
||||
double posX = player.posX;
|
||||
double posY = player.posY;
|
||||
double posZ = player.posZ;
|
||||
world.playSoundEffect((double) ((float) posX + 0.5F), (double) ((float) posY + 0.5F), (double) ((float) posZ + 0.5F), "random.fizz", 0.5F, 2.6F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.8F);
|
||||
float f = 1.0F;
|
||||
float f1 = f * 0.6F + 0.4F;
|
||||
float f2 = f * f * 0.7F - 0.5F;
|
||||
float f3 = f * f * 0.6F - 0.7F;
|
||||
|
||||
for (int l = 0; l < 8; ++l)
|
||||
{
|
||||
par2World.spawnParticle("reddust", posX + Math.random() - Math.random(), posY + Math.random() - Math.random(), posZ + Math.random() - Math.random(), f1, f2, f3);
|
||||
world.spawnParticle("reddust", posX + Math.random() - Math.random(), posY + Math.random() - Math.random(), posZ + Math.random() - Math.random(), f1, f2, f3);
|
||||
}
|
||||
|
||||
if (!par2World.isRemote && SpellHelper.isFakePlayer(par2World, par3EntityPlayer))
|
||||
if (!world.isRemote && SpellHelper.isFakePlayer(world, player))
|
||||
{
|
||||
return par1ItemStack;
|
||||
return stack;
|
||||
}
|
||||
findAndFillAltar(par2World, par3EntityPlayer, Integer.MAX_VALUE);
|
||||
return par1ItemStack;
|
||||
|
||||
findAndFillAltar(world, player, Integer.MAX_VALUE);
|
||||
return stack;
|
||||
}
|
||||
|
||||
public void findAndFillAltar(World world, EntityPlayer player, int amount)
|
||||
|
@ -68,7 +99,7 @@ public class CreativeDagger extends Item
|
|||
|
||||
public IBloodAltar getAltar(World world, int x, int y, int z)
|
||||
{
|
||||
TileEntity tileEntity = null;
|
||||
TileEntity tileEntity;
|
||||
|
||||
for (int i = -2; i <= 2; i++)
|
||||
{
|
||||
|
@ -78,29 +109,47 @@ public class CreativeDagger extends Item
|
|||
{
|
||||
tileEntity = world.getTileEntity(i + x, k + y, j + z);
|
||||
|
||||
if ((tileEntity instanceof IBloodAltar))
|
||||
if(tileEntity instanceof IBloodAltar)
|
||||
{
|
||||
return (IBloodAltar) tileEntity;
|
||||
return (IBloodAltar)tileEntity;
|
||||
}
|
||||
}
|
||||
|
||||
if ((tileEntity instanceof IBloodAltar))
|
||||
{
|
||||
return (IBloodAltar) tileEntity;
|
||||
}
|
||||
}
|
||||
|
||||
if ((tileEntity instanceof IBloodAltar))
|
||||
{
|
||||
return (IBloodAltar) tileEntity;
|
||||
}
|
||||
}
|
||||
|
||||
if ((tileEntity instanceof IBloodAltar))
|
||||
{
|
||||
return (IBloodAltar) tileEntity;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpdate(ItemStack stack, World world, Entity entity, int par4, boolean par5)
|
||||
{
|
||||
if(!world.isRemote && entity instanceof EntityPlayer)
|
||||
{
|
||||
this.setUseForSacrifice(stack, this.isPlayerPreparedForSacrifice(world, (EntityPlayer)entity));
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isPlayerPreparedForSacrifice(World world, EntityPlayer player)
|
||||
{
|
||||
return !world.isRemote && (PlayerSacrificeHandler.getPlayerIncense(player) > 0);
|
||||
}
|
||||
|
||||
public boolean canUseForSacrifice(ItemStack stack)
|
||||
{
|
||||
NBTTagCompound tag = stack.getTagCompound();
|
||||
|
||||
return tag != null && tag.getBoolean("sacrifice");
|
||||
}
|
||||
|
||||
public void setUseForSacrifice(ItemStack stack, boolean sacrifice)
|
||||
{
|
||||
NBTTagCompound tag = stack.getTagCompound();
|
||||
if(tag == null)
|
||||
{
|
||||
tag = new NBTTagCompound();
|
||||
stack.setTagCompound(tag);
|
||||
}
|
||||
|
||||
tag.setBoolean("sacrifice", sacrifice);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,8 +33,6 @@ import cpw.mods.fml.relauncher.SideOnly;
|
|||
|
||||
public class DaggerOfSacrifice extends EnergyItems
|
||||
{
|
||||
private float weaponDamage;
|
||||
|
||||
public DaggerOfSacrifice()
|
||||
{
|
||||
super();
|
||||
|
@ -43,7 +41,6 @@ public class DaggerOfSacrifice extends EnergyItems
|
|||
setEnergyUsed(100);
|
||||
setFull3D();
|
||||
setMaxDamage(100);
|
||||
weaponDamage = 1.0F;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -183,7 +180,7 @@ public class DaggerOfSacrifice extends EnergyItems
|
|||
|
||||
public IBloodAltar getAltar(World world, int x, int y, int z)
|
||||
{
|
||||
TileEntity tileEntity = null;
|
||||
TileEntity tileEntity;
|
||||
|
||||
for (int i = -2; i <= 2; i++)
|
||||
{
|
||||
|
@ -198,22 +195,7 @@ public class DaggerOfSacrifice extends EnergyItems
|
|||
return (IBloodAltar) tileEntity;
|
||||
}
|
||||
}
|
||||
|
||||
if ((tileEntity instanceof IBloodAltar))
|
||||
{
|
||||
return (IBloodAltar) tileEntity;
|
||||
}
|
||||
}
|
||||
|
||||
if ((tileEntity instanceof IBloodAltar))
|
||||
{
|
||||
return (IBloodAltar) tileEntity;
|
||||
}
|
||||
}
|
||||
|
||||
if ((tileEntity instanceof IBloodAltar))
|
||||
{
|
||||
return (IBloodAltar) tileEntity;
|
||||
}
|
||||
|
||||
return null;
|
||||
|
|
|
@ -35,11 +35,6 @@ public class DemonPlacer extends Item
|
|||
this.maxStackSize = 1;
|
||||
}
|
||||
|
||||
public String getItemDisplayName(ItemStack par1ItemStack)
|
||||
{
|
||||
return "Demon Crystal";
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public int getColorFromItemStack(ItemStack par1ItemStack, int par2)
|
||||
{
|
||||
|
|
|
@ -15,7 +15,6 @@ import net.minecraft.item.Item;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
|
@ -29,7 +28,6 @@ public class EnergyBattery extends Item implements ArmourUpgrade, IBindable, IBl
|
|||
public EnergyBattery(int damage)
|
||||
{
|
||||
super();
|
||||
DamageSource damageSource = DamageSource.generic;
|
||||
setMaxStackSize(1);
|
||||
setCreativeTab(AlchemicalWizardry.tabBloodMagic);
|
||||
maxEssence = damage;
|
||||
|
@ -120,7 +118,7 @@ public class EnergyBattery extends Item implements ArmourUpgrade, IBindable, IBl
|
|||
double posY = player.posY;
|
||||
double posZ = player.posZ;
|
||||
world.playSoundEffect((double) ((float) posX + 0.5F), (double) ((float) posY + 0.5F), (double) ((float) posZ + 0.5F), "random.fizz", 0.5F, 2.6F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.8F);
|
||||
float f = (float) 1.0F;
|
||||
float f = 1.0F;
|
||||
float f1 = f * 0.6F + 0.4F;
|
||||
float f2 = f * f * 0.7F - 0.5F;
|
||||
float f3 = f * f * 0.6F - 0.7F;
|
||||
|
@ -179,12 +177,13 @@ public class EnergyBattery extends Item implements ArmourUpgrade, IBindable, IBl
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean hasContainerItem()
|
||||
public boolean hasContainerItem(ItemStack itemStack)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
//@SideOnly(Side.SERVER)
|
||||
@Deprecated
|
||||
public int getCurrentEssence(ItemStack par1ItemStack)
|
||||
{
|
||||
if (par1ItemStack == null)
|
||||
|
@ -209,8 +208,7 @@ public class EnergyBattery extends Item implements ArmourUpgrade, IBindable, IBl
|
|||
worldSave.setItemData(owner, data);
|
||||
}
|
||||
|
||||
int currentEssence = data.currentEssence;
|
||||
return (currentEssence);
|
||||
return data.currentEssence;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -18,10 +18,11 @@ import java.util.List;
|
|||
|
||||
public class EnergyBazooka extends EnergyItems
|
||||
{
|
||||
private static IIcon activeIcon;
|
||||
private static IIcon passiveIcon;
|
||||
private static int damage;
|
||||
private static final int maxDelay = 150;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon activeIcon;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon passiveIcon;
|
||||
private int damage;
|
||||
|
||||
public EnergyBazooka()
|
||||
{
|
||||
|
@ -65,6 +66,8 @@ public class EnergyBazooka extends EnergyItems
|
|||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)
|
||||
{
|
||||
final int maxDelay = 150;
|
||||
|
||||
if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking())
|
||||
{
|
||||
this.setActivated(par1ItemStack, !getActivated(par1ItemStack));
|
||||
|
@ -84,7 +87,7 @@ public class EnergyBazooka extends EnergyItems
|
|||
|
||||
if (!par3EntityPlayer.capabilities.isCreativeMode)
|
||||
{
|
||||
if(!this.syphonBatteries(par1ItemStack, par3EntityPlayer, this.getEnergyUsed()))
|
||||
if(!syphonBatteries(par1ItemStack, par3EntityPlayer, this.getEnergyUsed()))
|
||||
{
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
@ -141,7 +144,6 @@ public class EnergyBazooka extends EnergyItems
|
|||
}
|
||||
|
||||
par1ItemStack.setItemDamage(0);
|
||||
return;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -17,10 +17,11 @@ import java.util.List;
|
|||
|
||||
public class EnergyBlast extends EnergyItems
|
||||
{
|
||||
private static IIcon activeIcon;
|
||||
private static IIcon passiveIcon;
|
||||
private static int damage;
|
||||
private static final int maxDelay = 15;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon activeIcon;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon passiveIcon;
|
||||
private int damage;
|
||||
|
||||
public EnergyBlast()
|
||||
{
|
||||
|
@ -65,6 +66,8 @@ public class EnergyBlast extends EnergyItems
|
|||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)
|
||||
{
|
||||
final int maxDelay = 15;
|
||||
|
||||
if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || par3EntityPlayer.isSneaking())
|
||||
{
|
||||
this.setActivated(par1ItemStack, !getActivated(par1ItemStack));
|
||||
|
@ -84,7 +87,7 @@ public class EnergyBlast extends EnergyItems
|
|||
|
||||
if (!par3EntityPlayer.capabilities.isCreativeMode)
|
||||
{
|
||||
if(!this.syphonBatteries(par1ItemStack, par3EntityPlayer, this.getEnergyUsed()))
|
||||
if(!syphonBatteries(par1ItemStack, par3EntityPlayer, this.getEnergyUsed()))
|
||||
{
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
@ -133,7 +136,6 @@ public class EnergyBlast extends EnergyItems
|
|||
}
|
||||
|
||||
par1ItemStack.setItemDamage(0);
|
||||
return;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -41,7 +41,7 @@ public class EnergyItems extends Item implements IBindable
|
|||
double posY = player.posY;
|
||||
double posZ = player.posZ;
|
||||
world.playSoundEffect((double) ((float) posX + 0.5F), (double) ((float) posY + 0.5F), (double) ((float) posZ + 0.5F), "random.fizz", 0.5F, 2.6F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.8F);
|
||||
float f = (float) 1.0F;
|
||||
float f = 1.0F;
|
||||
float f1 = f * 0.6F + 0.4F;
|
||||
float f2 = f * f * 0.7F - 0.5F;
|
||||
float f3 = f * f * 0.6F - 0.7F;
|
||||
|
@ -186,8 +186,7 @@ public class EnergyItems extends Item implements IBindable
|
|||
//Global static methods
|
||||
public static boolean checkAndSetItemOwner(ItemStack item, EntityPlayer player)
|
||||
{
|
||||
if (SpellHelper.isFakePlayer(player)) return false;
|
||||
return SoulNetworkHandler.checkAndSetItemPlayer(item, player);
|
||||
return !SpellHelper.isFakePlayer(player) && SoulNetworkHandler.checkAndSetItemPlayer(item, player);
|
||||
}
|
||||
|
||||
public static void setItemOwner(ItemStack item, String ownerName)
|
||||
|
@ -223,6 +222,7 @@ public class EnergyItems extends Item implements IBindable
|
|||
return item.getTagCompound().getString("ownerName");
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static void drainPlayerNetwork(EntityPlayer player, int damageToBeDone)
|
||||
{
|
||||
String ownerName = SpellHelper.getUsername(player);
|
||||
|
@ -251,6 +251,7 @@ public class EnergyItems extends Item implements IBindable
|
|||
}
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static int getCurrentEssence(String ownerName)
|
||||
{
|
||||
if (MinecraftServer.getServer() == null)
|
||||
|
@ -270,6 +271,7 @@ public class EnergyItems extends Item implements IBindable
|
|||
return data.currentEssence;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static void setCurrentEssence(String ownerName, int amount)
|
||||
{
|
||||
if (MinecraftServer.getServer() == null)
|
||||
|
@ -290,6 +292,7 @@ public class EnergyItems extends Item implements IBindable
|
|||
data.markDirty();
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static void addEssenceToMaximum(String ownerName, int amount, int maximum)
|
||||
{
|
||||
if (MinecraftServer.getServer() == null)
|
||||
|
|
|
@ -25,9 +25,10 @@ import cpw.mods.fml.relauncher.SideOnly;
|
|||
|
||||
public class EnergySword extends ItemSword
|
||||
{
|
||||
private NBTTagCompound data;
|
||||
private static IIcon activeIcon;
|
||||
private static IIcon passiveIcon;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon activeIcon;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon passiveIcon;
|
||||
private int energyUsed;
|
||||
|
||||
public EnergySword()
|
||||
|
@ -168,7 +169,6 @@ public class EnergySword extends ItemSword
|
|||
}
|
||||
|
||||
par1ItemStack.setItemDamage(0);
|
||||
return;
|
||||
}
|
||||
|
||||
public void setActivated(ItemStack par1ItemStack, boolean newActivated)
|
||||
|
|
|
@ -23,12 +23,13 @@ import cpw.mods.fml.relauncher.SideOnly;
|
|||
|
||||
public class ItemBloodLetterPack extends ItemArmor implements ArmourUpgrade, IAltarManipulator
|
||||
{
|
||||
private static IIcon plateIcon;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon plateIcon;
|
||||
|
||||
public static int conversionRate = 100; //LP / half heart
|
||||
public static float activationPoint = 0.5f;
|
||||
public static int tickRate = 20;
|
||||
public static int maxStored = 10000;
|
||||
public int conversionRate = 100; //LP / half heart
|
||||
public float activationPoint = 0.5f;
|
||||
public int tickRate = 20;
|
||||
public int maxStored = 10000;
|
||||
|
||||
public ItemBloodLetterPack()
|
||||
{
|
||||
|
@ -50,8 +51,6 @@ public class ItemBloodLetterPack extends ItemArmor implements ArmourUpgrade, IAl
|
|||
|
||||
if (!(par1ItemStack.getTagCompound() == null))
|
||||
{
|
||||
NBTTagCompound itemTag = par1ItemStack.getTagCompound();
|
||||
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.lp.storedlp") + " " + this.getStoredLP(par1ItemStack));
|
||||
}
|
||||
}
|
||||
|
@ -164,7 +163,7 @@ public class ItemBloodLetterPack extends ItemArmor implements ArmourUpgrade, IAl
|
|||
@Override
|
||||
public void onArmourUpdate(World world, EntityPlayer player, ItemStack thisItemStack)
|
||||
{
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -5,7 +5,6 @@ import net.minecraft.item.ItemBlock;
|
|||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ItemBloodRuneBlock extends ItemBlock
|
||||
|
||||
{
|
||||
public ItemBloodRuneBlock(Block block)
|
||||
{
|
||||
|
@ -15,9 +14,8 @@ public class ItemBloodRuneBlock extends ItemBlock
|
|||
}
|
||||
|
||||
public String getUnlocalizedName(ItemStack itemstack)
|
||||
|
||||
{
|
||||
String name = "";
|
||||
String name;
|
||||
|
||||
switch (itemstack.getItemDamage())
|
||||
{
|
||||
|
|
|
@ -5,7 +5,6 @@ import net.minecraft.item.ItemBlock;
|
|||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ItemCrystalBlock extends ItemBlock
|
||||
|
||||
{
|
||||
public ItemCrystalBlock(Block par1)
|
||||
{
|
||||
|
@ -15,9 +14,8 @@ public class ItemCrystalBlock extends ItemBlock
|
|||
}
|
||||
|
||||
public String getUnlocalizedName(ItemStack itemstack)
|
||||
|
||||
{
|
||||
String name = "";
|
||||
String name;
|
||||
|
||||
switch (itemstack.getItemDamage())
|
||||
{
|
||||
|
|
|
@ -13,7 +13,6 @@ import net.minecraft.entity.player.EntityPlayerMP;
|
|||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.FakePlayer;
|
||||
|
@ -25,7 +24,6 @@ public class ItemDiabloKey extends EnergyItems
|
|||
public ItemDiabloKey()
|
||||
{
|
||||
super();
|
||||
DamageSource damageSource = DamageSource.generic;
|
||||
setMaxStackSize(1);
|
||||
setCreativeTab(AlchemicalWizardry.tabBloodMagic);
|
||||
this.setEnergyUsed(1000);
|
||||
|
|
|
@ -15,7 +15,7 @@ public class ItemEnchantmentGlyphBlock extends ItemBlock
|
|||
@Override
|
||||
public String getUnlocalizedName(ItemStack itemstack)
|
||||
{
|
||||
String name = "";
|
||||
String name;
|
||||
|
||||
switch (itemstack.getItemDamage())
|
||||
{
|
||||
|
|
|
@ -28,10 +28,6 @@ public class ItemIncense extends Item implements IIncense
|
|||
@SideOnly(Side.CLIENT)
|
||||
private IIcon[] icons;
|
||||
|
||||
public static int minValue;
|
||||
public static int maxValue;
|
||||
public static int itemDuration;
|
||||
|
||||
public ItemIncense()
|
||||
{
|
||||
super();
|
||||
|
@ -194,7 +190,7 @@ public class ItemIncense extends Item implements IIncense
|
|||
public final float greenColour;
|
||||
public final float blueColour;
|
||||
|
||||
private EnumIncense(int minValue, int maxValue, float tickRate, int dur, float red, float green, float blue)
|
||||
EnumIncense(int minValue, int maxValue, float tickRate, int dur, float red, float green, float blue)
|
||||
{
|
||||
this.minValue = minValue;
|
||||
this.maxValue = maxValue;
|
||||
|
|
|
@ -274,7 +274,7 @@ public class ItemRitualDiviner extends EnergyItems implements IRitualDiviner
|
|||
}
|
||||
} else
|
||||
{
|
||||
world.playAuxSFX(0000, x, y + 1, z, 0);
|
||||
world.playAuxSFX(0, x, y + 1, z, 0);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -406,7 +406,6 @@ public class ItemRitualDiviner extends EnergyItems implements IRitualDiviner
|
|||
public void rotateRituals(World world, EntityPlayer player, ItemStack stack, boolean next)
|
||||
{
|
||||
this.voidStoredLocation(stack);
|
||||
int maxRitualID = Rituals.getNumberOfRituals();
|
||||
String currentRitualID = this.getCurrentRitual(stack);
|
||||
|
||||
this.setCurrentRitual(stack, next? Rituals.getNextRitualKey(currentRitualID):Rituals.getPreviousRitualKey(currentRitualID));
|
||||
|
|
|
@ -5,7 +5,6 @@ import net.minecraft.item.ItemBlock;
|
|||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ItemSpellEffectBlock extends ItemBlock
|
||||
|
||||
{
|
||||
public ItemSpellEffectBlock(Block par1)
|
||||
{
|
||||
|
@ -14,9 +13,8 @@ public class ItemSpellEffectBlock extends ItemBlock
|
|||
}
|
||||
|
||||
public String getUnlocalizedName(ItemStack itemstack)
|
||||
|
||||
{
|
||||
String name = "";
|
||||
String name;
|
||||
|
||||
switch (itemstack.getItemDamage())
|
||||
{
|
||||
|
|
|
@ -5,7 +5,6 @@ import net.minecraft.item.ItemBlock;
|
|||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ItemSpellEnhancementBlock extends ItemBlock
|
||||
|
||||
{
|
||||
public ItemSpellEnhancementBlock(Block par1)
|
||||
{
|
||||
|
@ -15,9 +14,8 @@ public class ItemSpellEnhancementBlock extends ItemBlock
|
|||
}
|
||||
|
||||
public String getUnlocalizedName(ItemStack itemstack)
|
||||
|
||||
{
|
||||
String name = "";
|
||||
String name;
|
||||
|
||||
switch (itemstack.getItemDamage())
|
||||
{
|
||||
|
|
|
@ -5,7 +5,6 @@ import net.minecraft.item.ItemBlock;
|
|||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ItemSpellModifierBlock extends ItemBlock
|
||||
|
||||
{
|
||||
public ItemSpellModifierBlock(Block par1)
|
||||
{
|
||||
|
@ -15,9 +14,8 @@ public class ItemSpellModifierBlock extends ItemBlock
|
|||
}
|
||||
|
||||
public String getUnlocalizedName(ItemStack itemstack)
|
||||
|
||||
{
|
||||
String name = "";
|
||||
String name;
|
||||
|
||||
switch (itemstack.getItemDamage())
|
||||
{
|
||||
|
|
|
@ -5,7 +5,6 @@ import net.minecraft.item.ItemBlock;
|
|||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ItemSpellParadigmBlock extends ItemBlock
|
||||
|
||||
{
|
||||
public ItemSpellParadigmBlock(Block par1)
|
||||
{
|
||||
|
@ -15,9 +14,8 @@ public class ItemSpellParadigmBlock extends ItemBlock
|
|||
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack itemstack)
|
||||
|
||||
{
|
||||
String name = "";
|
||||
String name;
|
||||
|
||||
switch (itemstack.getItemDamage())
|
||||
{
|
||||
|
|
|
@ -15,7 +15,7 @@ public class ItemStabilityGlyphBlock extends ItemBlock
|
|||
@Override
|
||||
public String getUnlocalizedName(ItemStack itemstack)
|
||||
{
|
||||
String name = "";
|
||||
String name;
|
||||
|
||||
switch (itemstack.getItemDamage())
|
||||
{
|
||||
|
|
|
@ -56,10 +56,7 @@ public class LavaCrystal extends EnergyItems
|
|||
|
||||
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)
|
||||
{
|
||||
if (EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer))
|
||||
{
|
||||
int damage = this.getDamage(par1ItemStack);
|
||||
}
|
||||
EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer);
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ public class OrbOfTesting extends EnergyItems
|
|||
return par1ItemStack;
|
||||
}
|
||||
|
||||
if (this.syphonBatteries(par1ItemStack, par3EntityPlayer, this.getEnergyUsed()))
|
||||
if (syphonBatteries(par1ItemStack, par3EntityPlayer, this.getEnergyUsed()))
|
||||
{
|
||||
par3EntityPlayer.heal(1);
|
||||
}
|
||||
|
|
|
@ -125,7 +125,7 @@ public class SacrificialDagger extends Item
|
|||
double posY = player.posY;
|
||||
double posZ = player.posZ;
|
||||
world.playSoundEffect((double) ((float) posX + 0.5F), (double) ((float) posY + 0.5F), (double) ((float) posZ + 0.5F), "random.fizz", 0.5F, 2.6F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.8F);
|
||||
float f = (float) 1.0F;
|
||||
float f = 1.0F;
|
||||
float f1 = f * 0.6F + 0.4F;
|
||||
float f2 = f * f * 0.7F - 0.5F;
|
||||
float f3 = f * f * 0.6F - 0.7F;
|
||||
|
@ -174,7 +174,7 @@ public class SacrificialDagger extends Item
|
|||
|
||||
public IBloodAltar getAltar(World world, int x, int y, int z)
|
||||
{
|
||||
TileEntity tileEntity = null;
|
||||
TileEntity tileEntity;
|
||||
|
||||
for (int i = -2; i <= 2; i++)
|
||||
{
|
||||
|
@ -222,12 +222,8 @@ public class SacrificialDagger extends Item
|
|||
public boolean canUseForSacrifice(ItemStack stack)
|
||||
{
|
||||
NBTTagCompound tag = stack.getTagCompound();
|
||||
if(tag == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return tag.getBoolean("sacrifice");
|
||||
return tag != null && tag.getBoolean("sacrifice");
|
||||
}
|
||||
|
||||
public void setUseForSacrifice(ItemStack stack, boolean sacrifice)
|
||||
|
@ -246,6 +242,6 @@ public class SacrificialDagger extends Item
|
|||
@SideOnly(Side.CLIENT)
|
||||
public boolean hasEffect(ItemStack stack, int pass)
|
||||
{
|
||||
return this.canUseForSacrifice(stack) ? true : super.hasEffect(stack, pass);
|
||||
return this.canUseForSacrifice(stack) || super.hasEffect(stack, pass);
|
||||
}
|
||||
}
|
|
@ -41,10 +41,14 @@ import cpw.mods.fml.relauncher.SideOnly;
|
|||
public class BoundArmour extends ItemArmor implements IAlchemyGoggles, ISpecialArmor, IBindable, IRevealer, IGoggles, IRunicArmor, ILPGauge
|
||||
{
|
||||
private static int invSize = 9;
|
||||
private static IIcon helmetIcon;
|
||||
private static IIcon plateIcon;
|
||||
private static IIcon leggingsIcon;
|
||||
private static IIcon bootsIcon;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon helmetIcon;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon plateIcon;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon leggingsIcon;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon bootsIcon;
|
||||
|
||||
public static boolean tryComplexRendering = true;
|
||||
|
||||
|
@ -251,22 +255,22 @@ public class BoundArmour extends ItemArmor implements IAlchemyGoggles, ISpecialA
|
|||
@Override
|
||||
public int getArmorDisplay(EntityPlayer player, ItemStack armor, int slot)
|
||||
{
|
||||
if (armor.equals(ModItems.boundHelmet))
|
||||
if (armor.getItem() == ModItems.boundHelmet)
|
||||
{
|
||||
return 3;
|
||||
}
|
||||
|
||||
if (armor.equals(ModItems.boundPlate))
|
||||
if (armor.getItem() == ModItems.boundPlate)
|
||||
{
|
||||
return 8;
|
||||
}
|
||||
|
||||
if (armor.equals(ModItems.boundLeggings))
|
||||
if (armor.getItem() == ModItems.boundLeggings)
|
||||
{
|
||||
return 6;
|
||||
}
|
||||
|
||||
if (armor.equals(ModItems.boundBoots))
|
||||
if (armor.getItem() == ModItems.boundBoots)
|
||||
{
|
||||
return 3;
|
||||
}
|
||||
|
@ -322,7 +326,7 @@ public class BoundArmour extends ItemArmor implements IAlchemyGoggles, ISpecialA
|
|||
@Override
|
||||
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type)
|
||||
{
|
||||
if (this.tryComplexRendering)
|
||||
if (tryComplexRendering)
|
||||
{
|
||||
return "alchemicalwizardry:models/armor/BloodArmour_WIP.png";
|
||||
}
|
||||
|
@ -372,15 +376,6 @@ public class BoundArmour extends ItemArmor implements IAlchemyGoggles, ISpecialA
|
|||
itemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
int maxBloodLevel = getMaxBloodShardLevel(itemStack);
|
||||
ItemStack[] inv = getInternalInventory(itemStack);
|
||||
|
||||
if (inv != null)
|
||||
{
|
||||
int iSize = 0;
|
||||
int iBlood = 0;
|
||||
}
|
||||
|
||||
if (!player.isPotionActive(AlchemicalWizardry.customPotionInhibit))
|
||||
{
|
||||
tickInternalInventory(itemStack, world, player, 0, false);
|
||||
|
@ -389,8 +384,6 @@ public class BoundArmour extends ItemArmor implements IAlchemyGoggles, ISpecialA
|
|||
this.setIsInvisible(itemStack, player.isPotionActive(Potion.invisibility.id));
|
||||
|
||||
this.repairArmour(world, player, itemStack);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
public void repairArmour(World world, EntityPlayer player, ItemStack itemStack)
|
||||
|
@ -491,7 +484,6 @@ public class BoundArmour extends ItemArmor implements IAlchemyGoggles, ISpecialA
|
|||
return false;
|
||||
}
|
||||
|
||||
Item item = addedItemStack.getItem();
|
||||
int candidateSlot = -1;
|
||||
|
||||
for (int i = invSize - 1; i >= 0; i--)
|
||||
|
@ -540,7 +532,7 @@ public class BoundArmour extends ItemArmor implements IAlchemyGoggles, ISpecialA
|
|||
|
||||
for (int i = 0; i < tagList.tagCount(); i++)
|
||||
{
|
||||
NBTTagCompound tag = (NBTTagCompound) tagList.getCompoundTagAt(i);
|
||||
NBTTagCompound tag = tagList.getCompoundTagAt(i);
|
||||
int slot = tag.getByte("Slot");
|
||||
|
||||
if (slot >= 0 && slot < invSize)
|
||||
|
@ -565,8 +557,6 @@ public class BoundArmour extends ItemArmor implements IAlchemyGoggles, ISpecialA
|
|||
|
||||
for (int i = 0; i < invSize; i++)
|
||||
{
|
||||
ItemStack stack = inventory[i];
|
||||
|
||||
if (inventory[i] != null)
|
||||
{
|
||||
NBTTagCompound tag = new NBTTagCompound();
|
||||
|
|
|
@ -131,7 +131,6 @@ public abstract class OmegaArmour extends BoundArmour
|
|||
{
|
||||
if(EnergyItems.syphonBatteries(itemStack, player, itemStack.getItemDamage() * 75))
|
||||
{
|
||||
Reagent reagent = APISpellHelper.getPlayerReagentType(player);
|
||||
float reagentAmount = APISpellHelper.getPlayerCurrentReagentAmount(player);
|
||||
|
||||
reagentAmount -= itemStack.getItemDamage() * reagentDrainPerDamage;
|
||||
|
|
|
@ -20,10 +20,14 @@ import cpw.mods.fml.relauncher.SideOnly;
|
|||
|
||||
public class OmegaArmourEarth extends OmegaArmour
|
||||
{
|
||||
private static IIcon helmetIcon;
|
||||
private static IIcon plateIcon;
|
||||
private static IIcon leggingsIcon;
|
||||
private static IIcon bootsIcon;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon helmetIcon;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon plateIcon;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon leggingsIcon;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon bootsIcon;
|
||||
|
||||
public OmegaArmourEarth(int armorType)
|
||||
{
|
||||
|
|
|
@ -21,10 +21,14 @@ import cpw.mods.fml.relauncher.SideOnly;
|
|||
|
||||
public class OmegaArmourFire extends OmegaArmour
|
||||
{
|
||||
private static IIcon helmetIcon;
|
||||
private static IIcon plateIcon;
|
||||
private static IIcon leggingsIcon;
|
||||
private static IIcon bootsIcon;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon helmetIcon;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon plateIcon;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon leggingsIcon;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon bootsIcon;
|
||||
|
||||
public OmegaArmourFire(int armorType)
|
||||
{
|
||||
|
|
|
@ -20,10 +20,14 @@ import WayofTime.alchemicalWizardry.common.renderer.model.ModelOmegaWater;
|
|||
|
||||
public class OmegaArmourWater extends OmegaArmour
|
||||
{
|
||||
private static IIcon helmetIcon;
|
||||
private static IIcon plateIcon;
|
||||
private static IIcon leggingsIcon;
|
||||
private static IIcon bootsIcon;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon helmetIcon;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon plateIcon;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon leggingsIcon;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon bootsIcon;
|
||||
|
||||
public OmegaArmourWater(int armorType)
|
||||
{
|
||||
|
|
|
@ -20,10 +20,14 @@ import cpw.mods.fml.relauncher.SideOnly;
|
|||
|
||||
public class OmegaArmourWind extends OmegaArmour
|
||||
{
|
||||
private static IIcon helmetIcon;
|
||||
private static IIcon plateIcon;
|
||||
private static IIcon leggingsIcon;
|
||||
private static IIcon bootsIcon;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon helmetIcon;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon plateIcon;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon leggingsIcon;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon bootsIcon;
|
||||
|
||||
public OmegaArmourWind(int armorType)
|
||||
{
|
||||
|
|
|
@ -198,7 +198,7 @@ public class ItemAttunedCrystal extends Item implements IReagentManipulator
|
|||
return itemStack;
|
||||
}
|
||||
|
||||
int reagentLocation = -1;
|
||||
int reagentLocation;
|
||||
|
||||
reagentLocation = reagentList.indexOf(pastReagent);
|
||||
|
||||
|
|
|
@ -23,7 +23,9 @@ import java.util.List;
|
|||
|
||||
public class ItemTankSegmenter extends Item implements IReagentManipulator
|
||||
{
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon crystalBody;
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon crystalLabel;
|
||||
|
||||
public ItemTankSegmenter()
|
||||
|
|
|
@ -32,8 +32,6 @@ import java.util.Map.Entry;
|
|||
|
||||
public class AlchemyFlask extends Item
|
||||
{
|
||||
private int maxPotionAmount = 20;
|
||||
|
||||
public AlchemyFlask()
|
||||
{
|
||||
super();
|
||||
|
@ -58,7 +56,7 @@ public class AlchemyFlask extends Item
|
|||
|
||||
for (int i = 0; i < nbttaglist.tagCount(); ++i)
|
||||
{
|
||||
NBTTagCompound nbttagcompound = (NBTTagCompound) nbttaglist.getCompoundTagAt(i);
|
||||
NBTTagCompound nbttagcompound = nbttaglist.getCompoundTagAt(i);
|
||||
arraylist.add(AlchemyPotionHelper.readEffectFromNBT(nbttagcompound));
|
||||
}
|
||||
return arraylist;
|
||||
|
@ -116,7 +114,7 @@ public class AlchemyFlask extends Item
|
|||
|
||||
if (!par2World.isRemote)
|
||||
{
|
||||
ArrayList<AlchemyPotionHelper> list = this.getEffects(par1ItemStack);
|
||||
ArrayList<AlchemyPotionHelper> list = getEffects(par1ItemStack);
|
||||
|
||||
if (list != null)
|
||||
{
|
||||
|
@ -191,7 +189,7 @@ public class AlchemyFlask extends Item
|
|||
|
||||
public void setConcentrationOfPotion(ItemStack par1ItemStack, int potionID, int concentration)
|
||||
{
|
||||
ArrayList<AlchemyPotionHelper> list = this.getEffects(par1ItemStack);
|
||||
ArrayList<AlchemyPotionHelper> list = getEffects(par1ItemStack);
|
||||
if (list != null)
|
||||
{
|
||||
for (AlchemyPotionHelper aph : list)
|
||||
|
@ -202,13 +200,13 @@ public class AlchemyFlask extends Item
|
|||
break;
|
||||
}
|
||||
}
|
||||
this.setEffects(par1ItemStack, list);
|
||||
setEffects(par1ItemStack, list);
|
||||
}
|
||||
}
|
||||
|
||||
public void setDurationFactorOfPotion(ItemStack par1ItemStack, int potionID, int durationFactor)
|
||||
{
|
||||
ArrayList<AlchemyPotionHelper> list = this.getEffects(par1ItemStack);
|
||||
ArrayList<AlchemyPotionHelper> list = getEffects(par1ItemStack);
|
||||
if (list != null)
|
||||
{
|
||||
for (AlchemyPotionHelper aph : list)
|
||||
|
@ -219,7 +217,7 @@ public class AlchemyFlask extends Item
|
|||
break;
|
||||
}
|
||||
}
|
||||
this.setEffects(par1ItemStack, list);
|
||||
setEffects(par1ItemStack, list);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -241,8 +239,7 @@ public class AlchemyFlask extends Item
|
|||
|
||||
public boolean addPotionEffect(ItemStack par1ItemStack, int potionID, int tickDuration)
|
||||
{
|
||||
int i = 0;
|
||||
ArrayList<AlchemyPotionHelper> list = this.getEffects(par1ItemStack);
|
||||
ArrayList<AlchemyPotionHelper> list = getEffects(par1ItemStack);
|
||||
if (list != null)
|
||||
{
|
||||
for (AlchemyPotionHelper aph : list)
|
||||
|
@ -251,17 +248,15 @@ public class AlchemyFlask extends Item
|
|||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
i++;
|
||||
}
|
||||
list.add(new AlchemyPotionHelper(potionID, tickDuration, 0, 0));
|
||||
this.setEffects(par1ItemStack, list);
|
||||
setEffects(par1ItemStack, list);
|
||||
return true;
|
||||
} else
|
||||
{
|
||||
list = new ArrayList();
|
||||
list.add(new AlchemyPotionHelper(potionID, tickDuration, 0, 0));
|
||||
this.setEffects(par1ItemStack, list);
|
||||
setEffects(par1ItemStack, list);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -362,13 +357,7 @@ public class AlchemyFlask extends Item
|
|||
|
||||
public boolean isPotionThrowable(ItemStack par1ItemStack)
|
||||
{
|
||||
if (par1ItemStack.hasTagCompound() && par1ItemStack.getTagCompound().getBoolean("throwable"))
|
||||
{
|
||||
return true;
|
||||
} else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return par1ItemStack.hasTagCompound() && par1ItemStack.getTagCompound().getBoolean("throwable");
|
||||
}
|
||||
|
||||
public void setIsPotionThrowable(boolean flag, ItemStack par1ItemStack)
|
||||
|
@ -385,7 +374,7 @@ public class AlchemyFlask extends Item
|
|||
{
|
||||
ItemStack potionStack = new ItemStack(Items.potionitem, 1, 0);
|
||||
potionStack.setTagCompound(new NBTTagCompound());
|
||||
ArrayList<PotionEffect> potionList = this.getPotionEffects(par1ItemStack);
|
||||
ArrayList<PotionEffect> potionList = getPotionEffects(par1ItemStack);
|
||||
|
||||
if (potionList == null)
|
||||
{
|
||||
|
@ -402,7 +391,6 @@ public class AlchemyFlask extends Item
|
|||
nbttaglist.appendTag(d);
|
||||
}
|
||||
potionStack.getTagCompound().setTag("CustomPotionEffects", nbttaglist);
|
||||
EntityPotion entityPotion = new EntityPotion(worldObj, entityLivingBase, potionStack);
|
||||
return entityPotion;
|
||||
return new EntityPotion(worldObj, entityLivingBase, potionStack);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -76,7 +76,6 @@ public class AlchemyReagent extends Item
|
|||
if (this == ModItems.tennebrae)
|
||||
{
|
||||
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:Tennebrae");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -5,8 +5,6 @@ import cpw.mods.fml.relauncher.Side;
|
|||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
public class EnhancedFillingAgent extends WeakFillingAgent
|
||||
{
|
||||
public EnhancedFillingAgent()
|
||||
|
@ -18,7 +16,6 @@ public class EnhancedFillingAgent extends WeakFillingAgent
|
|||
@Override
|
||||
public int getFilledAmountForPotionNumber(int potionEffects)
|
||||
{
|
||||
Random rand = new Random();
|
||||
if (potionEffects == 0)
|
||||
{
|
||||
return 8;
|
||||
|
|
|
@ -4,7 +4,7 @@ import net.minecraft.item.ItemStack;
|
|||
|
||||
public interface ILimitedRoutingFocus
|
||||
{
|
||||
public int getRoutingFocusLimit(ItemStack stack);
|
||||
int getRoutingFocusLimit(ItemStack stack);
|
||||
|
||||
public void setRoutingFocusLimit(ItemStack stack, int limit);
|
||||
void setRoutingFocusLimit(ItemStack stack, int limit);
|
||||
}
|
||||
|
|
|
@ -18,8 +18,6 @@ import cpw.mods.fml.relauncher.SideOnly;
|
|||
|
||||
public class SigilAir extends EnergyItems implements ArmourUpgrade, ISigil
|
||||
{
|
||||
private int energyUsed;
|
||||
|
||||
public SigilAir()
|
||||
{
|
||||
super();
|
||||
|
|
|
@ -22,8 +22,6 @@ import cpw.mods.fml.relauncher.SideOnly;
|
|||
|
||||
public class SigilBloodLight extends EnergyItems implements IHolding, ArmourUpgrade, ISigil
|
||||
{
|
||||
private int tickDelay = 100;
|
||||
|
||||
public SigilBloodLight()
|
||||
{
|
||||
super();
|
||||
|
|
|
@ -3,6 +3,7 @@ package WayofTime.alchemicalWizardry.common.items.sigil;
|
|||
import java.util.List;
|
||||
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.ISigil;
|
||||
import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
|
@ -76,13 +77,12 @@ public class SigilDivination extends Item implements ArmourUpgrade, IReagentMani
|
|||
}
|
||||
|
||||
String ownerName = itemTag.getString("ownerName");
|
||||
int currentEssence = EnergyItems.getCurrentEssence(ownerName);
|
||||
|
||||
MovingObjectPosition movingobjectposition = this.getMovingObjectPositionFromPlayer(par2World, par3EntityPlayer, false);
|
||||
|
||||
if (movingobjectposition == null)
|
||||
{
|
||||
par3EntityPlayer.addChatMessage(new ChatComponentText(StatCollector.translateToLocal("message.divinationsigil.currentessence") + " " + EnergyItems.getCurrentEssence(ownerName) + "LP"));
|
||||
par3EntityPlayer.addChatMessage(new ChatComponentText(StatCollector.translateToLocal("message.divinationsigil.currentessence") + " " + SoulNetworkHandler.getCurrentEssence(ownerName) + "LP"));
|
||||
|
||||
return par1ItemStack;
|
||||
} else
|
||||
|
@ -97,7 +97,7 @@ public class SigilDivination extends Item implements ArmourUpgrade, IReagentMani
|
|||
|
||||
if (!(tile instanceof IReagentHandler))
|
||||
{
|
||||
par3EntityPlayer.addChatMessage(new ChatComponentText(StatCollector.translateToLocal("message.divinationsigil.currentessence") + " " + EnergyItems.getCurrentEssence(ownerName) + "LP"));
|
||||
par3EntityPlayer.addChatMessage(new ChatComponentText(StatCollector.translateToLocal("message.divinationsigil.currentessence") + " " + SoulNetworkHandler.getCurrentEssence(ownerName) + "LP"));
|
||||
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
|
|
@ -197,9 +197,6 @@ public class SigilFluid extends Item implements IFluidContainerItem, ISigil
|
|||
int range = 5;
|
||||
|
||||
float f = 1.0F;
|
||||
double d0 = player.prevPosX + (player.posX - player.prevPosX) * (double) f;
|
||||
double d1 = player.prevPosY + (player.posY - player.prevPosY) * (double) f + 1.62D - (double) player.yOffset;
|
||||
double d2 = player.prevPosZ + (player.posZ - player.prevPosZ) * (double) f;
|
||||
boolean flag = true;
|
||||
MovingObjectPosition movingobjectposition = this.getMovingObjectPositionFromPlayer(world, player, flag);
|
||||
|
||||
|
@ -391,9 +388,6 @@ public class SigilFluid extends Item implements IFluidContainerItem, ISigil
|
|||
public ItemStack fillItemFromWorld(ItemStack container, World world, EntityPlayer player, boolean forceFill)
|
||||
{
|
||||
float f = 1.0F;
|
||||
double d0 = player.prevPosX + (player.posX - player.prevPosX) * (double) f;
|
||||
double d1 = player.prevPosY + (player.posY - player.prevPosY) * (double) f + 1.62D - (double) player.yOffset;
|
||||
double d2 = player.prevPosZ + (player.posZ - player.prevPosZ) * (double) f;
|
||||
boolean flag = true;
|
||||
MovingObjectPosition movingobjectposition = this.getMovingObjectPositionFromPlayer(world, player, flag);
|
||||
|
||||
|
@ -574,9 +568,6 @@ public class SigilFluid extends Item implements IFluidContainerItem, ISigil
|
|||
}
|
||||
|
||||
float f = 1.0F;
|
||||
double d0 = player.prevPosX + (player.posX - player.prevPosX) * (double) f;
|
||||
double d1 = player.prevPosY + (player.posY - player.prevPosY) * (double) f + 1.62D - (double) player.yOffset;
|
||||
double d2 = player.prevPosZ + (player.posZ - player.prevPosZ) * (double) f;
|
||||
boolean flag = false;
|
||||
MovingObjectPosition movingobjectposition = this.getMovingObjectPositionFromPlayer(world, player, flag);
|
||||
|
||||
|
@ -608,9 +599,6 @@ public class SigilFluid extends Item implements IFluidContainerItem, ISigil
|
|||
public ItemStack drainSelectedTank(ItemStack container, World world, EntityPlayer player)
|
||||
{
|
||||
float f = 1.0F;
|
||||
double d0 = player.prevPosX + (player.posX - player.prevPosX) * (double) f;
|
||||
double d1 = player.prevPosY + (player.posY - player.prevPosY) * (double) f + 1.62D - (double) player.yOffset;
|
||||
double d2 = player.prevPosZ + (player.posZ - player.prevPosZ) * (double) f;
|
||||
boolean flag = false;
|
||||
MovingObjectPosition movingobjectposition = this.getMovingObjectPositionFromPlayer(world, player, flag);
|
||||
|
||||
|
|
|
@ -22,9 +22,9 @@ import cpw.mods.fml.relauncher.SideOnly;
|
|||
public class SigilHarvest extends EnergyItems implements IHolding, ArmourUpgrade, ISigil
|
||||
{
|
||||
@SideOnly(Side.CLIENT)
|
||||
private static IIcon activeIcon;
|
||||
private IIcon activeIcon;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private static IIcon passiveIcon;
|
||||
private IIcon passiveIcon;
|
||||
|
||||
public SigilHarvest()
|
||||
{
|
||||
|
@ -137,11 +137,6 @@ public class SigilHarvest extends EnergyItems implements IHolding, ArmourUpgrade
|
|||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if(par2World.isRemote)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
EntityPlayer par3EntityPlayer = (EntityPlayer) par3Entity;
|
||||
|
||||
|
@ -179,8 +174,6 @@ public class SigilHarvest extends EnergyItems implements IHolding, ArmourUpgrade
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -206,7 +199,6 @@ public class SigilHarvest extends EnergyItems implements IHolding, ArmourUpgrade
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -151,10 +151,8 @@ public class SigilLava extends ItemBucket implements ArmourUpgrade, ISigil
|
|||
return this.tryPlaceContainedLiquid(world, x, y, z, x, y, z);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -224,12 +222,7 @@ public class SigilLava extends ItemBucket implements ArmourUpgrade, ISigil
|
|||
}
|
||||
}
|
||||
|
||||
if (!usedBattery)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
return usedBattery;
|
||||
} else
|
||||
{
|
||||
return true;
|
||||
|
|
|
@ -21,9 +21,9 @@ import java.util.List;
|
|||
public class SigilOfElementalAffinity extends EnergyItems implements ISigil
|
||||
{
|
||||
@SideOnly(Side.CLIENT)
|
||||
private static IIcon activeIcon;
|
||||
private IIcon activeIcon;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private static IIcon passiveIcon;
|
||||
private IIcon passiveIcon;
|
||||
|
||||
public SigilOfElementalAffinity()
|
||||
{
|
||||
|
@ -156,7 +156,5 @@ public class SigilOfElementalAffinity extends EnergyItems implements ISigil
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
|
@ -23,9 +23,9 @@ import java.util.List;
|
|||
public class SigilOfEnderSeverance extends EnergyItems implements IHolding, ISigil
|
||||
{
|
||||
@SideOnly(Side.CLIENT)
|
||||
private static IIcon activeIcon;
|
||||
private IIcon activeIcon;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private static IIcon passiveIcon;
|
||||
private IIcon passiveIcon;
|
||||
|
||||
public SigilOfEnderSeverance()
|
||||
{
|
||||
|
|
|
@ -26,8 +26,10 @@ import java.util.List;
|
|||
|
||||
public class SigilOfGrowth extends EnergyItems implements ArmourUpgrade, ISigil
|
||||
{
|
||||
private static IIcon activeIcon;
|
||||
private static IIcon passiveIcon;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon activeIcon;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon passiveIcon;
|
||||
private int tickDelay = 100;
|
||||
|
||||
public SigilOfGrowth()
|
||||
|
@ -161,7 +163,6 @@ public class SigilOfGrowth extends EnergyItems implements ArmourUpgrade, ISigil
|
|||
return;
|
||||
}
|
||||
|
||||
EntityPlayer par3EntityPlayer = (EntityPlayer) par3Entity;
|
||||
if (par1ItemStack.getTagCompound() == null)
|
||||
{
|
||||
par1ItemStack.setTagCompound(new NBTTagCompound());
|
||||
|
@ -169,7 +170,7 @@ public class SigilOfGrowth extends EnergyItems implements ArmourUpgrade, ISigil
|
|||
|
||||
if (par1ItemStack.getTagCompound().getBoolean("isActive"))
|
||||
{
|
||||
if (par2World.getWorldTime() % tickDelay == par1ItemStack.getTagCompound().getInteger("worldTimeDelay") && par3Entity instanceof EntityPlayer)
|
||||
if (par2World.getWorldTime() % tickDelay == par1ItemStack.getTagCompound().getInteger("worldTimeDelay"))
|
||||
{
|
||||
if(!EnergyItems.syphonBatteries(par1ItemStack, (EntityPlayer) par3Entity, getEnergyUsed()))
|
||||
{
|
||||
|
@ -202,8 +203,6 @@ public class SigilOfGrowth extends EnergyItems implements ArmourUpgrade, ISigil
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
public static boolean applyBonemeal(ItemStack p_150919_0_, World p_150919_1_, int p_150919_2_, int p_150919_3_, int p_150919_4_, EntityPlayer player)
|
||||
|
@ -218,10 +217,6 @@ public class SigilOfGrowth extends EnergyItems implements ArmourUpgrade, ISigil
|
|||
|
||||
if (event.getResult() == Result.ALLOW)
|
||||
{
|
||||
if (!p_150919_1_.isRemote)
|
||||
{
|
||||
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -270,7 +265,6 @@ public class SigilOfGrowth extends EnergyItems implements ArmourUpgrade, ISigil
|
|||
{
|
||||
Block block = world.getBlock(ix, iy, iz);
|
||||
|
||||
|
||||
if (block instanceof IPlantable)
|
||||
{
|
||||
if (world.rand.nextInt(100) == 0)
|
||||
|
|
|
@ -21,9 +21,9 @@ import java.util.List;
|
|||
public class SigilOfHaste extends EnergyItems implements ArmourUpgrade, ISigil
|
||||
{
|
||||
@SideOnly(Side.CLIENT)
|
||||
private static IIcon activeIcon;
|
||||
private IIcon activeIcon;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private static IIcon passiveIcon;
|
||||
private IIcon passiveIcon;
|
||||
|
||||
public SigilOfHaste()
|
||||
{
|
||||
|
@ -152,8 +152,6 @@ public class SigilOfHaste extends EnergyItems implements ArmourUpgrade, ISigil
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -23,8 +23,10 @@ import cpw.mods.fml.relauncher.SideOnly;
|
|||
|
||||
public class SigilOfMagnetism extends EnergyItems implements ArmourUpgrade, IHolding, ISigil
|
||||
{
|
||||
private static IIcon activeIcon;
|
||||
private static IIcon passiveIcon;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon activeIcon;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon passiveIcon;
|
||||
private int tickDelay = 300;
|
||||
|
||||
public SigilOfMagnetism()
|
||||
|
@ -140,7 +142,7 @@ public class SigilOfMagnetism extends EnergyItems implements ArmourUpgrade, IHol
|
|||
|
||||
if (par1ItemStack.getTagCompound().getBoolean("isActive"))
|
||||
{
|
||||
if (par2World.getWorldTime() % tickDelay == par1ItemStack.getTagCompound().getInteger("worldTimeDelay") && par3Entity instanceof EntityPlayer)
|
||||
if (par2World.getWorldTime() % tickDelay == par1ItemStack.getTagCompound().getInteger("worldTimeDelay"))
|
||||
{
|
||||
if(!EnergyItems.syphonBatteries(par1ItemStack, (EntityPlayer) par3Entity, getEnergyUsed()))
|
||||
{
|
||||
|
|
|
@ -24,9 +24,10 @@ import java.util.List;
|
|||
|
||||
public class SigilOfSupression extends EnergyItems implements ArmourUpgrade, ISigil
|
||||
{
|
||||
private static IIcon activeIcon;
|
||||
private static IIcon passiveIcon;
|
||||
private int tickDelay = 200;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon activeIcon;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon passiveIcon;
|
||||
private int radius = 5;
|
||||
private int refresh = 100;
|
||||
|
||||
|
@ -62,8 +63,8 @@ public class SigilOfSupression extends EnergyItems implements ArmourUpgrade, ISi
|
|||
public void registerIcons(IIconRegister iconRegister)
|
||||
{
|
||||
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:SigilOfSupression_deactivated");
|
||||
this.activeIcon = iconRegister.registerIcon("AlchemicalWizardry:SigilOfSupression_activated");
|
||||
this.passiveIcon = iconRegister.registerIcon("AlchemicalWizardry:SigilOfSupression_deactivated");
|
||||
activeIcon = iconRegister.registerIcon("AlchemicalWizardry:SigilOfSupression_activated");
|
||||
passiveIcon = iconRegister.registerIcon("AlchemicalWizardry:SigilOfSupression_deactivated");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -78,10 +79,10 @@ public class SigilOfSupression extends EnergyItems implements ArmourUpgrade, ISi
|
|||
|
||||
if (tag.getBoolean("isActive"))
|
||||
{
|
||||
return this.activeIcon;
|
||||
return activeIcon;
|
||||
} else
|
||||
{
|
||||
return this.passiveIcon;
|
||||
return passiveIcon;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -91,16 +92,18 @@ public class SigilOfSupression extends EnergyItems implements ArmourUpgrade, ISi
|
|||
{
|
||||
if (par1 == 1)
|
||||
{
|
||||
return this.activeIcon;
|
||||
return activeIcon;
|
||||
} else
|
||||
{
|
||||
return this.passiveIcon;
|
||||
return passiveIcon;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)
|
||||
{
|
||||
int tickDelay = 200;
|
||||
|
||||
if (!EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer) || SpellHelper.isFakePlayer(par2World, par3EntityPlayer))
|
||||
{
|
||||
return par1ItemStack;
|
||||
|
|
|
@ -23,8 +23,10 @@ import java.util.List;
|
|||
|
||||
public class SigilOfTheBridge extends EnergyItems implements ArmourUpgrade, ISigil
|
||||
{
|
||||
private static IIcon activeIcon;
|
||||
private static IIcon passiveIcon;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon activeIcon;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon passiveIcon;
|
||||
private int tickDelay = 200;
|
||||
|
||||
public SigilOfTheBridge()
|
||||
|
@ -141,7 +143,7 @@ public class SigilOfTheBridge extends EnergyItems implements ArmourUpgrade, ISig
|
|||
|
||||
if (par1ItemStack.getTagCompound().getBoolean("isActive"))
|
||||
{
|
||||
if (par2World.getWorldTime() % tickDelay == par1ItemStack.getTagCompound().getInteger("worldTimeDelay") && par3Entity instanceof EntityPlayer)
|
||||
if (par2World.getWorldTime() % tickDelay == par1ItemStack.getTagCompound().getInteger("worldTimeDelay"))
|
||||
{
|
||||
if(EnergyItems.syphonBatteries(par1ItemStack, (EntityPlayer) par3Entity, this.getLPUsed(par1ItemStack)))
|
||||
{
|
||||
|
@ -209,8 +211,6 @@ public class SigilOfTheBridge extends EnergyItems implements ArmourUpgrade, ISig
|
|||
|
||||
this.incrimentLPUSed(par1ItemStack, incremented);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
public int getLPUsed(ItemStack par1ItemStack)
|
||||
|
|
|
@ -22,9 +22,9 @@ import java.util.List;
|
|||
public class SigilOfTheFastMiner extends EnergyItems implements ArmourUpgrade, ISigil
|
||||
{
|
||||
@SideOnly(Side.CLIENT)
|
||||
private static IIcon activeIcon;
|
||||
private IIcon activeIcon;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private static IIcon passiveIcon;
|
||||
private IIcon passiveIcon;
|
||||
|
||||
public SigilOfTheFastMiner()
|
||||
{
|
||||
|
@ -153,8 +153,6 @@ public class SigilOfTheFastMiner extends EnergyItems implements ArmourUpgrade, I
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -21,9 +21,9 @@ import java.util.List;
|
|||
public class SigilOfWind extends EnergyItems implements ArmourUpgrade, ISigil
|
||||
{
|
||||
@SideOnly(Side.CLIENT)
|
||||
private static IIcon activeIcon;
|
||||
private IIcon activeIcon;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private static IIcon passiveIcon;
|
||||
private IIcon passiveIcon;
|
||||
|
||||
public SigilOfWind()
|
||||
{
|
||||
|
@ -152,8 +152,6 @@ public class SigilOfWind extends EnergyItems implements ArmourUpgrade, ISigil
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -23,9 +23,9 @@ import cpw.mods.fml.relauncher.SideOnly;
|
|||
public class SigilPackRat extends EnergyItems implements IHolding, ArmourUpgrade, ISigil
|
||||
{
|
||||
@SideOnly(Side.CLIENT)
|
||||
private static IIcon activeIcon;
|
||||
private IIcon activeIcon;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private static IIcon passiveIcon;
|
||||
private IIcon passiveIcon;
|
||||
|
||||
public SigilPackRat()
|
||||
{
|
||||
|
@ -165,8 +165,6 @@ public class SigilPackRat extends EnergyItems implements IHolding, ArmourUpgrade
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -59,8 +59,6 @@ public class SigilSeer extends Item implements IHolding, ArmourUpgrade, ISigil
|
|||
return par1ItemStack;
|
||||
}
|
||||
|
||||
String ownerName = itemTag.getString("ownerName");
|
||||
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
|
|
|
@ -85,10 +85,6 @@ public class SigilVoid extends ItemBucket implements ArmourUpgrade, ISigil
|
|||
}
|
||||
|
||||
float f = 1.0F;
|
||||
double d0 = player.prevPosX + (player.posX - player.prevPosX) * (double) f;
|
||||
double d1 = player.prevPosY + (player.posY - player.prevPosY) * (double) f + 1.62D - (double) player.yOffset;
|
||||
double d2 = player.prevPosZ + (player.posZ - player.prevPosZ) * (double) f;
|
||||
boolean flag = this.isFull == 0;
|
||||
|
||||
if (!world.canMineBlock(player, x, y, z))
|
||||
{
|
||||
|
|
|
@ -25,10 +25,14 @@ import java.util.List;
|
|||
|
||||
public class ItemSanguineArmour extends ItemArmor implements ArmourUpgrade, IGoggles, IVisDiscountGear, IRevealer, IRunicArmor, IRepairable
|
||||
{
|
||||
private static IIcon helmetIcon;
|
||||
private static IIcon plateIcon;
|
||||
private static IIcon leggingsIcon;
|
||||
private static IIcon bootsIcon;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon helmetIcon;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon plateIcon;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon leggingsIcon;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon bootsIcon;
|
||||
|
||||
public ItemSanguineArmour(int armorType)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue