Refactoring
This commit is contained in:
parent
fd330233dd
commit
56ccd3188d
76 changed files with 876 additions and 433 deletions
|
@ -32,9 +32,9 @@ public class AirSigil extends EnergyItems implements ArmourUpgrade
|
|||
{
|
||||
par3List.add("I feel lighter already...");
|
||||
|
||||
if (!(par1ItemStack.stackTagCompound == null))
|
||||
if (!(par1ItemStack.getTagCompound() == null))
|
||||
{
|
||||
par3List.add("Current owner: " + par1ItemStack.stackTagCompound.getString("ownerName"));
|
||||
par3List.add("Current owner: " + par1ItemStack.getTagCompound().getString("ownerName"));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -47,9 +47,9 @@ public class DivinationSigil extends Item implements ArmourUpgrade, IReagentMani
|
|||
par3List.add("Peer into the soul to");
|
||||
par3List.add("get the current essence");
|
||||
|
||||
if (!(par1ItemStack.stackTagCompound == null))
|
||||
if (!(par1ItemStack.getTagCompound() == null))
|
||||
{
|
||||
par3List.add("Current owner: " + par1ItemStack.stackTagCompound.getString("ownerName"));
|
||||
par3List.add("Current owner: " + par1ItemStack.getTagCompound().getString("ownerName"));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -68,7 +68,7 @@ public class DivinationSigil extends Item implements ArmourUpgrade, IReagentMani
|
|||
return par1ItemStack;
|
||||
}
|
||||
|
||||
NBTTagCompound itemTag = par1ItemStack.stackTagCompound;
|
||||
NBTTagCompound itemTag = par1ItemStack.getTagCompound();
|
||||
|
||||
if (itemTag == null || itemTag.getString("ownerName").equals(""))
|
||||
{
|
||||
|
|
|
@ -32,9 +32,9 @@ public class ItemBloodLightSigil extends EnergyItems implements IHolding
|
|||
{
|
||||
par3List.add("I see a light!");
|
||||
|
||||
if (!(par1ItemStack.stackTagCompound == null))
|
||||
if (!(par1ItemStack.getTagCompound() == null))
|
||||
{
|
||||
par3List.add("Current owner: " + par1ItemStack.stackTagCompound.getString("ownerName"));
|
||||
par3List.add("Current owner: " + par1ItemStack.getTagCompound().getString("ownerName"));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -102,7 +102,7 @@ public class ItemBloodLightSigil extends EnergyItems implements IHolding
|
|||
return par1ItemStack;
|
||||
}
|
||||
|
||||
if (par1ItemStack.stackTagCompound == null)
|
||||
if (par1ItemStack.getTagCompound() == null)
|
||||
{
|
||||
par1ItemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
|
|
@ -46,7 +46,7 @@ public class ItemFluidSigil extends Item implements IFluidContainerItem
|
|||
{
|
||||
par3List.add("A sigil with a lovely affinity for fluids");
|
||||
|
||||
if (!(par1ItemStack.stackTagCompound == null))
|
||||
if (!(par1ItemStack.getTagCompound() == null))
|
||||
{
|
||||
switch (this.getActionState(par1ItemStack))
|
||||
{
|
||||
|
@ -122,22 +122,22 @@ public class ItemFluidSigil extends Item implements IFluidContainerItem
|
|||
|
||||
public int getActionState(ItemStack item)
|
||||
{
|
||||
if (item.stackTagCompound == null)
|
||||
if (item.getTagCompound() == null)
|
||||
{
|
||||
item.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
return item.stackTagCompound.getInteger("actionState");
|
||||
return item.getTagCompound().getInteger("actionState");
|
||||
}
|
||||
|
||||
public void setActionState(ItemStack item, int actionState)
|
||||
{
|
||||
if (item.stackTagCompound == null)
|
||||
if (item.getTagCompound() == null)
|
||||
{
|
||||
item.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
item.stackTagCompound.setInteger("actionState", actionState);
|
||||
item.getTagCompound().setInteger("actionState", actionState);
|
||||
}
|
||||
|
||||
public int cycleActionState(ItemStack item)
|
||||
|
@ -648,11 +648,11 @@ public class ItemFluidSigil extends Item implements IFluidContainerItem
|
|||
@Override
|
||||
public FluidStack getFluid(ItemStack container)
|
||||
{
|
||||
if (container.stackTagCompound == null || !container.stackTagCompound.hasKey("Fluid"))
|
||||
if (container.getTagCompound() == null || !container.getTagCompound().hasKey("Fluid"))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return FluidStack.loadFluidStackFromNBT(container.stackTagCompound.getCompoundTag("Fluid"));
|
||||
return FluidStack.loadFluidStackFromNBT(container.getTagCompound().getCompoundTag("Fluid"));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -671,12 +671,12 @@ public class ItemFluidSigil extends Item implements IFluidContainerItem
|
|||
|
||||
if (!doFill)
|
||||
{
|
||||
if (container.stackTagCompound == null || !container.stackTagCompound.hasKey("Fluid"))
|
||||
if (container.getTagCompound() == null || !container.getTagCompound().hasKey("Fluid"))
|
||||
{
|
||||
return Math.min(capacity, resource.amount);
|
||||
}
|
||||
|
||||
FluidStack stack = FluidStack.loadFluidStackFromNBT(container.stackTagCompound.getCompoundTag("Fluid"));
|
||||
FluidStack stack = FluidStack.loadFluidStackFromNBT(container.getTagCompound().getCompoundTag("Fluid"));
|
||||
|
||||
if (stack == null || stack.amount <= 0)
|
||||
{
|
||||
|
@ -691,27 +691,27 @@ public class ItemFluidSigil extends Item implements IFluidContainerItem
|
|||
return Math.min(capacity - stack.amount, resource.amount);
|
||||
}
|
||||
|
||||
if (container.stackTagCompound == null)
|
||||
if (container.getTagCompound() == null)
|
||||
{
|
||||
container.stackTagCompound = new NBTTagCompound();
|
||||
container.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
if (!container.stackTagCompound.hasKey("Fluid"))
|
||||
if (!container.getTagCompound().hasKey("Fluid"))
|
||||
{
|
||||
NBTTagCompound fluidTag = resource.writeToNBT(new NBTTagCompound());
|
||||
|
||||
if (capacity < resource.amount)
|
||||
{
|
||||
fluidTag.setInteger("Amount", capacity);
|
||||
container.stackTagCompound.setTag("Fluid", fluidTag);
|
||||
container.getTagCompound().setTag("Fluid", fluidTag);
|
||||
return capacity;
|
||||
}
|
||||
|
||||
container.stackTagCompound.setTag("Fluid", fluidTag);
|
||||
container.getTagCompound().setTag("Fluid", fluidTag);
|
||||
return resource.amount;
|
||||
}
|
||||
|
||||
NBTTagCompound fluidTag = container.stackTagCompound.getCompoundTag("Fluid");
|
||||
NBTTagCompound fluidTag = container.getTagCompound().getCompoundTag("Fluid");
|
||||
FluidStack stack = FluidStack.loadFluidStackFromNBT(fluidTag);
|
||||
|
||||
if (stack == null || stack.amount <= 0)
|
||||
|
@ -721,11 +721,11 @@ public class ItemFluidSigil extends Item implements IFluidContainerItem
|
|||
if (capacity < resource.amount)
|
||||
{
|
||||
fluidTag1.setInteger("Amount", capacity);
|
||||
container.stackTagCompound.setTag("Fluid", fluidTag1);
|
||||
container.getTagCompound().setTag("Fluid", fluidTag1);
|
||||
return capacity;
|
||||
}
|
||||
|
||||
container.stackTagCompound.setTag("Fluid", fluidTag1);
|
||||
container.getTagCompound().setTag("Fluid", fluidTag1);
|
||||
return resource.amount;
|
||||
}
|
||||
|
||||
|
@ -744,19 +744,19 @@ public class ItemFluidSigil extends Item implements IFluidContainerItem
|
|||
stack.amount = capacity;
|
||||
}
|
||||
|
||||
container.stackTagCompound.setTag("Fluid", stack.writeToNBT(fluidTag));
|
||||
container.getTagCompound().setTag("Fluid", stack.writeToNBT(fluidTag));
|
||||
return filled;
|
||||
}
|
||||
|
||||
@Override
|
||||
public FluidStack drain(ItemStack container, int maxDrain, boolean doDrain)
|
||||
{
|
||||
if (container.stackTagCompound == null || !container.stackTagCompound.hasKey("Fluid"))
|
||||
if (container.getTagCompound() == null || !container.getTagCompound().hasKey("Fluid"))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
FluidStack stack = FluidStack.loadFluidStackFromNBT(container.stackTagCompound.getCompoundTag("Fluid"));
|
||||
FluidStack stack = FluidStack.loadFluidStackFromNBT(container.getTagCompound().getCompoundTag("Fluid"));
|
||||
if (stack == null)
|
||||
{
|
||||
return null;
|
||||
|
@ -767,18 +767,18 @@ public class ItemFluidSigil extends Item implements IFluidContainerItem
|
|||
{
|
||||
if (maxDrain >= capacity)
|
||||
{
|
||||
container.stackTagCompound.removeTag("Fluid");
|
||||
container.getTagCompound().removeTag("Fluid");
|
||||
|
||||
if (container.stackTagCompound.hasNoTags())
|
||||
if (container.getTagCompound().hasNoTags())
|
||||
{
|
||||
container.stackTagCompound = null;
|
||||
container.setTagCompound(null);
|
||||
}
|
||||
return stack;
|
||||
}
|
||||
|
||||
NBTTagCompound fluidTag = container.stackTagCompound.getCompoundTag("Fluid");
|
||||
NBTTagCompound fluidTag = container.getTagCompound().getCompoundTag("Fluid");
|
||||
fluidTag.setInteger("Amount", fluidTag.getInteger("Amount") - maxDrain);
|
||||
container.stackTagCompound.setTag("Fluid", fluidTag);
|
||||
container.getTagCompound().setTag("Fluid", fluidTag);
|
||||
}
|
||||
return stack;
|
||||
}
|
||||
|
|
|
@ -37,9 +37,9 @@ public class ItemHarvestSigil extends EnergyItems implements IHolding, ArmourUpg
|
|||
{
|
||||
par3List.add("You sow what you reap");
|
||||
|
||||
if (!(par1ItemStack.stackTagCompound == null))
|
||||
if (!(par1ItemStack.getTagCompound() == null))
|
||||
{
|
||||
if (par1ItemStack.stackTagCompound.getBoolean("isActive"))
|
||||
if (par1ItemStack.getTagCompound().getBoolean("isActive"))
|
||||
{
|
||||
par3List.add("Activated");
|
||||
} else
|
||||
|
@ -47,7 +47,7 @@ public class ItemHarvestSigil extends EnergyItems implements IHolding, ArmourUpg
|
|||
par3List.add("Deactivated");
|
||||
}
|
||||
|
||||
par3List.add("Current owner: " + par1ItemStack.stackTagCompound.getString("ownerName"));
|
||||
par3List.add("Current owner: " + par1ItemStack.getTagCompound().getString("ownerName"));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -63,12 +63,12 @@ public class ItemHarvestSigil extends EnergyItems implements IHolding, ArmourUpg
|
|||
@Override
|
||||
public IIcon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining)
|
||||
{
|
||||
if (stack.stackTagCompound == null)
|
||||
if (stack.getTagCompound() == null)
|
||||
{
|
||||
stack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
NBTTagCompound tag = stack.stackTagCompound;
|
||||
NBTTagCompound tag = stack.getTagCompound();
|
||||
|
||||
if (tag.getBoolean("isActive"))
|
||||
{
|
||||
|
@ -102,12 +102,12 @@ public class ItemHarvestSigil extends EnergyItems implements IHolding, ArmourUpg
|
|||
return par1ItemStack;
|
||||
}
|
||||
|
||||
if (par1ItemStack.stackTagCompound == null)
|
||||
if (par1ItemStack.getTagCompound() == null)
|
||||
{
|
||||
par1ItemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
NBTTagCompound tag = par1ItemStack.stackTagCompound;
|
||||
NBTTagCompound tag = par1ItemStack.getTagCompound();
|
||||
tag.setBoolean("isActive", !(tag.getBoolean("isActive")));
|
||||
|
||||
if (tag.getBoolean("isActive"))
|
||||
|
@ -145,12 +145,12 @@ public class ItemHarvestSigil extends EnergyItems implements IHolding, ArmourUpg
|
|||
|
||||
EntityPlayer par3EntityPlayer = (EntityPlayer) par3Entity;
|
||||
|
||||
if (par1ItemStack.stackTagCompound == null)
|
||||
if (par1ItemStack.getTagCompound() == null)
|
||||
{
|
||||
par1ItemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
if (par1ItemStack.stackTagCompound.getBoolean("isActive"))
|
||||
if (par1ItemStack.getTagCompound().getBoolean("isActive"))
|
||||
{
|
||||
int range = 3;
|
||||
int verticalRange = 1;
|
||||
|
@ -169,13 +169,13 @@ public class ItemHarvestSigil extends EnergyItems implements IHolding, ArmourUpg
|
|||
}
|
||||
}
|
||||
}
|
||||
if (par2World.getWorldTime() % 200 == par1ItemStack.stackTagCompound.getInteger("worldTimeDelay") && par1ItemStack.stackTagCompound.getBoolean("isActive"))
|
||||
if (par2World.getWorldTime() % 200 == par1ItemStack.getTagCompound().getInteger("worldTimeDelay") && par1ItemStack.getTagCompound().getBoolean("isActive"))
|
||||
{
|
||||
if (!par3EntityPlayer.capabilities.isCreativeMode)
|
||||
{
|
||||
if(!EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed()))
|
||||
{
|
||||
par1ItemStack.stackTagCompound.setBoolean("isActive", false);
|
||||
par1ItemStack.getTagCompound().setBoolean("isActive", false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -38,9 +38,9 @@ public class ItemPackRatSigil extends EnergyItems implements IHolding, ArmourUpg
|
|||
{
|
||||
par3List.add("Hands of Diamonds");
|
||||
|
||||
if (!(par1ItemStack.stackTagCompound == null))
|
||||
if (!(par1ItemStack.getTagCompound() == null))
|
||||
{
|
||||
if (par1ItemStack.stackTagCompound.getBoolean("isActive"))
|
||||
if (par1ItemStack.getTagCompound().getBoolean("isActive"))
|
||||
{
|
||||
par3List.add("Activated");
|
||||
} else
|
||||
|
@ -48,7 +48,7 @@ public class ItemPackRatSigil extends EnergyItems implements IHolding, ArmourUpg
|
|||
par3List.add("Deactivated");
|
||||
}
|
||||
|
||||
par3List.add("Current owner: " + par1ItemStack.stackTagCompound.getString("ownerName"));
|
||||
par3List.add("Current owner: " + par1ItemStack.getTagCompound().getString("ownerName"));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -64,12 +64,12 @@ public class ItemPackRatSigil extends EnergyItems implements IHolding, ArmourUpg
|
|||
@Override
|
||||
public IIcon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining)
|
||||
{
|
||||
if (stack.stackTagCompound == null)
|
||||
if (stack.getTagCompound() == null)
|
||||
{
|
||||
stack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
NBTTagCompound tag = stack.stackTagCompound;
|
||||
NBTTagCompound tag = stack.getTagCompound();
|
||||
|
||||
if (tag.getBoolean("isActive"))
|
||||
{
|
||||
|
@ -103,12 +103,12 @@ public class ItemPackRatSigil extends EnergyItems implements IHolding, ArmourUpg
|
|||
return par1ItemStack;
|
||||
}
|
||||
|
||||
if (par1ItemStack.stackTagCompound == null)
|
||||
if (par1ItemStack.getTagCompound() == null)
|
||||
{
|
||||
par1ItemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
NBTTagCompound tag = par1ItemStack.stackTagCompound;
|
||||
NBTTagCompound tag = par1ItemStack.getTagCompound();
|
||||
tag.setBoolean("isActive", !(tag.getBoolean("isActive")));
|
||||
|
||||
if (tag.getBoolean("isActive"))
|
||||
|
@ -141,12 +141,12 @@ public class ItemPackRatSigil extends EnergyItems implements IHolding, ArmourUpg
|
|||
|
||||
EntityPlayer par3EntityPlayer = (EntityPlayer) par3Entity;
|
||||
|
||||
if (par1ItemStack.stackTagCompound == null)
|
||||
if (par1ItemStack.getTagCompound() == null)
|
||||
{
|
||||
par1ItemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
if (par1ItemStack.stackTagCompound.getBoolean("isActive"))
|
||||
if (par1ItemStack.getTagCompound().getBoolean("isActive"))
|
||||
{
|
||||
ItemStack stack = CompressionRegistry.compressInventory(par3EntityPlayer.inventory.mainInventory, par2World);
|
||||
if(stack != null)
|
||||
|
@ -155,13 +155,13 @@ public class ItemPackRatSigil extends EnergyItems implements IHolding, ArmourUpg
|
|||
par2World.spawnEntityInWorld(entityItem);
|
||||
}
|
||||
}
|
||||
if (par2World.getWorldTime() % 200 == par1ItemStack.stackTagCompound.getInteger("worldTimeDelay") && par1ItemStack.stackTagCompound.getBoolean("isActive"))
|
||||
if (par2World.getWorldTime() % 200 == par1ItemStack.getTagCompound().getInteger("worldTimeDelay") && par1ItemStack.getTagCompound().getBoolean("isActive"))
|
||||
{
|
||||
if (!par3EntityPlayer.capabilities.isCreativeMode)
|
||||
{
|
||||
if(!EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed()))
|
||||
{
|
||||
par1ItemStack.stackTagCompound.setBoolean("isActive", false);
|
||||
par1ItemStack.getTagCompound().setBoolean("isActive", false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -36,9 +36,9 @@ public class ItemSeerSigil extends Item implements IHolding, ArmourUpgrade
|
|||
{
|
||||
par3List.add("When seeing all is not enough");
|
||||
|
||||
if (!(par1ItemStack.stackTagCompound == null))
|
||||
if (!(par1ItemStack.getTagCompound() == null))
|
||||
{
|
||||
par3List.add("Current owner: " + par1ItemStack.stackTagCompound.getString("ownerName"));
|
||||
par3List.add("Current owner: " + par1ItemStack.getTagCompound().getString("ownerName"));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -52,7 +52,7 @@ public class ItemSeerSigil extends Item implements IHolding, ArmourUpgrade
|
|||
return par1ItemStack;
|
||||
}
|
||||
|
||||
NBTTagCompound itemTag = par1ItemStack.stackTagCompound;
|
||||
NBTTagCompound itemTag = par1ItemStack.getTagCompound();
|
||||
|
||||
if (itemTag == null || itemTag.getString("ownerName").equals(""))
|
||||
{
|
||||
|
|
|
@ -38,9 +38,9 @@ public class ItemSigilOfEnderSeverance extends EnergyItems implements IHolding
|
|||
{
|
||||
par3List.add("Put those endermen in a Dire situation!");
|
||||
|
||||
if (!(par1ItemStack.stackTagCompound == null))
|
||||
if (!(par1ItemStack.getTagCompound() == null))
|
||||
{
|
||||
if (par1ItemStack.stackTagCompound.getBoolean("isActive"))
|
||||
if (par1ItemStack.getTagCompound().getBoolean("isActive"))
|
||||
{
|
||||
par3List.add("Activated");
|
||||
} else
|
||||
|
@ -48,7 +48,7 @@ public class ItemSigilOfEnderSeverance extends EnergyItems implements IHolding
|
|||
par3List.add("Deactivated");
|
||||
}
|
||||
|
||||
par3List.add("Current owner: " + par1ItemStack.stackTagCompound.getString("ownerName"));
|
||||
par3List.add("Current owner: " + par1ItemStack.getTagCompound().getString("ownerName"));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -64,12 +64,12 @@ public class ItemSigilOfEnderSeverance extends EnergyItems implements IHolding
|
|||
@Override
|
||||
public IIcon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining)
|
||||
{
|
||||
if (stack.stackTagCompound == null)
|
||||
if (stack.getTagCompound() == null)
|
||||
{
|
||||
stack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
NBTTagCompound tag = stack.stackTagCompound;
|
||||
NBTTagCompound tag = stack.getTagCompound();
|
||||
|
||||
if (tag.getBoolean("isActive"))
|
||||
{
|
||||
|
@ -103,12 +103,12 @@ public class ItemSigilOfEnderSeverance extends EnergyItems implements IHolding
|
|||
return par1ItemStack;
|
||||
}
|
||||
|
||||
if (par1ItemStack.stackTagCompound == null)
|
||||
if (par1ItemStack.getTagCompound() == null)
|
||||
{
|
||||
par1ItemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
NBTTagCompound tag = par1ItemStack.stackTagCompound;
|
||||
NBTTagCompound tag = par1ItemStack.getTagCompound();
|
||||
tag.setBoolean("isActive", !(tag.getBoolean("isActive")));
|
||||
|
||||
if (tag.getBoolean("isActive"))
|
||||
|
@ -141,12 +141,12 @@ public class ItemSigilOfEnderSeverance extends EnergyItems implements IHolding
|
|||
|
||||
EntityPlayer par3EntityPlayer = (EntityPlayer) par3Entity;
|
||||
|
||||
if (par1ItemStack.stackTagCompound == null)
|
||||
if (par1ItemStack.getTagCompound() == null)
|
||||
{
|
||||
par1ItemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
if (par1ItemStack.stackTagCompound.getBoolean("isActive"))
|
||||
if (par1ItemStack.getTagCompound().getBoolean("isActive"))
|
||||
{
|
||||
List<Entity> list = SpellHelper.getEntitiesInRange(par2World, par3Entity.posX, par3Entity.posY, par3Entity.posZ, 4.5, 4.5);
|
||||
for (Entity entity : list)
|
||||
|
@ -157,13 +157,13 @@ public class ItemSigilOfEnderSeverance extends EnergyItems implements IHolding
|
|||
}
|
||||
}
|
||||
}
|
||||
if (par2World.getWorldTime() % 200 == par1ItemStack.stackTagCompound.getInteger("worldTimeDelay") && par1ItemStack.stackTagCompound.getBoolean("isActive"))
|
||||
if (par2World.getWorldTime() % 200 == par1ItemStack.getTagCompound().getInteger("worldTimeDelay") && par1ItemStack.getTagCompound().getBoolean("isActive"))
|
||||
{
|
||||
if (!par3EntityPlayer.capabilities.isCreativeMode)
|
||||
{
|
||||
if(!EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed()))
|
||||
{
|
||||
par1ItemStack.stackTagCompound.setBoolean("isActive", false);
|
||||
par1ItemStack.getTagCompound().setBoolean("isActive", false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -41,9 +41,9 @@ public class ItemSigilOfSupression extends EnergyItems implements ArmourUpgrade
|
|||
{
|
||||
par3List.add("Better than telekinesis");
|
||||
|
||||
if (!(par1ItemStack.stackTagCompound == null))
|
||||
if (!(par1ItemStack.getTagCompound() == null))
|
||||
{
|
||||
if (par1ItemStack.stackTagCompound.getBoolean("isActive"))
|
||||
if (par1ItemStack.getTagCompound().getBoolean("isActive"))
|
||||
{
|
||||
par3List.add("Activated");
|
||||
} else
|
||||
|
@ -51,7 +51,7 @@ public class ItemSigilOfSupression extends EnergyItems implements ArmourUpgrade
|
|||
par3List.add("Deactivated");
|
||||
}
|
||||
|
||||
par3List.add("Current owner: " + par1ItemStack.stackTagCompound.getString("ownerName"));
|
||||
par3List.add("Current owner: " + par1ItemStack.getTagCompound().getString("ownerName"));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -67,12 +67,12 @@ public class ItemSigilOfSupression extends EnergyItems implements ArmourUpgrade
|
|||
@Override
|
||||
public IIcon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining)
|
||||
{
|
||||
if (stack.stackTagCompound == null)
|
||||
if (stack.getTagCompound() == null)
|
||||
{
|
||||
stack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
NBTTagCompound tag = stack.stackTagCompound;
|
||||
NBTTagCompound tag = stack.getTagCompound();
|
||||
|
||||
if (tag.getBoolean("isActive"))
|
||||
{
|
||||
|
@ -111,12 +111,12 @@ public class ItemSigilOfSupression extends EnergyItems implements ArmourUpgrade
|
|||
return par1ItemStack;
|
||||
}
|
||||
|
||||
if (par1ItemStack.stackTagCompound == null)
|
||||
if (par1ItemStack.getTagCompound() == null)
|
||||
{
|
||||
par1ItemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
NBTTagCompound tag = par1ItemStack.stackTagCompound;
|
||||
NBTTagCompound tag = par1ItemStack.getTagCompound();
|
||||
tag.setBoolean("isActive", !(tag.getBoolean("isActive")));
|
||||
|
||||
if (tag.getBoolean("isActive"))
|
||||
|
@ -154,12 +154,12 @@ public class ItemSigilOfSupression extends EnergyItems implements ArmourUpgrade
|
|||
|
||||
EntityPlayer par3EntityPlayer = (EntityPlayer) par3Entity;
|
||||
|
||||
if (par1ItemStack.stackTagCompound == null)
|
||||
if (par1ItemStack.getTagCompound() == null)
|
||||
{
|
||||
par1ItemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
if (par1ItemStack.stackTagCompound.getBoolean("isActive") && (!par2World.isRemote))
|
||||
if (par1ItemStack.getTagCompound().getBoolean("isActive") && (!par2World.isRemote))
|
||||
{
|
||||
Vec3 blockVec = SpellHelper.getEntityBlockVector(par3EntityPlayer);
|
||||
int x = (int) blockVec.xCoord;
|
||||
|
@ -200,13 +200,13 @@ public class ItemSigilOfSupression extends EnergyItems implements ArmourUpgrade
|
|||
}
|
||||
}
|
||||
|
||||
if (par2World.getWorldTime() % 200 == par1ItemStack.stackTagCompound.getInteger("worldTimeDelay") && par1ItemStack.stackTagCompound.getBoolean("isActive"))
|
||||
if (par2World.getWorldTime() % 200 == par1ItemStack.getTagCompound().getInteger("worldTimeDelay") && par1ItemStack.getTagCompound().getBoolean("isActive"))
|
||||
{
|
||||
if (!par3EntityPlayer.capabilities.isCreativeMode)
|
||||
{
|
||||
if(!EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed()))
|
||||
{
|
||||
par1ItemStack.stackTagCompound.setBoolean("isActive", false);
|
||||
par1ItemStack.getTagCompound().setBoolean("isActive", false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -39,7 +39,7 @@ public class ItemSigilOfTheAssassin extends EnergyItems implements ArmourUpgrade
|
|||
@Override
|
||||
public void onCreated(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)
|
||||
{
|
||||
if (par1ItemStack.stackTagCompound == null)
|
||||
if (par1ItemStack.getTagCompound() == null)
|
||||
{
|
||||
par1ItemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
@ -66,9 +66,9 @@ public class ItemSigilOfTheAssassin extends EnergyItems implements ArmourUpgrade
|
|||
{
|
||||
par3List.add("Time to stay stealthy...");
|
||||
|
||||
if (!(par1ItemStack.stackTagCompound == null))
|
||||
if (!(par1ItemStack.getTagCompound() == null))
|
||||
{
|
||||
par3List.add("Current owner: " + par1ItemStack.stackTagCompound.getString("ownerName"));
|
||||
par3List.add("Current owner: " + par1ItemStack.getTagCompound().getString("ownerName"));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -63,9 +63,9 @@ public class LavaSigil extends ItemBucket implements ArmourUpgrade
|
|||
par3List.add("Contact with liquid is");
|
||||
par3List.add("highly unrecommended.");
|
||||
|
||||
if (!(par1ItemStack.stackTagCompound == null))
|
||||
if (!(par1ItemStack.getTagCompound() == null))
|
||||
{
|
||||
par3List.add("Current owner: " + par1ItemStack.stackTagCompound.getString("ownerName"));
|
||||
par3List.add("Current owner: " + par1ItemStack.getTagCompound().getString("ownerName"));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -37,9 +37,9 @@ public class SigilOfElementalAffinity extends EnergyItems
|
|||
par3List.add("Perfect for a fire-breathing fish");
|
||||
par3List.add("who is afraid of heights!");
|
||||
|
||||
if (!(par1ItemStack.stackTagCompound == null))
|
||||
if (!(par1ItemStack.getTagCompound() == null))
|
||||
{
|
||||
if (par1ItemStack.stackTagCompound.getBoolean("isActive"))
|
||||
if (par1ItemStack.getTagCompound().getBoolean("isActive"))
|
||||
{
|
||||
par3List.add("Activated");
|
||||
} else
|
||||
|
@ -47,7 +47,7 @@ public class SigilOfElementalAffinity extends EnergyItems
|
|||
par3List.add("Deactivated");
|
||||
}
|
||||
|
||||
par3List.add("Current owner: " + par1ItemStack.stackTagCompound.getString("ownerName"));
|
||||
par3List.add("Current owner: " + par1ItemStack.getTagCompound().getString("ownerName"));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -63,12 +63,12 @@ public class SigilOfElementalAffinity extends EnergyItems
|
|||
@Override
|
||||
public IIcon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining)
|
||||
{
|
||||
if (stack.stackTagCompound == null)
|
||||
if (stack.getTagCompound() == null)
|
||||
{
|
||||
stack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
NBTTagCompound tag = stack.stackTagCompound;
|
||||
NBTTagCompound tag = stack.getTagCompound();
|
||||
|
||||
if (tag.getBoolean("isActive"))
|
||||
{
|
||||
|
@ -102,12 +102,12 @@ public class SigilOfElementalAffinity extends EnergyItems
|
|||
return par1ItemStack;
|
||||
}
|
||||
|
||||
if (par1ItemStack.stackTagCompound == null)
|
||||
if (par1ItemStack.getTagCompound() == null)
|
||||
{
|
||||
par1ItemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
NBTTagCompound tag = par1ItemStack.stackTagCompound;
|
||||
NBTTagCompound tag = par1ItemStack.getTagCompound();
|
||||
tag.setBoolean("isActive", !(tag.getBoolean("isActive")));
|
||||
|
||||
if (tag.getBoolean("isActive") && EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed()))
|
||||
|
@ -134,25 +134,25 @@ public class SigilOfElementalAffinity extends EnergyItems
|
|||
|
||||
EntityPlayer par3EntityPlayer = (EntityPlayer) par3Entity;
|
||||
|
||||
if (par1ItemStack.stackTagCompound == null)
|
||||
if (par1ItemStack.getTagCompound() == null)
|
||||
{
|
||||
par1ItemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
if (par1ItemStack.stackTagCompound.getBoolean("isActive"))
|
||||
if (par1ItemStack.getTagCompound().getBoolean("isActive"))
|
||||
{
|
||||
par3EntityPlayer.fallDistance = 0;
|
||||
par3EntityPlayer.addPotionEffect(new PotionEffect(Potion.waterBreathing.id, 2, 0, true));
|
||||
par3EntityPlayer.addPotionEffect(new PotionEffect(Potion.fireResistance.id, 2, 0, true));
|
||||
}
|
||||
|
||||
if (par2World.getWorldTime() % 200 == par1ItemStack.stackTagCompound.getInteger("worldTimeDelay") && par1ItemStack.stackTagCompound.getBoolean("isActive"))
|
||||
if (par2World.getWorldTime() % 200 == par1ItemStack.getTagCompound().getInteger("worldTimeDelay") && par1ItemStack.getTagCompound().getBoolean("isActive"))
|
||||
{
|
||||
if (!par3EntityPlayer.capabilities.isCreativeMode)
|
||||
{
|
||||
if (!EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed()))
|
||||
{
|
||||
par1ItemStack.stackTagCompound.setBoolean("isActive", false);
|
||||
par1ItemStack.getTagCompound().setBoolean("isActive", false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -41,9 +41,9 @@ public class SigilOfGrowth extends EnergyItems implements ArmourUpgrade
|
|||
par3List.add("Who needs a green thumb when");
|
||||
par3List.add("you have a green slate?");
|
||||
|
||||
if (!(par1ItemStack.stackTagCompound == null))
|
||||
if (!(par1ItemStack.getTagCompound() == null))
|
||||
{
|
||||
if (par1ItemStack.stackTagCompound.getBoolean("isActive"))
|
||||
if (par1ItemStack.getTagCompound().getBoolean("isActive"))
|
||||
{
|
||||
par3List.add("Activated");
|
||||
} else
|
||||
|
@ -51,7 +51,7 @@ public class SigilOfGrowth extends EnergyItems implements ArmourUpgrade
|
|||
par3List.add("Deactivated");
|
||||
}
|
||||
|
||||
par3List.add("Current owner: " + par1ItemStack.stackTagCompound.getString("ownerName"));
|
||||
par3List.add("Current owner: " + par1ItemStack.getTagCompound().getString("ownerName"));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -67,12 +67,12 @@ public class SigilOfGrowth extends EnergyItems implements ArmourUpgrade
|
|||
@Override
|
||||
public IIcon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining)
|
||||
{
|
||||
if (stack.stackTagCompound == null)
|
||||
if (stack.getTagCompound() == null)
|
||||
{
|
||||
stack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
NBTTagCompound tag = stack.stackTagCompound;
|
||||
NBTTagCompound tag = stack.getTagCompound();
|
||||
|
||||
if (tag.getBoolean("isActive"))
|
||||
{
|
||||
|
@ -132,12 +132,12 @@ public class SigilOfGrowth extends EnergyItems implements ArmourUpgrade
|
|||
return par1ItemStack;
|
||||
}
|
||||
|
||||
if (par1ItemStack.stackTagCompound == null)
|
||||
if (par1ItemStack.getTagCompound() == null)
|
||||
{
|
||||
par1ItemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
NBTTagCompound tag = par1ItemStack.stackTagCompound;
|
||||
NBTTagCompound tag = par1ItemStack.getTagCompound();
|
||||
tag.setBoolean("isActive", !(tag.getBoolean("isActive")));
|
||||
|
||||
if (tag.getBoolean("isActive") && EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed()))
|
||||
|
@ -161,18 +161,18 @@ public class SigilOfGrowth extends EnergyItems implements ArmourUpgrade
|
|||
}
|
||||
|
||||
EntityPlayer par3EntityPlayer = (EntityPlayer) par3Entity;
|
||||
if (par1ItemStack.stackTagCompound == null)
|
||||
if (par1ItemStack.getTagCompound() == null)
|
||||
{
|
||||
par1ItemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
if (par1ItemStack.stackTagCompound.getBoolean("isActive"))
|
||||
if (par1ItemStack.getTagCompound().getBoolean("isActive"))
|
||||
{
|
||||
if (par2World.getWorldTime() % tickDelay == par1ItemStack.stackTagCompound.getInteger("worldTimeDelay") && par3Entity instanceof EntityPlayer)
|
||||
if (par2World.getWorldTime() % tickDelay == par1ItemStack.getTagCompound().getInteger("worldTimeDelay") && par3Entity instanceof EntityPlayer)
|
||||
{
|
||||
if(!EnergyItems.syphonBatteries(par1ItemStack, (EntityPlayer) par3Entity, getEnergyUsed()))
|
||||
{
|
||||
par1ItemStack.stackTagCompound.setBoolean("isActive", false);
|
||||
par1ItemStack.getTagCompound().setBoolean("isActive", false);
|
||||
}
|
||||
}
|
||||
int range = 3;
|
||||
|
|
|
@ -36,9 +36,9 @@ public class SigilOfHaste extends EnergyItems implements ArmourUpgrade
|
|||
{
|
||||
par3List.add("One dose of caffeine later...");
|
||||
|
||||
if (!(par1ItemStack.stackTagCompound == null))
|
||||
if (!(par1ItemStack.getTagCompound() == null))
|
||||
{
|
||||
if (par1ItemStack.stackTagCompound.getBoolean("isActive"))
|
||||
if (par1ItemStack.getTagCompound().getBoolean("isActive"))
|
||||
{
|
||||
par3List.add("Activated");
|
||||
} else
|
||||
|
@ -46,7 +46,7 @@ public class SigilOfHaste extends EnergyItems implements ArmourUpgrade
|
|||
par3List.add("Deactivated");
|
||||
}
|
||||
|
||||
par3List.add("Current owner: " + par1ItemStack.stackTagCompound.getString("ownerName"));
|
||||
par3List.add("Current owner: " + par1ItemStack.getTagCompound().getString("ownerName"));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -62,12 +62,12 @@ public class SigilOfHaste extends EnergyItems implements ArmourUpgrade
|
|||
@Override
|
||||
public IIcon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining)
|
||||
{
|
||||
if (stack.stackTagCompound == null)
|
||||
if (stack.getTagCompound() == null)
|
||||
{
|
||||
stack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
NBTTagCompound tag = stack.stackTagCompound;
|
||||
NBTTagCompound tag = stack.getTagCompound();
|
||||
|
||||
if (tag.getBoolean("isActive"))
|
||||
{
|
||||
|
@ -101,12 +101,12 @@ public class SigilOfHaste extends EnergyItems implements ArmourUpgrade
|
|||
return par1ItemStack;
|
||||
}
|
||||
|
||||
if (par1ItemStack.stackTagCompound == null)
|
||||
if (par1ItemStack.getTagCompound() == null)
|
||||
{
|
||||
par1ItemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
NBTTagCompound tag = par1ItemStack.stackTagCompound;
|
||||
NBTTagCompound tag = par1ItemStack.getTagCompound();
|
||||
tag.setBoolean("isActive", !(tag.getBoolean("isActive")));
|
||||
|
||||
if (tag.getBoolean("isActive") && EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed()))
|
||||
|
@ -132,23 +132,23 @@ public class SigilOfHaste extends EnergyItems implements ArmourUpgrade
|
|||
|
||||
EntityPlayer par3EntityPlayer = (EntityPlayer) par3Entity;
|
||||
|
||||
if (par1ItemStack.stackTagCompound == null)
|
||||
if (par1ItemStack.getTagCompound() == null)
|
||||
{
|
||||
par1ItemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
if (par1ItemStack.stackTagCompound.getBoolean("isActive"))
|
||||
if (par1ItemStack.getTagCompound().getBoolean("isActive"))
|
||||
{
|
||||
par3EntityPlayer.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionBoost.id, 3, 1));
|
||||
}
|
||||
|
||||
if (par2World.getWorldTime() % 200 == par1ItemStack.stackTagCompound.getInteger("worldTimeDelay") && par1ItemStack.stackTagCompound.getBoolean("isActive"))
|
||||
if (par2World.getWorldTime() % 200 == par1ItemStack.getTagCompound().getInteger("worldTimeDelay") && par1ItemStack.getTagCompound().getBoolean("isActive"))
|
||||
{
|
||||
if (!par3EntityPlayer.capabilities.isCreativeMode)
|
||||
{
|
||||
if (!EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed()))
|
||||
{
|
||||
par1ItemStack.stackTagCompound.setBoolean("isActive", false);
|
||||
par1ItemStack.getTagCompound().setBoolean("isActive", false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -159,7 +159,7 @@ public class SigilOfHaste extends EnergyItems implements ArmourUpgrade
|
|||
@Override
|
||||
public void onArmourUpdate(World world, EntityPlayer player, ItemStack itemStack)
|
||||
{
|
||||
if (itemStack.stackTagCompound == null)
|
||||
if (itemStack.getTagCompound() == null)
|
||||
{
|
||||
itemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@ public class SigilOfHolding extends EnergyItems
|
|||
@Override
|
||||
public IIcon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining)
|
||||
{
|
||||
if (!(stack.stackTagCompound == null))
|
||||
if (!(stack.getTagCompound() == null))
|
||||
{
|
||||
ItemStack[] inv = getInternalInventory(stack);
|
||||
|
||||
|
@ -52,7 +52,7 @@ public class SigilOfHolding extends EnergyItems
|
|||
return this.itemIcon;
|
||||
}
|
||||
|
||||
ItemStack item = inv[stack.stackTagCompound.getInteger("selectedSlot")];
|
||||
ItemStack item = inv[stack.getTagCompound().getInteger("selectedSlot")];
|
||||
|
||||
if (item != null)
|
||||
{
|
||||
|
@ -68,9 +68,9 @@ public class SigilOfHolding extends EnergyItems
|
|||
{
|
||||
par3List.add("Used to hold several Sigils!");
|
||||
|
||||
if (!(par1ItemStack.stackTagCompound == null))
|
||||
if (!(par1ItemStack.getTagCompound() == null))
|
||||
{
|
||||
par3List.add("Current owner: " + par1ItemStack.stackTagCompound.getString("ownerName"));
|
||||
par3List.add("Current owner: " + par1ItemStack.getTagCompound().getString("ownerName"));
|
||||
ItemStack[] inv = getInternalInventory(par1ItemStack);
|
||||
|
||||
if (inv == null)
|
||||
|
@ -78,7 +78,7 @@ public class SigilOfHolding extends EnergyItems
|
|||
return;
|
||||
}
|
||||
|
||||
ItemStack item = inv[par1ItemStack.stackTagCompound.getInteger("selectedSlot")];
|
||||
ItemStack item = inv[par1ItemStack.getTagCompound().getInteger("selectedSlot")];
|
||||
|
||||
if (item != null)
|
||||
{
|
||||
|
@ -135,7 +135,7 @@ public class SigilOfHolding extends EnergyItems
|
|||
@Override
|
||||
public void onUpdate(ItemStack par1ItemStack, World par2World, Entity par3Entity, int par4, boolean par5)
|
||||
{
|
||||
if (!(par1ItemStack.stackTagCompound == null))
|
||||
if (!(par1ItemStack.getTagCompound() == null))
|
||||
{
|
||||
this.tickInternalInventory(par1ItemStack, par2World, par3Entity, par4, par5);
|
||||
}
|
||||
|
@ -143,7 +143,7 @@ public class SigilOfHolding extends EnergyItems
|
|||
|
||||
public ItemStack[] getInternalInventory(ItemStack itemStack)
|
||||
{
|
||||
NBTTagCompound itemTag = itemStack.stackTagCompound;
|
||||
NBTTagCompound itemTag = itemStack.getTagCompound();
|
||||
|
||||
if (itemTag == null)
|
||||
{
|
||||
|
@ -175,7 +175,7 @@ public class SigilOfHolding extends EnergyItems
|
|||
|
||||
public void saveInternalInventory(ItemStack itemStack, ItemStack[] inventory)
|
||||
{
|
||||
NBTTagCompound itemTag = itemStack.stackTagCompound;
|
||||
NBTTagCompound itemTag = itemStack.getTagCompound();
|
||||
|
||||
if (itemTag == null)
|
||||
{
|
||||
|
@ -222,7 +222,7 @@ public class SigilOfHolding extends EnergyItems
|
|||
|
||||
public int getSelectedSlot(ItemStack itemStack)
|
||||
{
|
||||
NBTTagCompound itemTag = itemStack.stackTagCompound;
|
||||
NBTTagCompound itemTag = itemStack.getTagCompound();
|
||||
|
||||
if (itemTag == null)
|
||||
{
|
||||
|
@ -248,7 +248,7 @@ public class SigilOfHolding extends EnergyItems
|
|||
}
|
||||
}
|
||||
|
||||
NBTTagCompound itemTag = itemStack.stackTagCompound;
|
||||
NBTTagCompound itemTag = itemStack.getTagCompound();
|
||||
|
||||
if (itemTag == null)
|
||||
{
|
||||
|
|
|
@ -37,9 +37,9 @@ public class SigilOfMagnetism extends EnergyItems implements ArmourUpgrade, IHol
|
|||
{
|
||||
par3List.add("I have a very magnetic personality!");
|
||||
|
||||
if (!(par1ItemStack.stackTagCompound == null))
|
||||
if (!(par1ItemStack.getTagCompound() == null))
|
||||
{
|
||||
if (par1ItemStack.stackTagCompound.getBoolean("isActive"))
|
||||
if (par1ItemStack.getTagCompound().getBoolean("isActive"))
|
||||
{
|
||||
par3List.add("Activated");
|
||||
} else
|
||||
|
@ -47,7 +47,7 @@ public class SigilOfMagnetism extends EnergyItems implements ArmourUpgrade, IHol
|
|||
par3List.add("Deactivated");
|
||||
}
|
||||
|
||||
par3List.add("Current owner: " + par1ItemStack.stackTagCompound.getString("ownerName"));
|
||||
par3List.add("Current owner: " + par1ItemStack.getTagCompound().getString("ownerName"));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -63,12 +63,12 @@ public class SigilOfMagnetism extends EnergyItems implements ArmourUpgrade, IHol
|
|||
@Override
|
||||
public IIcon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining)
|
||||
{
|
||||
if (stack.stackTagCompound == null)
|
||||
if (stack.getTagCompound() == null)
|
||||
{
|
||||
stack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
NBTTagCompound tag = stack.stackTagCompound;
|
||||
NBTTagCompound tag = stack.getTagCompound();
|
||||
|
||||
if (tag.getBoolean("isActive"))
|
||||
{
|
||||
|
@ -102,12 +102,12 @@ public class SigilOfMagnetism extends EnergyItems implements ArmourUpgrade, IHol
|
|||
return par1ItemStack;
|
||||
}
|
||||
|
||||
if (par1ItemStack.stackTagCompound == null)
|
||||
if (par1ItemStack.getTagCompound() == null)
|
||||
{
|
||||
par1ItemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
NBTTagCompound tag = par1ItemStack.stackTagCompound;
|
||||
NBTTagCompound tag = par1ItemStack.getTagCompound();
|
||||
tag.setBoolean("isActive", !(tag.getBoolean("isActive")));
|
||||
|
||||
if (tag.getBoolean("isActive") && EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed()))
|
||||
|
@ -132,18 +132,18 @@ public class SigilOfMagnetism extends EnergyItems implements ArmourUpgrade, IHol
|
|||
|
||||
EntityPlayer par3EntityPlayer = (EntityPlayer) par3Entity;
|
||||
|
||||
if (par1ItemStack.stackTagCompound == null)
|
||||
if (par1ItemStack.getTagCompound() == null)
|
||||
{
|
||||
par1ItemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
if (par1ItemStack.stackTagCompound.getBoolean("isActive"))
|
||||
if (par1ItemStack.getTagCompound().getBoolean("isActive"))
|
||||
{
|
||||
if (par2World.getWorldTime() % tickDelay == par1ItemStack.stackTagCompound.getInteger("worldTimeDelay") && par3Entity instanceof EntityPlayer)
|
||||
if (par2World.getWorldTime() % tickDelay == par1ItemStack.getTagCompound().getInteger("worldTimeDelay") && par3Entity instanceof EntityPlayer)
|
||||
{
|
||||
if(!EnergyItems.syphonBatteries(par1ItemStack, (EntityPlayer) par3Entity, getEnergyUsed()))
|
||||
{
|
||||
par1ItemStack.stackTagCompound.setBoolean("isActive", false);
|
||||
par1ItemStack.getTagCompound().setBoolean("isActive", false);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -39,9 +39,9 @@ public class SigilOfTheBridge extends EnergyItems implements ArmourUpgrade
|
|||
par3List.add("Activate to create a bridge");
|
||||
par3List.add("beneath your feet.");
|
||||
|
||||
if (!(par1ItemStack.stackTagCompound == null))
|
||||
if (!(par1ItemStack.getTagCompound() == null))
|
||||
{
|
||||
if (par1ItemStack.stackTagCompound.getBoolean("isActive"))
|
||||
if (par1ItemStack.getTagCompound().getBoolean("isActive"))
|
||||
{
|
||||
par3List.add("Activated");
|
||||
} else
|
||||
|
@ -49,7 +49,7 @@ public class SigilOfTheBridge extends EnergyItems implements ArmourUpgrade
|
|||
par3List.add("Deactivated");
|
||||
}
|
||||
|
||||
par3List.add("Current owner: " + par1ItemStack.stackTagCompound.getString("ownerName"));
|
||||
par3List.add("Current owner: " + par1ItemStack.getTagCompound().getString("ownerName"));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -65,12 +65,12 @@ public class SigilOfTheBridge extends EnergyItems implements ArmourUpgrade
|
|||
@Override
|
||||
public IIcon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining)
|
||||
{
|
||||
if (stack.stackTagCompound == null)
|
||||
if (stack.getTagCompound() == null)
|
||||
{
|
||||
stack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
NBTTagCompound tag = stack.stackTagCompound;
|
||||
NBTTagCompound tag = stack.getTagCompound();
|
||||
|
||||
if (tag.getBoolean("isActive"))
|
||||
{
|
||||
|
@ -104,12 +104,12 @@ public class SigilOfTheBridge extends EnergyItems implements ArmourUpgrade
|
|||
return par1ItemStack;
|
||||
}
|
||||
|
||||
if (par1ItemStack.stackTagCompound == null)
|
||||
if (par1ItemStack.getTagCompound() == null)
|
||||
{
|
||||
par1ItemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
NBTTagCompound tag = par1ItemStack.stackTagCompound;
|
||||
NBTTagCompound tag = par1ItemStack.getTagCompound();
|
||||
tag.setBoolean("isActive", !(tag.getBoolean("isActive")));
|
||||
|
||||
if (tag.getBoolean("isActive") && EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed()))
|
||||
|
@ -134,21 +134,21 @@ public class SigilOfTheBridge extends EnergyItems implements ArmourUpgrade
|
|||
|
||||
EntityPlayer par3EntityPlayer = (EntityPlayer) par3Entity;
|
||||
|
||||
if (par1ItemStack.stackTagCompound == null)
|
||||
if (par1ItemStack.getTagCompound() == null)
|
||||
{
|
||||
par1ItemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
if (par1ItemStack.stackTagCompound.getBoolean("isActive"))
|
||||
if (par1ItemStack.getTagCompound().getBoolean("isActive"))
|
||||
{
|
||||
if (par2World.getWorldTime() % tickDelay == par1ItemStack.stackTagCompound.getInteger("worldTimeDelay") && par3Entity instanceof EntityPlayer)
|
||||
if (par2World.getWorldTime() % tickDelay == par1ItemStack.getTagCompound().getInteger("worldTimeDelay") && par3Entity instanceof EntityPlayer)
|
||||
{
|
||||
if(EnergyItems.syphonBatteries(par1ItemStack, (EntityPlayer) par3Entity, this.getLPUsed(par1ItemStack)))
|
||||
{
|
||||
this.setLPUsed(par1ItemStack, 0);
|
||||
}else
|
||||
{
|
||||
par1ItemStack.stackTagCompound.setBoolean("isActive", false);
|
||||
par1ItemStack.getTagCompound().setBoolean("isActive", false);
|
||||
}
|
||||
}
|
||||
if (!par3EntityPlayer.onGround && !par3EntityPlayer.isSneaking())
|
||||
|
@ -215,32 +215,32 @@ public class SigilOfTheBridge extends EnergyItems implements ArmourUpgrade
|
|||
|
||||
public int getLPUsed(ItemStack par1ItemStack)
|
||||
{
|
||||
if (par1ItemStack.stackTagCompound == null)
|
||||
if (par1ItemStack.getTagCompound() == null)
|
||||
{
|
||||
par1ItemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
return par1ItemStack.stackTagCompound.getInteger("LPUsed");
|
||||
return par1ItemStack.getTagCompound().getInteger("LPUsed");
|
||||
}
|
||||
|
||||
public void incrimentLPUSed(ItemStack par1ItemStack, int addedLP)
|
||||
{
|
||||
if (par1ItemStack.stackTagCompound == null)
|
||||
if (par1ItemStack.getTagCompound() == null)
|
||||
{
|
||||
par1ItemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
par1ItemStack.stackTagCompound.setInteger("LPUsed", par1ItemStack.stackTagCompound.getInteger("LPUsed") + addedLP);
|
||||
par1ItemStack.getTagCompound().setInteger("LPUsed", par1ItemStack.getTagCompound().getInteger("LPUsed") + addedLP);
|
||||
}
|
||||
|
||||
public void setLPUsed(ItemStack par1ItemStack, int newLP)
|
||||
{
|
||||
if (par1ItemStack.stackTagCompound == null)
|
||||
if (par1ItemStack.getTagCompound() == null)
|
||||
{
|
||||
par1ItemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
par1ItemStack.stackTagCompound.setInteger("LPUsed", newLP);
|
||||
par1ItemStack.getTagCompound().setInteger("LPUsed", newLP);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -37,9 +37,9 @@ public class SigilOfTheFastMiner extends EnergyItems implements ArmourUpgrade
|
|||
{
|
||||
par3List.add("Keep going and going and going...");
|
||||
|
||||
if (!(par1ItemStack.stackTagCompound == null))
|
||||
if (!(par1ItemStack.getTagCompound() == null))
|
||||
{
|
||||
if (par1ItemStack.stackTagCompound.getBoolean("isActive"))
|
||||
if (par1ItemStack.getTagCompound().getBoolean("isActive"))
|
||||
{
|
||||
par3List.add("Activated");
|
||||
} else
|
||||
|
@ -47,7 +47,7 @@ public class SigilOfTheFastMiner extends EnergyItems implements ArmourUpgrade
|
|||
par3List.add("Deactivated");
|
||||
}
|
||||
|
||||
par3List.add("Current owner: " + par1ItemStack.stackTagCompound.getString("ownerName"));
|
||||
par3List.add("Current owner: " + par1ItemStack.getTagCompound().getString("ownerName"));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -63,12 +63,12 @@ public class SigilOfTheFastMiner extends EnergyItems implements ArmourUpgrade
|
|||
@Override
|
||||
public IIcon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining)
|
||||
{
|
||||
if (stack.stackTagCompound == null)
|
||||
if (stack.getTagCompound() == null)
|
||||
{
|
||||
stack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
NBTTagCompound tag = stack.stackTagCompound;
|
||||
NBTTagCompound tag = stack.getTagCompound();
|
||||
|
||||
if (tag.getBoolean("isActive"))
|
||||
{
|
||||
|
@ -102,12 +102,12 @@ public class SigilOfTheFastMiner extends EnergyItems implements ArmourUpgrade
|
|||
return par1ItemStack;
|
||||
}
|
||||
|
||||
if (par1ItemStack.stackTagCompound == null)
|
||||
if (par1ItemStack.getTagCompound() == null)
|
||||
{
|
||||
par1ItemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
NBTTagCompound tag = par1ItemStack.stackTagCompound;
|
||||
NBTTagCompound tag = par1ItemStack.getTagCompound();
|
||||
tag.setBoolean("isActive", !(tag.getBoolean("isActive")));
|
||||
|
||||
if (tag.getBoolean("isActive") && EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed()))
|
||||
|
@ -133,23 +133,23 @@ public class SigilOfTheFastMiner extends EnergyItems implements ArmourUpgrade
|
|||
|
||||
EntityPlayer par3EntityPlayer = (EntityPlayer) par3Entity;
|
||||
|
||||
if (par1ItemStack.stackTagCompound == null)
|
||||
if (par1ItemStack.getTagCompound() == null)
|
||||
{
|
||||
par1ItemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
if (par1ItemStack.stackTagCompound.getBoolean("isActive"))
|
||||
if (par1ItemStack.getTagCompound().getBoolean("isActive"))
|
||||
{
|
||||
par3EntityPlayer.addPotionEffect(new PotionEffect(Potion.digSpeed.id, 2, 1, true));
|
||||
}
|
||||
|
||||
if (par2World.getWorldTime() % 200 == par1ItemStack.stackTagCompound.getInteger("worldTimeDelay") && par1ItemStack.stackTagCompound.getBoolean("isActive"))
|
||||
if (par2World.getWorldTime() % 200 == par1ItemStack.getTagCompound().getInteger("worldTimeDelay") && par1ItemStack.getTagCompound().getBoolean("isActive"))
|
||||
{
|
||||
if (!par3EntityPlayer.capabilities.isCreativeMode)
|
||||
{
|
||||
if (!EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed()))
|
||||
{
|
||||
par1ItemStack.stackTagCompound.setBoolean("isActive", false);
|
||||
par1ItemStack.getTagCompound().setBoolean("isActive", false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -160,7 +160,7 @@ public class SigilOfTheFastMiner extends EnergyItems implements ArmourUpgrade
|
|||
@Override
|
||||
public void onArmourUpdate(World world, EntityPlayer player, ItemStack itemStack)
|
||||
{
|
||||
if (itemStack.stackTagCompound == null)
|
||||
if (itemStack.getTagCompound() == null)
|
||||
{
|
||||
itemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
|
|
@ -36,9 +36,9 @@ public class SigilOfWind extends EnergyItems implements ArmourUpgrade
|
|||
{
|
||||
par3List.add("Best not to wear a skirt.");
|
||||
|
||||
if (!(par1ItemStack.stackTagCompound == null))
|
||||
if (!(par1ItemStack.getTagCompound() == null))
|
||||
{
|
||||
if (par1ItemStack.stackTagCompound.getBoolean("isActive"))
|
||||
if (par1ItemStack.getTagCompound().getBoolean("isActive"))
|
||||
{
|
||||
par3List.add("Activated");
|
||||
} else
|
||||
|
@ -46,7 +46,7 @@ public class SigilOfWind extends EnergyItems implements ArmourUpgrade
|
|||
par3List.add("Deactivated");
|
||||
}
|
||||
|
||||
par3List.add("Current owner: " + par1ItemStack.stackTagCompound.getString("ownerName"));
|
||||
par3List.add("Current owner: " + par1ItemStack.getTagCompound().getString("ownerName"));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -62,12 +62,12 @@ public class SigilOfWind extends EnergyItems implements ArmourUpgrade
|
|||
@Override
|
||||
public IIcon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining)
|
||||
{
|
||||
if (stack.stackTagCompound == null)
|
||||
if (stack.getTagCompound() == null)
|
||||
{
|
||||
stack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
NBTTagCompound tag = stack.stackTagCompound;
|
||||
NBTTagCompound tag = stack.getTagCompound();
|
||||
|
||||
if (tag.getBoolean("isActive"))
|
||||
{
|
||||
|
@ -101,12 +101,12 @@ public class SigilOfWind extends EnergyItems implements ArmourUpgrade
|
|||
return par1ItemStack;
|
||||
}
|
||||
|
||||
if (par1ItemStack.stackTagCompound == null)
|
||||
if (par1ItemStack.getTagCompound() == null)
|
||||
{
|
||||
par1ItemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
NBTTagCompound tag = par1ItemStack.stackTagCompound;
|
||||
NBTTagCompound tag = par1ItemStack.getTagCompound();
|
||||
tag.setBoolean("isActive", !(tag.getBoolean("isActive")));
|
||||
|
||||
if (tag.getBoolean("isActive") && EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed()))
|
||||
|
@ -132,23 +132,23 @@ public class SigilOfWind extends EnergyItems implements ArmourUpgrade
|
|||
|
||||
EntityPlayer par3EntityPlayer = (EntityPlayer) par3Entity;
|
||||
|
||||
if (par1ItemStack.stackTagCompound == null)
|
||||
if (par1ItemStack.getTagCompound() == null)
|
||||
{
|
||||
par1ItemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
if (par1ItemStack.stackTagCompound.getBoolean("isActive"))
|
||||
if (par1ItemStack.getTagCompound().getBoolean("isActive"))
|
||||
{
|
||||
par3EntityPlayer.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionProjProt.id, 2, 1));
|
||||
}
|
||||
|
||||
if (par2World.getWorldTime() % 200 == par1ItemStack.stackTagCompound.getInteger("worldTimeDelay") && par1ItemStack.stackTagCompound.getBoolean("isActive"))
|
||||
if (par2World.getWorldTime() % 200 == par1ItemStack.getTagCompound().getInteger("worldTimeDelay") && par1ItemStack.getTagCompound().getBoolean("isActive"))
|
||||
{
|
||||
if (!par3EntityPlayer.capabilities.isCreativeMode)
|
||||
{
|
||||
if (!EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed()))
|
||||
{
|
||||
par1ItemStack.stackTagCompound.setBoolean("isActive", false);
|
||||
par1ItemStack.getTagCompound().setBoolean("isActive", false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -159,7 +159,7 @@ public class SigilOfWind extends EnergyItems implements ArmourUpgrade
|
|||
@Override
|
||||
public void onArmourUpdate(World world, EntityPlayer player, ItemStack itemStack)
|
||||
{
|
||||
if (itemStack.stackTagCompound == null)
|
||||
if (itemStack.getTagCompound() == null)
|
||||
{
|
||||
itemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
|
|
@ -47,9 +47,9 @@ public class VoidSigil extends ItemBucket implements ArmourUpgrade
|
|||
{
|
||||
par3List.add("Better than a Swiffer!");
|
||||
|
||||
if (!(par1ItemStack.stackTagCompound == null))
|
||||
if (!(par1ItemStack.getTagCompound() == null))
|
||||
{
|
||||
par3List.add("Current owner: " + par1ItemStack.stackTagCompound.getString("ownerName"));
|
||||
par3List.add("Current owner: " + par1ItemStack.getTagCompound().getString("ownerName"));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ public class WaterSigil extends ItemBucket implements ArmourUpgrade
|
|||
@Override
|
||||
public void onCreated(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)
|
||||
{
|
||||
if (par1ItemStack.stackTagCompound == null)
|
||||
if (par1ItemStack.getTagCompound() == null)
|
||||
{
|
||||
par1ItemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
@ -67,9 +67,9 @@ public class WaterSigil extends ItemBucket implements ArmourUpgrade
|
|||
{
|
||||
par3List.add("Infinite water, anyone?");
|
||||
|
||||
if (!(par1ItemStack.stackTagCompound == null))
|
||||
if (!(par1ItemStack.getTagCompound() == null))
|
||||
{
|
||||
par3List.add("Current owner: " + par1ItemStack.stackTagCompound.getString("ownerName"));
|
||||
par3List.add("Current owner: " + par1ItemStack.getTagCompound().getString("ownerName"));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue