Performance Commit --Too lazy to do the Altar recipe

This commit is contained in:
Arcaratus 2015-07-02 11:05:07 -04:00
parent 013367cffa
commit e5b795fddc
217 changed files with 840 additions and 1244 deletions

View file

@ -18,8 +18,6 @@ import cpw.mods.fml.relauncher.SideOnly;
public class SigilAir extends EnergyItems implements ArmourUpgrade, ISigil
{
private int energyUsed;
public SigilAir()
{
super();

View file

@ -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();

View file

@ -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;
}

View file

@ -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);

View file

@ -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

View file

@ -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;

View file

@ -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;
}
}

View file

@ -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()
{

View file

@ -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)

View file

@ -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

View file

@ -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()))
{

View file

@ -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;

View file

@ -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)

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -59,8 +59,6 @@ public class SigilSeer extends Item implements IHolding, ArmourUpgrade, ISigil
return par1ItemStack;
}
String ownerName = itemTag.getString("ownerName");
return par1ItemStack;
}

View file

@ -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))
{