Refactoring
This commit is contained in:
parent
fd330233dd
commit
56ccd3188d
76 changed files with 876 additions and 433 deletions
|
@ -92,9 +92,9 @@ public class ActivationCrystal extends EnergyItems
|
|||
}
|
||||
}
|
||||
|
||||
if (!(par1ItemStack.stackTagCompound == null))
|
||||
if (!(par1ItemStack.getTagCompound() == null))
|
||||
{
|
||||
par3List.add("Current owner: " + par1ItemStack.stackTagCompound.getString("ownerName"));
|
||||
par3List.add("Current owner: " + par1ItemStack.getTagCompound().getString("ownerName"));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -34,9 +34,9 @@ public class ArmourInhibitor extends EnergyItems
|
|||
par3List.add("Used to suppress a soul's");
|
||||
par3List.add("unnatural abilities.");
|
||||
|
||||
if (!(par1ItemStack.stackTagCompound == null))
|
||||
if (!(par1ItemStack.getTagCompound() == null))
|
||||
{
|
||||
if (par1ItemStack.stackTagCompound.getBoolean("isActive"))
|
||||
if (par1ItemStack.getTagCompound().getBoolean("isActive"))
|
||||
{
|
||||
par3List.add("Activated");
|
||||
} else
|
||||
|
@ -44,7 +44,7 @@ public class ArmourInhibitor extends EnergyItems
|
|||
par3List.add("Deactivated");
|
||||
}
|
||||
|
||||
par3List.add("Current owner: " + par1ItemStack.stackTagCompound.getString("ownerName"));
|
||||
par3List.add("Current owner: " + par1ItemStack.getTagCompound().getString("ownerName"));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -60,12 +60,12 @@ public class ArmourInhibitor 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"))
|
||||
{
|
||||
|
@ -99,12 +99,12 @@ public class ArmourInhibitor 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"))
|
||||
|
@ -133,14 +133,14 @@ public class ArmourInhibitor 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"))
|
||||
{
|
||||
if (par2World.getWorldTime() % tickDelay == par1ItemStack.stackTagCompound.getInteger("worldTimeDelay") && par3Entity instanceof EntityPlayer)
|
||||
if (par2World.getWorldTime() % tickDelay == par1ItemStack.getTagCompound().getInteger("worldTimeDelay") && par3Entity instanceof EntityPlayer)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -35,13 +35,13 @@ public class BlankSpell extends EnergyItems
|
|||
{
|
||||
par3List.add("Crystal of infinite possibilities.");
|
||||
|
||||
if (!(par1ItemStack.stackTagCompound == null))
|
||||
if (!(par1ItemStack.getTagCompound() == null))
|
||||
{
|
||||
NBTTagCompound itemTag = par1ItemStack.stackTagCompound;
|
||||
NBTTagCompound itemTag = par1ItemStack.getTagCompound();
|
||||
|
||||
if (!par1ItemStack.stackTagCompound.getString("ownerName").equals(""))
|
||||
if (!par1ItemStack.getTagCompound().getString("ownerName").equals(""))
|
||||
{
|
||||
par3List.add("Current owner: " + par1ItemStack.stackTagCompound.getString("ownerName"));
|
||||
par3List.add("Current owner: " + par1ItemStack.getTagCompound().getString("ownerName"));
|
||||
}
|
||||
|
||||
par3List.add("Coords: " + itemTag.getInteger("xCoord") + ", " + itemTag.getInteger("yCoord") + ", " + itemTag.getInteger("zCoord"));
|
||||
|
@ -65,7 +65,7 @@ public class BlankSpell extends EnergyItems
|
|||
|
||||
if (world != null)
|
||||
{
|
||||
NBTTagCompound itemTag = par1ItemStack.stackTagCompound;
|
||||
NBTTagCompound itemTag = par1ItemStack.getTagCompound();
|
||||
TileEntity tileEntity = world.getTileEntity(itemTag.getInteger("xCoord"), itemTag.getInteger("yCoord"), itemTag.getInteger("zCoord"));
|
||||
|
||||
if (tileEntity instanceof TEHomHeart)
|
||||
|
@ -100,11 +100,11 @@ public class BlankSpell extends EnergyItems
|
|||
|
||||
public int getDimensionID(ItemStack itemStack)
|
||||
{
|
||||
if (itemStack.stackTagCompound == null)
|
||||
if (itemStack.getTagCompound() == null)
|
||||
{
|
||||
itemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
return itemStack.stackTagCompound.getInteger("dimensionId");
|
||||
return itemStack.getTagCompound().getInteger("dimensionId");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -57,9 +57,9 @@ public class BoundAxe extends ItemAxe implements IBindable
|
|||
{
|
||||
par3List.add("Axe me about my puns!");
|
||||
|
||||
if (!(par1ItemStack.stackTagCompound == null))
|
||||
if (!(par1ItemStack.getTagCompound() == null))
|
||||
{
|
||||
if (par1ItemStack.stackTagCompound.getBoolean("isActive"))
|
||||
if (par1ItemStack.getTagCompound().getBoolean("isActive"))
|
||||
{
|
||||
par3List.add("Activated");
|
||||
} else
|
||||
|
@ -67,9 +67,9 @@ public class BoundAxe extends ItemAxe implements IBindable
|
|||
par3List.add("Deactivated");
|
||||
}
|
||||
|
||||
if (!par1ItemStack.stackTagCompound.getString("ownerName").equals(""))
|
||||
if (!par1ItemStack.getTagCompound().getString("ownerName").equals(""))
|
||||
{
|
||||
par3List.add("Current owner: " + par1ItemStack.stackTagCompound.getString("ownerName"));
|
||||
par3List.add("Current owner: " + par1ItemStack.getTagCompound().getString("ownerName"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -86,12 +86,12 @@ public class BoundAxe extends ItemAxe implements IBindable
|
|||
@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"))
|
||||
{
|
||||
|
@ -110,7 +110,7 @@ public class BoundAxe extends ItemAxe implements IBindable
|
|||
if (par3EntityPlayer.isSneaking())
|
||||
{
|
||||
this.setActivated(par1ItemStack, !getActivated(par1ItemStack));
|
||||
par1ItemStack.stackTagCompound.setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % 200);
|
||||
par1ItemStack.getTagCompound().setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % 200);
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
|
@ -195,11 +195,11 @@ public class BoundAxe extends ItemAxe implements IBindable
|
|||
|
||||
EntityPlayer par3EntityPlayer = (EntityPlayer) par3Entity;
|
||||
|
||||
if (par1ItemStack.stackTagCompound == null)
|
||||
if (par1ItemStack.getTagCompound() == null)
|
||||
{
|
||||
par1ItemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
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)
|
||||
{
|
||||
|
@ -216,7 +216,7 @@ public class BoundAxe extends ItemAxe implements IBindable
|
|||
|
||||
public void setActivated(ItemStack par1ItemStack, boolean newActivated)
|
||||
{
|
||||
NBTTagCompound itemTag = par1ItemStack.stackTagCompound;
|
||||
NBTTagCompound itemTag = par1ItemStack.getTagCompound();
|
||||
|
||||
if (itemTag == null)
|
||||
{
|
||||
|
@ -228,7 +228,7 @@ public class BoundAxe extends ItemAxe implements IBindable
|
|||
|
||||
public boolean getActivated(ItemStack par1ItemStack)
|
||||
{
|
||||
NBTTagCompound itemTag = par1ItemStack.stackTagCompound;
|
||||
NBTTagCompound itemTag = par1ItemStack.getTagCompound();
|
||||
|
||||
if (itemTag == null)
|
||||
{
|
||||
|
|
|
@ -59,9 +59,9 @@ public class BoundPickaxe extends ItemPickaxe implements IBindable
|
|||
par3List.add("The Souls of the Damned");
|
||||
par3List.add("do not like stone...");
|
||||
|
||||
if (!(par1ItemStack.stackTagCompound == null))
|
||||
if (!(par1ItemStack.getTagCompound() == null))
|
||||
{
|
||||
if (par1ItemStack.stackTagCompound.getBoolean("isActive"))
|
||||
if (par1ItemStack.getTagCompound().getBoolean("isActive"))
|
||||
{
|
||||
par3List.add("Activated");
|
||||
} else
|
||||
|
@ -69,9 +69,9 @@ public class BoundPickaxe extends ItemPickaxe implements IBindable
|
|||
par3List.add("Deactivated");
|
||||
}
|
||||
|
||||
if (!par1ItemStack.stackTagCompound.getString("ownerName").equals(""))
|
||||
if (!par1ItemStack.getTagCompound().getString("ownerName").equals(""))
|
||||
{
|
||||
par3List.add("Current owner: " + par1ItemStack.stackTagCompound.getString("ownerName"));
|
||||
par3List.add("Current owner: " + par1ItemStack.getTagCompound().getString("ownerName"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -88,12 +88,12 @@ public class BoundPickaxe extends ItemPickaxe implements IBindable
|
|||
@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"))
|
||||
{
|
||||
|
@ -112,7 +112,7 @@ public class BoundPickaxe extends ItemPickaxe implements IBindable
|
|||
if (par3EntityPlayer.isSneaking())
|
||||
{
|
||||
this.setActivated(par1ItemStack, !getActivated(par1ItemStack));
|
||||
par1ItemStack.stackTagCompound.setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % 200);
|
||||
par1ItemStack.getTagCompound().setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % 200);
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
|
@ -202,12 +202,12 @@ public class BoundPickaxe extends ItemPickaxe implements IBindable
|
|||
|
||||
EntityPlayer par3EntityPlayer = (EntityPlayer) par3Entity;
|
||||
|
||||
if (par1ItemStack.stackTagCompound == null)
|
||||
if (par1ItemStack.getTagCompound() == null)
|
||||
{
|
||||
par1ItemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
|
@ -224,7 +224,7 @@ public class BoundPickaxe extends ItemPickaxe implements IBindable
|
|||
|
||||
public void setActivated(ItemStack par1ItemStack, boolean newActivated)
|
||||
{
|
||||
NBTTagCompound itemTag = par1ItemStack.stackTagCompound;
|
||||
NBTTagCompound itemTag = par1ItemStack.getTagCompound();
|
||||
|
||||
if (itemTag == null)
|
||||
{
|
||||
|
@ -236,7 +236,7 @@ public class BoundPickaxe extends ItemPickaxe implements IBindable
|
|||
|
||||
public boolean getActivated(ItemStack par1ItemStack)
|
||||
{
|
||||
NBTTagCompound itemTag = par1ItemStack.stackTagCompound;
|
||||
NBTTagCompound itemTag = par1ItemStack.getTagCompound();
|
||||
|
||||
if (itemTag == null)
|
||||
{
|
||||
|
|
|
@ -63,9 +63,9 @@ public class BoundShovel extends ItemSpade implements IBindable
|
|||
{
|
||||
par3List.add("No, not that type of spade.");
|
||||
|
||||
if (!(par1ItemStack.stackTagCompound == null))
|
||||
if (!(par1ItemStack.getTagCompound() == null))
|
||||
{
|
||||
if (par1ItemStack.stackTagCompound.getBoolean("isActive"))
|
||||
if (par1ItemStack.getTagCompound().getBoolean("isActive"))
|
||||
{
|
||||
par3List.add("Activated");
|
||||
} else
|
||||
|
@ -73,9 +73,9 @@ public class BoundShovel extends ItemSpade implements IBindable
|
|||
par3List.add("Deactivated");
|
||||
}
|
||||
|
||||
if (!par1ItemStack.stackTagCompound.getString("ownerName").equals(""))
|
||||
if (!par1ItemStack.getTagCompound().getString("ownerName").equals(""))
|
||||
{
|
||||
par3List.add("Current owner: " + par1ItemStack.stackTagCompound.getString("ownerName"));
|
||||
par3List.add("Current owner: " + par1ItemStack.getTagCompound().getString("ownerName"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -92,12 +92,12 @@ public class BoundShovel extends ItemSpade implements IBindable
|
|||
@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"))
|
||||
{
|
||||
|
@ -116,7 +116,7 @@ public class BoundShovel extends ItemSpade implements IBindable
|
|||
if (par3EntityPlayer.isSneaking())
|
||||
{
|
||||
this.setActivated(par1ItemStack, !getActivated(par1ItemStack));
|
||||
par1ItemStack.stackTagCompound.setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % 200);
|
||||
par1ItemStack.getTagCompound().setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % 200);
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
|
@ -201,11 +201,11 @@ public class BoundShovel extends ItemSpade implements IBindable
|
|||
|
||||
EntityPlayer par3EntityPlayer = (EntityPlayer) par3Entity;
|
||||
|
||||
if (par1ItemStack.stackTagCompound == null)
|
||||
if (par1ItemStack.getTagCompound() == null)
|
||||
{
|
||||
par1ItemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
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)
|
||||
{
|
||||
|
@ -222,7 +222,7 @@ public class BoundShovel extends ItemSpade implements IBindable
|
|||
|
||||
public void setActivated(ItemStack par1ItemStack, boolean newActivated)
|
||||
{
|
||||
NBTTagCompound itemTag = par1ItemStack.stackTagCompound;
|
||||
NBTTagCompound itemTag = par1ItemStack.getTagCompound();
|
||||
|
||||
if (itemTag == null)
|
||||
{
|
||||
|
@ -234,7 +234,7 @@ public class BoundShovel extends ItemSpade implements IBindable
|
|||
|
||||
public boolean getActivated(ItemStack par1ItemStack)
|
||||
{
|
||||
NBTTagCompound itemTag = par1ItemStack.stackTagCompound;
|
||||
NBTTagCompound itemTag = par1ItemStack.getTagCompound();
|
||||
|
||||
if (itemTag == null)
|
||||
{
|
||||
|
|
|
@ -42,9 +42,9 @@ public class CheatyItem extends Item implements IBindable
|
|||
par3List.add("Right-click to fill network,");
|
||||
par3List.add("shift-right to empty.");
|
||||
|
||||
if (!(par1ItemStack.stackTagCompound == null))
|
||||
if (!(par1ItemStack.getTagCompound() == null))
|
||||
{
|
||||
par3List.add("Current owner: " + par1ItemStack.stackTagCompound.getString("ownerName"));
|
||||
par3List.add("Current owner: " + par1ItemStack.getTagCompound().getString("ownerName"));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -72,7 +72,7 @@ public class CheatyItem extends Item implements IBindable
|
|||
return par1ItemStack;
|
||||
}
|
||||
|
||||
NBTTagCompound itemTag = par1ItemStack.stackTagCompound;
|
||||
NBTTagCompound itemTag = par1ItemStack.getTagCompound();
|
||||
|
||||
if (itemTag == null || itemTag.getString("ownerName").equals(""))
|
||||
{
|
||||
|
@ -156,7 +156,7 @@ public class CheatyItem extends Item implements IBindable
|
|||
return 0;
|
||||
}
|
||||
|
||||
NBTTagCompound itemTag = par1ItemStack.stackTagCompound;
|
||||
NBTTagCompound itemTag = par1ItemStack.getTagCompound();
|
||||
|
||||
if (itemTag == null || itemTag.getString("ownerName").equals(""))
|
||||
{
|
||||
|
|
|
@ -183,42 +183,42 @@ public class DemonPlacer extends Item
|
|||
|
||||
public static void setOwnerName(ItemStack par1ItemStack, String ownerName)
|
||||
{
|
||||
if (par1ItemStack.stackTagCompound == null)
|
||||
if (par1ItemStack.getTagCompound() == null)
|
||||
{
|
||||
par1ItemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
par1ItemStack.stackTagCompound.setString("ownerName", ownerName);
|
||||
par1ItemStack.getTagCompound().setString("ownerName", ownerName);
|
||||
}
|
||||
|
||||
public static String getOwnerName(ItemStack par1ItemStack)
|
||||
{
|
||||
if (par1ItemStack.stackTagCompound == null)
|
||||
if (par1ItemStack.getTagCompound() == null)
|
||||
{
|
||||
par1ItemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
return par1ItemStack.stackTagCompound.getString("ownerName");
|
||||
return par1ItemStack.getTagCompound().getString("ownerName");
|
||||
}
|
||||
|
||||
public static void setDemonString(ItemStack itemStack, String demonName)
|
||||
{
|
||||
if (itemStack.stackTagCompound == null)
|
||||
if (itemStack.getTagCompound() == null)
|
||||
{
|
||||
itemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
itemStack.stackTagCompound.setString("demonName", demonName);
|
||||
itemStack.getTagCompound().setString("demonName", demonName);
|
||||
}
|
||||
|
||||
public static String getDemonString(ItemStack itemStack)
|
||||
{
|
||||
if (itemStack.stackTagCompound == null)
|
||||
if (itemStack.getTagCompound() == null)
|
||||
{
|
||||
itemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
return itemStack.stackTagCompound.getString("demonName");
|
||||
return itemStack.getTagCompound().getString("demonName");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -226,11 +226,11 @@ public class DemonPlacer extends Item
|
|||
{
|
||||
par3List.add("Used to spawn demons.");
|
||||
|
||||
if (!(par1ItemStack.stackTagCompound == null))
|
||||
if (!(par1ItemStack.getTagCompound() == null))
|
||||
{
|
||||
if (!par1ItemStack.stackTagCompound.getString("ownerName").equals(""))
|
||||
if (!par1ItemStack.getTagCompound().getString("ownerName").equals(""))
|
||||
{
|
||||
par3List.add("Demon's Owner: " + par1ItemStack.stackTagCompound.getString("ownerName"));
|
||||
par3List.add("Demon's Owner: " + par1ItemStack.getTagCompound().getString("ownerName"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,13 +29,13 @@ public class DemonicTelepositionFocus extends TelepositionFocus
|
|||
par3List.add("A stronger version of the focus,");
|
||||
par3List.add("using a demonic shard");
|
||||
|
||||
if (!(par1ItemStack.stackTagCompound == null))
|
||||
if (!(par1ItemStack.getTagCompound() == null))
|
||||
{
|
||||
NBTTagCompound itemTag = par1ItemStack.stackTagCompound;
|
||||
NBTTagCompound itemTag = par1ItemStack.getTagCompound();
|
||||
|
||||
if (!par1ItemStack.stackTagCompound.getString("ownerName").equals(""))
|
||||
if (!par1ItemStack.getTagCompound().getString("ownerName").equals(""))
|
||||
{
|
||||
par3List.add("Current owner: " + par1ItemStack.stackTagCompound.getString("ownerName"));
|
||||
par3List.add("Current owner: " + par1ItemStack.getTagCompound().getString("ownerName"));
|
||||
}
|
||||
|
||||
par3List.add("Coords: " + itemTag.getInteger("xCoord") + ", " + itemTag.getInteger("yCoord") + ", " + itemTag.getInteger("zCoord"));
|
||||
|
|
|
@ -46,9 +46,9 @@ public class EnergyBattery extends Item implements ArmourUpgrade, IBindable, IBl
|
|||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4)
|
||||
{
|
||||
par3List.add("Stores raw Life 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"));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -65,7 +65,7 @@ public class EnergyBattery extends Item implements ArmourUpgrade, IBindable, IBl
|
|||
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);
|
||||
SpellHelper.sendIndexedParticleToAllAround(world, posX, posY, posZ, 20, world.provider.dimensionId, 4, posX, posY, posZ);
|
||||
}
|
||||
NBTTagCompound itemTag = par1ItemStack.stackTagCompound;
|
||||
NBTTagCompound itemTag = par1ItemStack.getTagCompound();
|
||||
|
||||
if(SpellHelper.isFakePlayer(par2World, par3EntityPlayer))
|
||||
{
|
||||
|
@ -187,7 +187,7 @@ public class EnergyBattery extends Item implements ArmourUpgrade, IBindable, IBl
|
|||
return 0;
|
||||
}
|
||||
|
||||
NBTTagCompound itemTag = par1ItemStack.stackTagCompound;
|
||||
NBTTagCompound itemTag = par1ItemStack.getTagCompound();
|
||||
|
||||
if (itemTag == null || itemTag.getString("ownerName").equals(""))
|
||||
{
|
||||
|
|
|
@ -45,12 +45,12 @@ public class EnergyBazooka 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"))
|
||||
{
|
||||
|
@ -69,7 +69,7 @@ public class EnergyBazooka extends EnergyItems
|
|||
if (par3EntityPlayer.isSneaking())
|
||||
{
|
||||
this.setActivated(par1ItemStack, !getActivated(par1ItemStack));
|
||||
par1ItemStack.stackTagCompound.setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % 100);
|
||||
par1ItemStack.getTagCompound().setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % 100);
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
|
@ -119,7 +119,7 @@ public class EnergyBazooka extends EnergyItems
|
|||
|
||||
EntityPlayer par3EntityPlayer = (EntityPlayer) par3Entity;
|
||||
|
||||
if (par1ItemStack.stackTagCompound == null)
|
||||
if (par1ItemStack.getTagCompound() == null)
|
||||
{
|
||||
par1ItemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
@ -130,7 +130,7 @@ public class EnergyBazooka extends EnergyItems
|
|||
this.setDelay(par1ItemStack, delay - 1);
|
||||
}
|
||||
|
||||
if (par2World.getWorldTime() % 100 == par1ItemStack.stackTagCompound.getInteger("worldTimeDelay") && par1ItemStack.stackTagCompound.getBoolean("isActive"))
|
||||
if (par2World.getWorldTime() % 100 == par1ItemStack.getTagCompound().getInteger("worldTimeDelay") && par1ItemStack.getTagCompound().getBoolean("isActive"))
|
||||
{
|
||||
if (!par3EntityPlayer.capabilities.isCreativeMode)
|
||||
{
|
||||
|
@ -150,9 +150,9 @@ public class EnergyBazooka extends EnergyItems
|
|||
{
|
||||
par3List.add("Boom.");
|
||||
|
||||
if (!(par1ItemStack.stackTagCompound == null))
|
||||
if (!(par1ItemStack.getTagCompound() == null))
|
||||
{
|
||||
if (par1ItemStack.stackTagCompound.getBoolean("isActive"))
|
||||
if (par1ItemStack.getTagCompound().getBoolean("isActive"))
|
||||
{
|
||||
par3List.add("Activated");
|
||||
} else
|
||||
|
@ -160,16 +160,16 @@ public class EnergyBazooka extends EnergyItems
|
|||
par3List.add("Deactivated");
|
||||
}
|
||||
|
||||
if (!par1ItemStack.stackTagCompound.getString("ownerName").equals(""))
|
||||
if (!par1ItemStack.getTagCompound().getString("ownerName").equals(""))
|
||||
{
|
||||
par3List.add("Current owner: " + par1ItemStack.stackTagCompound.getString("ownerName"));
|
||||
par3List.add("Current owner: " + par1ItemStack.getTagCompound().getString("ownerName"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void setActivated(ItemStack par1ItemStack, boolean newActivated)
|
||||
{
|
||||
NBTTagCompound itemTag = par1ItemStack.stackTagCompound;
|
||||
NBTTagCompound itemTag = par1ItemStack.getTagCompound();
|
||||
|
||||
if (itemTag == null)
|
||||
{
|
||||
|
@ -181,7 +181,7 @@ public class EnergyBazooka extends EnergyItems
|
|||
|
||||
public boolean getActivated(ItemStack par1ItemStack)
|
||||
{
|
||||
NBTTagCompound itemTag = par1ItemStack.stackTagCompound;
|
||||
NBTTagCompound itemTag = par1ItemStack.getTagCompound();
|
||||
|
||||
if (itemTag == null)
|
||||
{
|
||||
|
@ -193,7 +193,7 @@ public class EnergyBazooka extends EnergyItems
|
|||
|
||||
public void setDelay(ItemStack par1ItemStack, int newDelay)
|
||||
{
|
||||
NBTTagCompound itemTag = par1ItemStack.stackTagCompound;
|
||||
NBTTagCompound itemTag = par1ItemStack.getTagCompound();
|
||||
|
||||
if (itemTag == null)
|
||||
{
|
||||
|
@ -205,7 +205,7 @@ public class EnergyBazooka extends EnergyItems
|
|||
|
||||
public int getDelay(ItemStack par1ItemStack)
|
||||
{
|
||||
NBTTagCompound itemTag = par1ItemStack.stackTagCompound;
|
||||
NBTTagCompound itemTag = par1ItemStack.getTagCompound();
|
||||
|
||||
if (itemTag == null)
|
||||
{
|
||||
|
|
|
@ -45,12 +45,12 @@ public class EnergyBlast 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"))
|
||||
{
|
||||
|
@ -69,7 +69,7 @@ public class EnergyBlast extends EnergyItems
|
|||
if (par3EntityPlayer.isSneaking())
|
||||
{
|
||||
this.setActivated(par1ItemStack, !getActivated(par1ItemStack));
|
||||
par1ItemStack.stackTagCompound.setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % 100);
|
||||
par1ItemStack.getTagCompound().setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % 100);
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
|
@ -111,7 +111,7 @@ public class EnergyBlast extends EnergyItems
|
|||
}
|
||||
EntityPlayer par3EntityPlayer = (EntityPlayer) par3Entity;
|
||||
|
||||
if (par1ItemStack.stackTagCompound == null)
|
||||
if (par1ItemStack.getTagCompound() == null)
|
||||
{
|
||||
par1ItemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
@ -122,7 +122,7 @@ public class EnergyBlast extends EnergyItems
|
|||
this.setDelay(par1ItemStack, delay - 1);
|
||||
}
|
||||
|
||||
if (par2World.getWorldTime() % 100 == par1ItemStack.stackTagCompound.getInteger("worldTimeDelay") && par1ItemStack.stackTagCompound.getBoolean("isActive"))
|
||||
if (par2World.getWorldTime() % 100 == par1ItemStack.getTagCompound().getInteger("worldTimeDelay") && par1ItemStack.getTagCompound().getBoolean("isActive"))
|
||||
{
|
||||
if (!par3EntityPlayer.capabilities.isCreativeMode)
|
||||
{
|
||||
|
@ -144,9 +144,9 @@ public class EnergyBlast extends EnergyItems
|
|||
par3List.add("projectiles.");
|
||||
par3List.add("Damage: " + damage);
|
||||
|
||||
if (!(par1ItemStack.stackTagCompound == null))
|
||||
if (!(par1ItemStack.getTagCompound() == null))
|
||||
{
|
||||
if (par1ItemStack.stackTagCompound.getBoolean("isActive"))
|
||||
if (par1ItemStack.getTagCompound().getBoolean("isActive"))
|
||||
{
|
||||
par3List.add("Activated");
|
||||
} else
|
||||
|
@ -154,16 +154,16 @@ public class EnergyBlast extends EnergyItems
|
|||
par3List.add("Deactivated");
|
||||
}
|
||||
|
||||
if (!par1ItemStack.stackTagCompound.getString("ownerName").equals(""))
|
||||
if (!par1ItemStack.getTagCompound().getString("ownerName").equals(""))
|
||||
{
|
||||
par3List.add("Current owner: " + par1ItemStack.stackTagCompound.getString("ownerName"));
|
||||
par3List.add("Current owner: " + par1ItemStack.getTagCompound().getString("ownerName"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void setActivated(ItemStack par1ItemStack, boolean newActivated)
|
||||
{
|
||||
NBTTagCompound itemTag = par1ItemStack.stackTagCompound;
|
||||
NBTTagCompound itemTag = par1ItemStack.getTagCompound();
|
||||
|
||||
if (itemTag == null)
|
||||
{
|
||||
|
@ -175,7 +175,7 @@ public class EnergyBlast extends EnergyItems
|
|||
|
||||
public boolean getActivated(ItemStack par1ItemStack)
|
||||
{
|
||||
NBTTagCompound itemTag = par1ItemStack.stackTagCompound;
|
||||
NBTTagCompound itemTag = par1ItemStack.getTagCompound();
|
||||
|
||||
if (itemTag == null)
|
||||
{
|
||||
|
@ -187,7 +187,7 @@ public class EnergyBlast extends EnergyItems
|
|||
|
||||
public void setDelay(ItemStack par1ItemStack, int newDelay)
|
||||
{
|
||||
NBTTagCompound itemTag = par1ItemStack.stackTagCompound;
|
||||
NBTTagCompound itemTag = par1ItemStack.getTagCompound();
|
||||
|
||||
if (itemTag == null)
|
||||
{
|
||||
|
@ -199,7 +199,7 @@ public class EnergyBlast extends EnergyItems
|
|||
|
||||
public int getDelay(ItemStack par1ItemStack)
|
||||
{
|
||||
NBTTagCompound itemTag = par1ItemStack.stackTagCompound;
|
||||
NBTTagCompound itemTag = par1ItemStack.getTagCompound();
|
||||
|
||||
if (itemTag == null)
|
||||
{
|
||||
|
|
|
@ -191,35 +191,35 @@ public class EnergyItems extends Item implements IBindable
|
|||
|
||||
public static void setItemOwner(ItemStack item, String ownerName)
|
||||
{
|
||||
if (item.stackTagCompound == null)
|
||||
if (item.getTagCompound() == null)
|
||||
{
|
||||
item.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
item.stackTagCompound.setString("ownerName", ownerName);
|
||||
item.getTagCompound().setString("ownerName", ownerName);
|
||||
}
|
||||
|
||||
public static void checkAndSetItemOwner(ItemStack item, String ownerName)
|
||||
{
|
||||
if (item.stackTagCompound == null)
|
||||
if (item.getTagCompound() == null)
|
||||
{
|
||||
item.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
if (item.stackTagCompound.getString("ownerName").equals(""))
|
||||
if (item.getTagCompound().getString("ownerName").equals(""))
|
||||
{
|
||||
item.stackTagCompound.setString("ownerName", ownerName);
|
||||
item.getTagCompound().setString("ownerName", ownerName);
|
||||
}
|
||||
}
|
||||
|
||||
public static String getOwnerName(ItemStack item)
|
||||
{
|
||||
if (item.stackTagCompound == null)
|
||||
if (item.getTagCompound() == null)
|
||||
{
|
||||
item.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
return item.stackTagCompound.getString("ownerName");
|
||||
return item.getTagCompound().getString("ownerName");
|
||||
}
|
||||
|
||||
public static void drainPlayerNetwork(EntityPlayer player, int damageToBeDone)
|
||||
|
|
|
@ -59,12 +59,12 @@ public class EnergySword extends ItemSword
|
|||
@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"))
|
||||
{
|
||||
|
@ -106,7 +106,7 @@ public class EnergySword extends ItemSword
|
|||
if (par3EntityPlayer.isSneaking())
|
||||
{
|
||||
this.setActivated(par1ItemStack, !getActivated(par1ItemStack));
|
||||
par1ItemStack.stackTagCompound.setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % 100);
|
||||
par1ItemStack.getTagCompound().setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % 100);
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
|
@ -134,12 +134,12 @@ public class EnergySword extends ItemSword
|
|||
|
||||
EntityPlayer par3EntityPlayer = (EntityPlayer) par3Entity;
|
||||
|
||||
if (par1ItemStack.stackTagCompound == null)
|
||||
if (par1ItemStack.getTagCompound() == null)
|
||||
{
|
||||
par1ItemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
if (par2World.getWorldTime() % 100 == par1ItemStack.stackTagCompound.getInteger("worldTimeDelay") && par1ItemStack.stackTagCompound.getBoolean("isActive"))
|
||||
if (par2World.getWorldTime() % 100 == par1ItemStack.getTagCompound().getInteger("worldTimeDelay") && par1ItemStack.getTagCompound().getBoolean("isActive"))
|
||||
{
|
||||
if (!par3EntityPlayer.capabilities.isCreativeMode)
|
||||
{
|
||||
|
@ -156,7 +156,7 @@ public class EnergySword extends ItemSword
|
|||
|
||||
public void setActivated(ItemStack par1ItemStack, boolean newActivated)
|
||||
{
|
||||
NBTTagCompound itemTag = par1ItemStack.stackTagCompound;
|
||||
NBTTagCompound itemTag = par1ItemStack.getTagCompound();
|
||||
|
||||
if (itemTag == null)
|
||||
{
|
||||
|
@ -168,7 +168,7 @@ public class EnergySword extends ItemSword
|
|||
|
||||
public boolean getActivated(ItemStack par1ItemStack)
|
||||
{
|
||||
NBTTagCompound itemTag = par1ItemStack.stackTagCompound;
|
||||
NBTTagCompound itemTag = par1ItemStack.getTagCompound();
|
||||
|
||||
if (itemTag == null)
|
||||
{
|
||||
|
@ -189,9 +189,9 @@ public class EnergySword extends ItemSword
|
|||
par3List.add("Caution: may cause");
|
||||
par3List.add("a bad day...");
|
||||
|
||||
if (!(par1ItemStack.stackTagCompound == null))
|
||||
if (!(par1ItemStack.getTagCompound() == null))
|
||||
{
|
||||
if (par1ItemStack.stackTagCompound.getBoolean("isActive"))
|
||||
if (par1ItemStack.getTagCompound().getBoolean("isActive"))
|
||||
{
|
||||
par3List.add("Activated");
|
||||
} else
|
||||
|
@ -199,9 +199,9 @@ public class EnergySword extends ItemSword
|
|||
par3List.add("Deactivated");
|
||||
}
|
||||
|
||||
if (!par1ItemStack.stackTagCompound.getString("ownerName").equals(""))
|
||||
if (!par1ItemStack.getTagCompound().getString("ownerName").equals(""))
|
||||
{
|
||||
par3List.add("Current owner: " + par1ItemStack.stackTagCompound.getString("ownerName"));
|
||||
par3List.add("Current owner: " + par1ItemStack.getTagCompound().getString("ownerName"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,13 +28,13 @@ public class EnhancedTelepositionFocus extends TelepositionFocus
|
|||
{
|
||||
par3List.add("A focus further enhanced in an altar");
|
||||
|
||||
if (!(par1ItemStack.stackTagCompound == null))
|
||||
if (!(par1ItemStack.getTagCompound() == null))
|
||||
{
|
||||
NBTTagCompound itemTag = par1ItemStack.stackTagCompound;
|
||||
NBTTagCompound itemTag = par1ItemStack.getTagCompound();
|
||||
|
||||
if (!par1ItemStack.stackTagCompound.getString("ownerName").equals(""))
|
||||
if (!par1ItemStack.getTagCompound().getString("ownerName").equals(""))
|
||||
{
|
||||
par3List.add("Current owner: " + par1ItemStack.stackTagCompound.getString("ownerName"));
|
||||
par3List.add("Current owner: " + par1ItemStack.getTagCompound().getString("ownerName"));
|
||||
}
|
||||
|
||||
par3List.add("Coords: " + itemTag.getInteger("xCoord") + ", " + itemTag.getInteger("yCoord") + ", " + itemTag.getInteger("zCoord"));
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
package WayofTime.alchemicalWizardry.common.items;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public interface ILPGauge
|
||||
{
|
||||
public boolean canSeeLPBar(ItemStack itemStack);
|
||||
}
|
|
@ -47,9 +47,9 @@ public class ItemBloodLetterPack extends ItemArmor implements ArmourUpgrade, IAl
|
|||
{
|
||||
par3List.add("This pack really chaffes...");
|
||||
|
||||
if (!(par1ItemStack.stackTagCompound == null))
|
||||
if (!(par1ItemStack.getTagCompound() == null))
|
||||
{
|
||||
NBTTagCompound itemTag = par1ItemStack.stackTagCompound;
|
||||
NBTTagCompound itemTag = par1ItemStack.getTagCompound();
|
||||
|
||||
par3List.add("Stored LP: " + this.getStoredLP(par1ItemStack));
|
||||
}
|
||||
|
@ -143,7 +143,7 @@ public class ItemBloodLetterPack extends ItemArmor implements ArmourUpgrade, IAl
|
|||
public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack)
|
||||
{
|
||||
//This is where I need to do the updating
|
||||
if(!world.isRemote)
|
||||
if(world.isRemote)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -35,13 +35,13 @@ public class ItemComplexSpellCrystal extends EnergyItems
|
|||
{
|
||||
par3List.add("Crystal of unimaginable power");
|
||||
|
||||
if (!(par1ItemStack.stackTagCompound == null))
|
||||
if (!(par1ItemStack.getTagCompound() == null))
|
||||
{
|
||||
NBTTagCompound itemTag = par1ItemStack.stackTagCompound;
|
||||
NBTTagCompound itemTag = par1ItemStack.getTagCompound();
|
||||
|
||||
if (!par1ItemStack.stackTagCompound.getString("ownerName").equals(""))
|
||||
if (!par1ItemStack.getTagCompound().getString("ownerName").equals(""))
|
||||
{
|
||||
par3List.add("Current owner: " + par1ItemStack.stackTagCompound.getString("ownerName"));
|
||||
par3List.add("Current owner: " + par1ItemStack.getTagCompound().getString("ownerName"));
|
||||
}
|
||||
|
||||
par3List.add("Coords: " + itemTag.getInteger("xCoord") + ", " + itemTag.getInteger("yCoord") + ", " + itemTag.getInteger("zCoord"));
|
||||
|
@ -65,7 +65,7 @@ public class ItemComplexSpellCrystal extends EnergyItems
|
|||
|
||||
if (world != null)
|
||||
{
|
||||
NBTTagCompound itemTag = par1ItemStack.stackTagCompound;
|
||||
NBTTagCompound itemTag = par1ItemStack.getTagCompound();
|
||||
TileEntity tileEntity = world.getTileEntity(itemTag.getInteger("xCoord"), itemTag.getInteger("yCoord"), itemTag.getInteger("zCoord"));
|
||||
|
||||
if (tileEntity instanceof TESpellParadigmBlock)
|
||||
|
@ -91,11 +91,11 @@ public class ItemComplexSpellCrystal extends EnergyItems
|
|||
|
||||
public int getDimensionID(ItemStack itemStack)
|
||||
{
|
||||
if (itemStack.stackTagCompound == null)
|
||||
if (itemStack.getTagCompound() == null)
|
||||
{
|
||||
itemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
return itemStack.stackTagCompound.getInteger("dimensionId");
|
||||
return itemStack.getTagCompound().getInteger("dimensionId");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -42,9 +42,9 @@ public class ItemDiabloKey extends EnergyItems
|
|||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4)
|
||||
{
|
||||
par3List.add("Binds other items to the owner's network");
|
||||
if (!(par1ItemStack.stackTagCompound == null))
|
||||
if (!(par1ItemStack.getTagCompound() == null))
|
||||
{
|
||||
par3List.add("Current owner: " + par1ItemStack.stackTagCompound.getString("ownerName"));
|
||||
par3List.add("Current owner: " + par1ItemStack.getTagCompound().getString("ownerName"));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -77,7 +77,7 @@ public class ItemDiabloKey extends EnergyItems
|
|||
return par1ItemStack;
|
||||
}
|
||||
|
||||
NBTTagCompound itemTag = par1ItemStack.stackTagCompound;
|
||||
NBTTagCompound itemTag = par1ItemStack.getTagCompound();
|
||||
|
||||
if (itemTag == null || itemTag.getString("ownerName").equals(""))
|
||||
{
|
||||
|
|
|
@ -67,11 +67,11 @@ public class ItemRitualDiviner extends EnergyItems
|
|||
|
||||
if(sneaking)
|
||||
{
|
||||
if (!(par1ItemStack.stackTagCompound == null))
|
||||
if (!(par1ItemStack.getTagCompound() == null))
|
||||
{
|
||||
String ritualID = this.getCurrentRitual(par1ItemStack);
|
||||
//TODO
|
||||
par3List.add("Current owner: " + par1ItemStack.stackTagCompound.getString("ownerName"));
|
||||
par3List.add("Current owner: " + par1ItemStack.getTagCompound().getString("ownerName"));
|
||||
par3List.add("RitualID: " + ritualID);
|
||||
List<RitualComponent> ritualList = Rituals.getRitualList(this.getCurrentRitual(par1ItemStack));
|
||||
if (ritualList == null)
|
||||
|
@ -133,7 +133,7 @@ public class ItemRitualDiviner extends EnergyItems
|
|||
@Override
|
||||
public String getItemStackDisplayName(ItemStack par1ItemStack)
|
||||
{
|
||||
if (!(par1ItemStack.stackTagCompound == null))
|
||||
if (!(par1ItemStack.getTagCompound() == null))
|
||||
{
|
||||
String ritualID = this.getCurrentRitual(par1ItemStack);
|
||||
if (ritualID.equals(""))
|
||||
|
@ -303,42 +303,42 @@ public class ItemRitualDiviner extends EnergyItems
|
|||
|
||||
public String getCurrentRitual(ItemStack par1ItemStack)
|
||||
{
|
||||
if (par1ItemStack.stackTagCompound == null)
|
||||
if (par1ItemStack.getTagCompound() == null)
|
||||
{
|
||||
par1ItemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
return par1ItemStack.stackTagCompound.getString("ritualID");
|
||||
return par1ItemStack.getTagCompound().getString("ritualID");
|
||||
}
|
||||
|
||||
public void setCurrentRitual(ItemStack par1ItemStack, String ritualID)
|
||||
{
|
||||
if (par1ItemStack.stackTagCompound == null)
|
||||
if (par1ItemStack.getTagCompound() == null)
|
||||
{
|
||||
par1ItemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
par1ItemStack.stackTagCompound.setString("ritualID", ritualID);
|
||||
par1ItemStack.getTagCompound().setString("ritualID", ritualID);
|
||||
}
|
||||
|
||||
public int getMaxRuneDisplacement(ItemStack par1ItemStack) //0 indicates the starting 4 runes, 1 indicates it can use Dusk runes
|
||||
{
|
||||
if (par1ItemStack.stackTagCompound == null)
|
||||
if (par1ItemStack.getTagCompound() == null)
|
||||
{
|
||||
par1ItemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
return par1ItemStack.stackTagCompound.getInteger("maxRuneDisplacement");
|
||||
return par1ItemStack.getTagCompound().getInteger("maxRuneDisplacement");
|
||||
}
|
||||
|
||||
public void setMaxRuneDisplacement(ItemStack par1ItemStack, int displacement)
|
||||
{
|
||||
if (par1ItemStack.stackTagCompound == null)
|
||||
if (par1ItemStack.getTagCompound() == null)
|
||||
{
|
||||
par1ItemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
par1ItemStack.stackTagCompound.setInteger("maxRuneDisplacement", displacement);
|
||||
par1ItemStack.getTagCompound().setInteger("maxRuneDisplacement", displacement);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -353,22 +353,22 @@ public class ItemRitualDiviner extends EnergyItems
|
|||
|
||||
public int getDirection(ItemStack itemStack)
|
||||
{
|
||||
if(itemStack.stackTagCompound == null)
|
||||
if(itemStack.getTagCompound() == null)
|
||||
{
|
||||
itemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
return itemStack.stackTagCompound.getInteger("direction");
|
||||
return itemStack.getTagCompound().getInteger("direction");
|
||||
}
|
||||
|
||||
public void setDirection(ItemStack itemStack, int direction)
|
||||
{
|
||||
if(itemStack.stackTagCompound == null)
|
||||
if(itemStack.getTagCompound() == null)
|
||||
{
|
||||
itemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
itemStack.stackTagCompound.setInteger("direction", direction);
|
||||
itemStack.getTagCompound().setInteger("direction", direction);
|
||||
}
|
||||
|
||||
public int cycleDirection(ItemStack itemStack)
|
||||
|
|
|
@ -64,9 +64,9 @@ public class LavaCrystal extends EnergyItems
|
|||
par3List.add("Store life to smelt");
|
||||
par3List.add("stuff in the furnace.");
|
||||
|
||||
if (!(par1ItemStack.stackTagCompound == null))
|
||||
if (!(par1ItemStack.getTagCompound() == null))
|
||||
{
|
||||
par3List.add("Current owner: " + par1ItemStack.stackTagCompound.getString("ownerName"));
|
||||
par3List.add("Current owner: " + par1ItemStack.getTagCompound().getString("ownerName"));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -29,13 +29,13 @@ public class ReinforcedTelepositionFocus extends TelepositionFocus
|
|||
par3List.add("A stronger version of the focus,");
|
||||
par3List.add("using a weak shard");
|
||||
|
||||
if (!(par1ItemStack.stackTagCompound == null))
|
||||
if (!(par1ItemStack.getTagCompound() == null))
|
||||
{
|
||||
NBTTagCompound itemTag = par1ItemStack.stackTagCompound;
|
||||
NBTTagCompound itemTag = par1ItemStack.getTagCompound();
|
||||
|
||||
if (!par1ItemStack.stackTagCompound.getString("ownerName").equals(""))
|
||||
if (!par1ItemStack.getTagCompound().getString("ownerName").equals(""))
|
||||
{
|
||||
par3List.add("Current owner: " + par1ItemStack.stackTagCompound.getString("ownerName"));
|
||||
par3List.add("Current owner: " + par1ItemStack.getTagCompound().getString("ownerName"));
|
||||
}
|
||||
|
||||
par3List.add("Coords: " + itemTag.getInteger("xCoord") + ", " + itemTag.getInteger("yCoord") + ", " + itemTag.getInteger("zCoord"));
|
||||
|
|
|
@ -26,9 +26,9 @@ public class ScribeTool extends EnergyItems
|
|||
{
|
||||
par3List.add("The writing is on the wall...");
|
||||
|
||||
if (!(par1ItemStack.stackTagCompound == null))
|
||||
if (!(par1ItemStack.getTagCompound() == null))
|
||||
{
|
||||
par3List.add("Current owner: " + par1ItemStack.stackTagCompound.getString("ownerName"));
|
||||
par3List.add("Current owner: " + par1ItemStack.getTagCompound().getString("ownerName"));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -36,13 +36,13 @@ public class TelepositionFocus extends EnergyItems
|
|||
{
|
||||
par3List.add("An Enderpearl imbued with blood");
|
||||
|
||||
if (!(par1ItemStack.stackTagCompound == null))
|
||||
if (!(par1ItemStack.getTagCompound() == null))
|
||||
{
|
||||
NBTTagCompound itemTag = par1ItemStack.stackTagCompound;
|
||||
NBTTagCompound itemTag = par1ItemStack.getTagCompound();
|
||||
|
||||
if (!par1ItemStack.stackTagCompound.getString("ownerName").equals(""))
|
||||
if (!par1ItemStack.getTagCompound().getString("ownerName").equals(""))
|
||||
{
|
||||
par3List.add("Current owner: " + par1ItemStack.stackTagCompound.getString("ownerName"));
|
||||
par3List.add("Current owner: " + par1ItemStack.getTagCompound().getString("ownerName"));
|
||||
}
|
||||
|
||||
par3List.add("Coords: " + itemTag.getInteger("xCoord") + ", " + itemTag.getInteger("yCoord") + ", " + itemTag.getInteger("zCoord"));
|
||||
|
@ -64,12 +64,12 @@ public class TelepositionFocus extends EnergyItems
|
|||
|
||||
public int getDimensionID(ItemStack itemStack)
|
||||
{
|
||||
if (itemStack.stackTagCompound == null)
|
||||
if (itemStack.getTagCompound() == null)
|
||||
{
|
||||
itemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
return itemStack.stackTagCompound.getInteger("dimensionId");
|
||||
return itemStack.getTagCompound().getInteger("dimensionId");
|
||||
}
|
||||
|
||||
public World getWorld(ItemStack itemStack)
|
||||
|
@ -79,9 +79,9 @@ public class TelepositionFocus extends EnergyItems
|
|||
|
||||
public int xCoord(ItemStack itemStack)
|
||||
{
|
||||
if (!(itemStack.stackTagCompound == null))
|
||||
if (!(itemStack.getTagCompound() == null))
|
||||
{
|
||||
return itemStack.stackTagCompound.getInteger("xCoord");
|
||||
return itemStack.getTagCompound().getInteger("xCoord");
|
||||
} else
|
||||
{
|
||||
return 0;
|
||||
|
@ -90,9 +90,9 @@ public class TelepositionFocus extends EnergyItems
|
|||
|
||||
public int yCoord(ItemStack itemStack)
|
||||
{
|
||||
if (!(itemStack.stackTagCompound == null))
|
||||
if (!(itemStack.getTagCompound() == null))
|
||||
{
|
||||
return itemStack.stackTagCompound.getInteger("yCoord");
|
||||
return itemStack.getTagCompound().getInteger("yCoord");
|
||||
} else
|
||||
{
|
||||
return 0;
|
||||
|
@ -101,9 +101,9 @@ public class TelepositionFocus extends EnergyItems
|
|||
|
||||
public int zCoord(ItemStack itemStack)
|
||||
{
|
||||
if (!(itemStack.stackTagCompound == null))
|
||||
if (!(itemStack.getTagCompound() == null))
|
||||
{
|
||||
return itemStack.stackTagCompound.getInteger("zCoord");
|
||||
return itemStack.getTagCompound().getInteger("zCoord");
|
||||
} else
|
||||
{
|
||||
return 0;
|
||||
|
|
|
@ -27,8 +27,8 @@ import WayofTime.alchemicalWizardry.ModItems;
|
|||
import WayofTime.alchemicalWizardry.api.alchemy.energy.IAlchemyGoggles;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.ILPGauge;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
|
||||
import WayofTime.alchemicalWizardry.common.items.ILPGauge;
|
||||
import WayofTime.alchemicalWizardry.common.items.sigil.DivinationSigil;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.model.ModelOmegaArmour;
|
||||
import cpw.mods.fml.common.Optional;
|
||||
|
@ -278,11 +278,11 @@ public class BoundArmour extends ItemArmor implements IAlchemyGoggles, ISpecialA
|
|||
{
|
||||
par3List.add("Devilish Protection");
|
||||
|
||||
if (!(par1ItemStack.stackTagCompound == null))
|
||||
if (!(par1ItemStack.getTagCompound() == null))
|
||||
{
|
||||
if (!par1ItemStack.stackTagCompound.getString("ownerName").equals(""))
|
||||
if (!par1ItemStack.getTagCompound().getString("ownerName").equals(""))
|
||||
{
|
||||
par3List.add("Current owner: " + par1ItemStack.stackTagCompound.getString("ownerName"));
|
||||
par3List.add("Current owner: " + par1ItemStack.getTagCompound().getString("ownerName"));
|
||||
}
|
||||
|
||||
ItemStack[] inv = getInternalInventory(par1ItemStack);
|
||||
|
@ -350,7 +350,7 @@ public class BoundArmour extends ItemArmor implements IAlchemyGoggles, ISpecialA
|
|||
@Override
|
||||
public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack)
|
||||
{
|
||||
if (itemStack.stackTagCompound == null)
|
||||
if (itemStack.getTagCompound() == null)
|
||||
{
|
||||
itemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
@ -500,13 +500,13 @@ public class BoundArmour extends ItemArmor implements IAlchemyGoggles, ISpecialA
|
|||
|
||||
public ItemStack[] getInternalInventory(ItemStack itemStack)
|
||||
{
|
||||
NBTTagCompound itemTag = itemStack.stackTagCompound;
|
||||
NBTTagCompound itemTag = itemStack.getTagCompound();
|
||||
|
||||
if (itemTag == null)
|
||||
{
|
||||
itemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
itemTag = itemStack.stackTagCompound;
|
||||
itemTag = itemStack.getTagCompound();
|
||||
|
||||
ItemStack[] inv = new ItemStack[9];
|
||||
NBTTagList tagList = itemTag.getTagList("Inventory", Constants.NBT.TAG_COMPOUND);
|
||||
|
@ -532,7 +532,7 @@ public class BoundArmour extends ItemArmor implements IAlchemyGoggles, ISpecialA
|
|||
|
||||
public void saveInternalInventory(ItemStack itemStack, ItemStack[] inventory)
|
||||
{
|
||||
NBTTagCompound itemTag = itemStack.stackTagCompound;
|
||||
NBTTagCompound itemTag = itemStack.getTagCompound();
|
||||
|
||||
if (itemTag == null)
|
||||
{
|
||||
|
|
|
@ -58,7 +58,7 @@ public class ItemAttunedCrystal extends Item implements IReagentManipulator
|
|||
par3List.add("A tool to tune alchemy");
|
||||
par3List.add("reagent transmission");
|
||||
|
||||
if (!(par1ItemStack.stackTagCompound == null))
|
||||
if (!(par1ItemStack.getTagCompound() == null))
|
||||
{
|
||||
Reagent reagent = this.getReagent(par1ItemStack);
|
||||
if (reagent != null)
|
||||
|
|
|
@ -51,7 +51,7 @@ public class ItemTankSegmenter extends Item implements IReagentManipulator
|
|||
par3List.add("Used to designate which");
|
||||
par3List.add("reagents can go into a container");
|
||||
|
||||
if (!(par1ItemStack.stackTagCompound == null))
|
||||
if (!(par1ItemStack.getTagCompound() == null))
|
||||
{
|
||||
Reagent reagent = this.getReagent(par1ItemStack);
|
||||
if (reagent != null)
|
||||
|
|
|
@ -27,9 +27,9 @@ public class ItemBloodFrame extends EnergyItems //implements IHiveFrame
|
|||
{
|
||||
par3List.add("Stirs bees into a frenzy.");
|
||||
|
||||
if (!(par1ItemStack.stackTagCompound == null))
|
||||
if (!(par1ItemStack.getTagCompound() == null))
|
||||
{
|
||||
par3List.add("Current owner: " + par1ItemStack.stackTagCompound.getString("ownerName"));
|
||||
par3List.add("Current owner: " + par1ItemStack.getTagCompound().getString("ownerName"));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -90,7 +90,7 @@ public class AlchemyFlask extends Item
|
|||
|
||||
public static void setEffects(ItemStack par1ItemStack, List<AlchemyPotionHelper> list)
|
||||
{
|
||||
NBTTagCompound itemTag = par1ItemStack.stackTagCompound;
|
||||
NBTTagCompound itemTag = par1ItemStack.getTagCompound();
|
||||
|
||||
if (itemTag == null)
|
||||
{
|
||||
|
@ -104,7 +104,7 @@ public class AlchemyFlask extends Item
|
|||
nbttaglist.appendTag(AlchemyPotionHelper.setEffectToNBT(aph));
|
||||
}
|
||||
|
||||
par1ItemStack.stackTagCompound.setTag("CustomFlaskEffects", nbttaglist);
|
||||
par1ItemStack.getTagCompound().setTag("CustomFlaskEffects", nbttaglist);
|
||||
}
|
||||
|
||||
public ItemStack onEaten(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)
|
||||
|
@ -378,7 +378,7 @@ public class AlchemyFlask extends Item
|
|||
par1ItemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
par1ItemStack.stackTagCompound.setBoolean("throwable", flag);
|
||||
par1ItemStack.getTagCompound().setBoolean("throwable", flag);
|
||||
}
|
||||
|
||||
public EntityPotion getEntityPotion(ItemStack par1ItemStack, World worldObj, EntityLivingBase entityLivingBase)
|
||||
|
@ -401,7 +401,7 @@ public class AlchemyFlask extends Item
|
|||
d.setBoolean("Ambient", pe.getIsAmbient());
|
||||
nbttaglist.appendTag(d);
|
||||
}
|
||||
potionStack.stackTagCompound.setTag("CustomPotionEffects", nbttaglist);
|
||||
potionStack.getTagCompound().setTag("CustomPotionEffects", nbttaglist);
|
||||
EntityPotion entityPotion = new EntityPotion(worldObj, entityLivingBase, potionStack);
|
||||
return entityPotion;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
package WayofTime.alchemicalWizardry.common.items.routing;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class InputRoutingFocus extends RoutingFocus
|
||||
{
|
||||
public InputRoutingFocus()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister iconRegister)
|
||||
{
|
||||
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:HarvestGoddessSigil_deactivated");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,142 @@
|
|||
package WayofTime.alchemicalWizardry.common.items.routing;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
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.util.ForgeDirection;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
|
||||
public class RoutingFocus extends Item
|
||||
{
|
||||
public RoutingFocus()
|
||||
{
|
||||
super();
|
||||
this.maxStackSize = 1;
|
||||
this.setCreativeTab(AlchemicalWizardry.tabBloodMagic);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer player)
|
||||
{
|
||||
this.cycleDirection(itemStack);
|
||||
return itemStack;
|
||||
}
|
||||
|
||||
public void cycleDirection(ItemStack itemStack)
|
||||
{
|
||||
ForgeDirection dir = this.getSetDirection(itemStack);
|
||||
int direction = dir.ordinal();
|
||||
direction++;
|
||||
if(direction >= ForgeDirection.VALID_DIRECTIONS.length)
|
||||
{
|
||||
direction = 0;
|
||||
}
|
||||
|
||||
this.setSetDirection(itemStack, ForgeDirection.getOrientation(direction));
|
||||
}
|
||||
|
||||
public ForgeDirection getSetDirection(ItemStack itemStack)
|
||||
{
|
||||
if(!itemStack.hasTagCompound())
|
||||
{
|
||||
itemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
NBTTagCompound tag = itemStack.getTagCompound();
|
||||
|
||||
return ForgeDirection.getOrientation(tag.getInteger("direction"));
|
||||
}
|
||||
|
||||
public void setSetDirection(ItemStack itemStack, ForgeDirection dir)
|
||||
{
|
||||
if(!itemStack.hasTagCompound())
|
||||
{
|
||||
itemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
NBTTagCompound tag = itemStack.getTagCompound();
|
||||
|
||||
tag.setInteger("direction", dir.ordinal());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4)
|
||||
{
|
||||
par3List.add("An Enderpearl imbued with blood");
|
||||
|
||||
if (!(par1ItemStack.getTagCompound() == null))
|
||||
{
|
||||
NBTTagCompound itemTag = par1ItemStack.getTagCompound();
|
||||
|
||||
par3List.add("Coords: " + itemTag.getInteger("xCoord") + ", " + itemTag.getInteger("yCoord") + ", " + itemTag.getInteger("zCoord"));
|
||||
par3List.add("Direction: " + this.getSetDirection(par1ItemStack));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onItemUseFirst(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ)
|
||||
{
|
||||
TileEntity tile = world.getTileEntity(x, y, z);
|
||||
if(tile instanceof IInventory)
|
||||
{
|
||||
this.setCoordinates(stack, x, y, z);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public void setCoordinates(ItemStack itemStack, int x, int y, int z)
|
||||
{
|
||||
if(!itemStack.hasTagCompound())
|
||||
{
|
||||
itemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
NBTTagCompound tag = itemStack.getTagCompound();
|
||||
|
||||
tag.setInteger("xCoord", x);
|
||||
tag.setInteger("yCoord", y);
|
||||
tag.setInteger("zCoord", z);
|
||||
}
|
||||
|
||||
public int xCoord(ItemStack itemStack)
|
||||
{
|
||||
if (!(itemStack.getTagCompound() == null))
|
||||
{
|
||||
return itemStack.getTagCompound().getInteger("xCoord");
|
||||
} else
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
public int yCoord(ItemStack itemStack)
|
||||
{
|
||||
if (!(itemStack.getTagCompound() == null))
|
||||
{
|
||||
return itemStack.getTagCompound().getInteger("yCoord");
|
||||
} else
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
public int zCoord(ItemStack itemStack)
|
||||
{
|
||||
if (!(itemStack.getTagCompound() == null))
|
||||
{
|
||||
return itemStack.getTagCompound().getInteger("zCoord");
|
||||
} else
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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