Massive rework of configs, items and blocks.
I redone where the items/blocsks are stored and how the configs are handled to clean up it and give space. You can change the config line to AWWayofTime if you want to keep the compatibility with old configs. Now you reference the blocks from the ModBlocks and Items from the ModItems.
This commit is contained in:
parent
8601e9faff
commit
e3644f2d2b
304 changed files with 3941 additions and 5108 deletions
|
@ -1,15 +1,15 @@
|
|||
package WayofTime.alchemicalWizardry.common.items;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.ModItems;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import WayofTime.alchemicalWizardry.common.AlchemicalWizardry;
|
||||
|
||||
public class AWBaseItems extends Item
|
||||
{
|
||||
import java.util.List;
|
||||
|
||||
public class AWBaseItems extends Item {
|
||||
public AWBaseItems(int id)
|
||||
{
|
||||
super(id);
|
||||
|
@ -19,19 +19,16 @@ public class AWBaseItems extends Item
|
|||
|
||||
public void registerIcons(IconRegister iconRegister)
|
||||
{
|
||||
if (this.itemID == AlchemicalWizardry.blankSlate.itemID)
|
||||
if (this.itemID == ModItems.blankSlate.itemID)
|
||||
{
|
||||
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:BlankSlate");
|
||||
}
|
||||
else if (this.itemID == AlchemicalWizardry.reinforcedSlate.itemID)
|
||||
} else if (this.itemID == ModItems.reinforcedSlate.itemID)
|
||||
{
|
||||
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:ReinforcedSlate");
|
||||
}
|
||||
else if (this.itemID == AlchemicalWizardry.imbuedSlate.itemID)
|
||||
} else if (this.itemID == ModItems.imbuedSlate.itemID)
|
||||
{
|
||||
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:InfusedSlate");
|
||||
}
|
||||
else if (this.itemID == AlchemicalWizardry.demonicSlate.itemID)
|
||||
} else if (this.itemID == ModItems.demonicSlate.itemID)
|
||||
{
|
||||
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:DemonSlate");
|
||||
}
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
package WayofTime.alchemicalWizardry.common.items;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.alchemy.AlchemyRecipeRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
@ -10,17 +12,12 @@ import net.minecraft.util.EnumChatFormatting;
|
|||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.alchemy.AlchemyRecipeRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import java.util.List;
|
||||
|
||||
public class ActivationCrystal extends EnergyItems
|
||||
{
|
||||
private static final String[] ACTIVATION_CRYSTAL_NAMES = new String[] { "Weak", "Awakened"};
|
||||
public class ActivationCrystal extends EnergyItems {
|
||||
private static final String[] ACTIVATION_CRYSTAL_NAMES = new String[]{"Weak", "Awakened"};
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private Icon[] icons;
|
||||
|
@ -69,7 +66,7 @@ public class ActivationCrystal extends EnergyItems
|
|||
{
|
||||
par3List.add(EnumChatFormatting.BLUE + "Recipe:");
|
||||
|
||||
for (ItemStack item: recipe)
|
||||
for (ItemStack item : recipe)
|
||||
{
|
||||
if (item != null)
|
||||
{
|
||||
|
@ -77,8 +74,7 @@ public class ActivationCrystal extends EnergyItems
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
par3List.add("-Press " + EnumChatFormatting.BLUE + "shift" + EnumChatFormatting.GRAY + " for Recipe-");
|
||||
}
|
||||
|
|
|
@ -1,13 +1,12 @@
|
|||
package WayofTime.alchemicalWizardry.common.items;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.item.Item;
|
||||
import WayofTime.alchemicalWizardry.common.AlchemicalWizardry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.item.Item;
|
||||
|
||||
public class AirInk extends Item
|
||||
{
|
||||
public class AirInk extends Item {
|
||||
public AirInk(int id)
|
||||
{
|
||||
super(id);
|
||||
|
|
|
@ -4,8 +4,7 @@ import cpw.mods.fml.relauncher.Side;
|
|||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
|
||||
public class AirScribeTool extends ScribeTool
|
||||
{
|
||||
public class AirScribeTool extends ScribeTool {
|
||||
public AirScribeTool(int id)
|
||||
{
|
||||
super(id, 4);
|
||||
|
|
|
@ -4,8 +4,7 @@ import cpw.mods.fml.relauncher.Side;
|
|||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
|
||||
public class ApprenticeBloodOrb extends EnergyBattery
|
||||
{
|
||||
public class ApprenticeBloodOrb extends EnergyBattery {
|
||||
public ApprenticeBloodOrb(int id, int damage)
|
||||
{
|
||||
super(id, damage);
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
package WayofTime.alchemicalWizardry.common.items;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
|
||||
public class ArchmageBloodOrb extends EnergyBattery
|
||||
{
|
||||
public class ArchmageBloodOrb extends EnergyBattery {
|
||||
public ArchmageBloodOrb(int id, int damage)
|
||||
{
|
||||
super(id, damage);
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
package WayofTime.alchemicalWizardry.common.items;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.AlchemicalWizardry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
@ -10,12 +11,10 @@ import net.minecraft.nbt.NBTTagCompound;
|
|||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.common.AlchemicalWizardry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ArmourInhibitor extends EnergyItems
|
||||
{
|
||||
import java.util.List;
|
||||
|
||||
public class ArmourInhibitor extends EnergyItems {
|
||||
private static Icon activeIcon;
|
||||
private static Icon passiveIcon;
|
||||
private int tickDelay = 200;
|
||||
|
@ -40,8 +39,7 @@ public class ArmourInhibitor extends EnergyItems
|
|||
if (par1ItemStack.stackTagCompound.getBoolean("isActive"))
|
||||
{
|
||||
par3List.add("Activated");
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
par3List.add("Deactivated");
|
||||
}
|
||||
|
@ -72,8 +70,7 @@ public class ArmourInhibitor extends EnergyItems
|
|||
if (tag.getBoolean("isActive"))
|
||||
{
|
||||
return this.activeIcon;
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
return this.passiveIcon;
|
||||
}
|
||||
|
@ -86,8 +83,7 @@ public class ArmourInhibitor extends EnergyItems
|
|||
if (par1 == 1)
|
||||
{
|
||||
return this.activeIcon;
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
return this.passiveIcon;
|
||||
}
|
||||
|
@ -131,14 +127,13 @@ public class ArmourInhibitor extends EnergyItems
|
|||
if (tag.getBoolean("isActive"))
|
||||
{
|
||||
par1ItemStack.setItemDamage(1);
|
||||
tag.setInteger("worldTimeDelay", (int)(par2World.getWorldTime() - 1) % tickDelay);
|
||||
tag.setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % tickDelay);
|
||||
|
||||
if (!par3EntityPlayer.capabilities.isCreativeMode)
|
||||
{
|
||||
//EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed());
|
||||
}
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
par1ItemStack.setItemDamage(par1ItemStack.getMaxDamage());
|
||||
}
|
||||
|
@ -154,7 +149,7 @@ public class ArmourInhibitor extends EnergyItems
|
|||
return;
|
||||
}
|
||||
|
||||
EntityPlayer par3EntityPlayer = (EntityPlayer)par3Entity;
|
||||
EntityPlayer par3EntityPlayer = (EntityPlayer) par3Entity;
|
||||
|
||||
if (par1ItemStack.stackTagCompound == null)
|
||||
{
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
package WayofTime.alchemicalWizardry.common.items;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEHomHeart;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
@ -9,13 +11,10 @@ import net.minecraft.nbt.NBTTagCompound;
|
|||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.DimensionManager;
|
||||
import WayofTime.alchemicalWizardry.common.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEHomHeart;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class BlankSpell extends EnergyItems
|
||||
{
|
||||
import java.util.List;
|
||||
|
||||
public class BlankSpell extends EnergyItems {
|
||||
public BlankSpell(int par1)
|
||||
{
|
||||
super(par1);
|
||||
|
@ -71,28 +70,24 @@ public class BlankSpell extends EnergyItems
|
|||
|
||||
if (tileEntity instanceof TEHomHeart)
|
||||
{
|
||||
TEHomHeart homHeart = (TEHomHeart)tileEntity;
|
||||
TEHomHeart homHeart = (TEHomHeart) tileEntity;
|
||||
|
||||
if (homHeart.canCastSpell(par1ItemStack, par2World, par3EntityPlayer))
|
||||
{
|
||||
EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, homHeart.castSpell(par1ItemStack, par2World, par3EntityPlayer));
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
return par1ItemStack;
|
||||
}
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
return par1ItemStack;
|
||||
}
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
return par1ItemStack;
|
||||
}
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
package WayofTime.alchemicalWizardry.common.items;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.ArmourUpgrade;
|
||||
import WayofTime.alchemicalWizardry.common.ModItems;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.common.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.ArmourUpgrade;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class BloodShard extends Item implements ArmourUpgrade
|
||||
{
|
||||
public class BloodShard extends Item implements ArmourUpgrade {
|
||||
public BloodShard(int par1)
|
||||
{
|
||||
super(par1);
|
||||
|
@ -24,13 +24,13 @@ public class BloodShard extends Item implements ArmourUpgrade
|
|||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IconRegister iconRegister)
|
||||
{
|
||||
if (this.itemID == AlchemicalWizardry.weakBloodShard.itemID)
|
||||
if (this.itemID == ModItems.weakBloodShard.itemID)
|
||||
{
|
||||
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:WeakBloodShard");
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.itemID == AlchemicalWizardry.demonBloodShard.itemID)
|
||||
if (this.itemID == ModItems.demonBloodShard.itemID)
|
||||
{
|
||||
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:DemonBloodShard");
|
||||
return;
|
||||
|
@ -39,11 +39,10 @@ public class BloodShard extends Item implements ArmourUpgrade
|
|||
|
||||
public int getBloodShardLevel()
|
||||
{
|
||||
if (this.itemID == AlchemicalWizardry.weakBloodShard.itemID)
|
||||
if (this.itemID == ModItems.weakBloodShard.itemID)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
else if (this.itemID == AlchemicalWizardry.demonBloodShard.itemID)
|
||||
} else if (this.itemID == ModItems.demonBloodShard.itemID)
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
package WayofTime.alchemicalWizardry.common.items;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.AlchemicalWizardry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
|
@ -9,12 +10,10 @@ import net.minecraft.entity.EntityLivingBase;
|
|||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import WayofTime.alchemicalWizardry.common.AlchemicalWizardry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class BloodboundSword extends EnergyItems
|
||||
{
|
||||
import java.util.List;
|
||||
|
||||
public class BloodboundSword extends EnergyItems {
|
||||
private float weaponDamage;
|
||||
//private int maxMode = 3;
|
||||
private NBTTagCompound data;
|
||||
|
@ -40,9 +39,9 @@ public class BloodboundSword extends EnergyItems
|
|||
{
|
||||
if (par3EntityLivingBase instanceof EntityPlayer)
|
||||
{
|
||||
EnergyItems.checkAndSetItemOwner(par1ItemStack, (EntityPlayer)par3EntityLivingBase);
|
||||
EnergyItems.checkAndSetItemOwner(par1ItemStack, (EntityPlayer) par3EntityLivingBase);
|
||||
|
||||
if (!this.syphonBatteries(par1ItemStack, (EntityPlayer)par3EntityLivingBase, this.getEnergyUsed()))
|
||||
if (!this.syphonBatteries(par1ItemStack, (EntityPlayer) par3EntityLivingBase, this.getEnergyUsed()))
|
||||
{
|
||||
//this.damagePlayer(null, (EntityPlayer)par3EntityLivingBase, (this.getEnergyUsed() + 99) / 100);
|
||||
}
|
||||
|
@ -81,8 +80,7 @@ public class BloodboundSword extends EnergyItems
|
|||
if (par2Block.blockID == Block.web.blockID)
|
||||
{
|
||||
return 15.0F;
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
Material material = par2Block.blockMaterial;
|
||||
return material != Material.plants && material != Material.vine && material != Material.coral && material != Material.leaves && material != Material.pumpkin ? 1.0F : 1.5F;
|
||||
|
|
|
@ -1,7 +1,11 @@
|
|||
package WayofTime.alchemicalWizardry.common.items;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.ArmourUpgrade;
|
||||
import WayofTime.alchemicalWizardry.common.IBindable;
|
||||
import WayofTime.alchemicalWizardry.common.ModItems;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
|
@ -18,14 +22,10 @@ import net.minecraft.world.World;
|
|||
import net.minecraftforge.common.ISpecialArmor;
|
||||
import thaumcraft.api.IGoggles;
|
||||
import thaumcraft.api.nodes.IRevealer;
|
||||
import WayofTime.alchemicalWizardry.common.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.ArmourUpgrade;
|
||||
import WayofTime.alchemicalWizardry.common.IBindable;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class BoundArmour extends ItemArmor implements ISpecialArmor, IRevealer, IGoggles, IBindable
|
||||
{
|
||||
import java.util.List;
|
||||
|
||||
public class BoundArmour extends ItemArmor implements ISpecialArmor, IRevealer, IGoggles, IBindable {
|
||||
private static int invSize = 9;
|
||||
private static Icon helmetIcon;
|
||||
private static Icon plateIcon;
|
||||
|
@ -54,22 +54,22 @@ public class BoundArmour extends ItemArmor implements ISpecialArmor, IRevealer,
|
|||
|
||||
public Icon getIconFromDamage(int par1)
|
||||
{
|
||||
if (this.itemID == AlchemicalWizardry.boundHelmet.itemID)
|
||||
if (this.itemID == ModItems.boundHelmet.itemID)
|
||||
{
|
||||
return this.helmetIcon;
|
||||
}
|
||||
|
||||
if (this.itemID == AlchemicalWizardry.boundPlate.itemID)
|
||||
if (this.itemID == ModItems.boundPlate.itemID)
|
||||
{
|
||||
return this.plateIcon;
|
||||
}
|
||||
|
||||
if (this.itemID == AlchemicalWizardry.boundLeggings.itemID)
|
||||
if (this.itemID == ModItems.boundLeggings.itemID)
|
||||
{
|
||||
return this.leggingsIcon;
|
||||
}
|
||||
|
||||
if (this.itemID == AlchemicalWizardry.boundBoots.itemID)
|
||||
if (this.itemID == ModItems.boundBoots.itemID)
|
||||
{
|
||||
return this.bootsIcon;
|
||||
}
|
||||
|
@ -82,6 +82,7 @@ public class BoundArmour extends ItemArmor implements ISpecialArmor, IRevealer,
|
|||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArmorProperties getProperties(EntityLivingBase player, ItemStack armor, DamageSource source, double damage, int slot)
|
||||
{
|
||||
|
@ -95,8 +96,7 @@ public class BoundArmour extends ItemArmor implements ISpecialArmor, IRevealer,
|
|||
if (isImmuneToVoid(armor))
|
||||
{
|
||||
return new ArmorProperties(-1, 3, 100000);
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
return new ArmorProperties(-1, 0, 0);
|
||||
}
|
||||
|
@ -112,7 +112,7 @@ public class BoundArmour extends ItemArmor implements ISpecialArmor, IRevealer,
|
|||
return new ArmorProperties(-1, 0, 0);
|
||||
}
|
||||
|
||||
if (helmet.itemID == AlchemicalWizardry.boundHelmet.itemID || plate.itemID == AlchemicalWizardry.boundPlate.itemID || leggings.itemID == AlchemicalWizardry.boundLeggings.itemID || boots.itemID == AlchemicalWizardry.boundBoots.itemID)
|
||||
if (helmet.itemID == ModItems.boundHelmet.itemID || plate.itemID == ModItems.boundPlate.itemID || leggings.itemID == ModItems.boundLeggings.itemID || boots.itemID == ModItems.boundBoots.itemID)
|
||||
{
|
||||
if (source.isUnblockable())
|
||||
{
|
||||
|
@ -128,22 +128,22 @@ public class BoundArmour extends ItemArmor implements ISpecialArmor, IRevealer,
|
|||
@Override
|
||||
public int getArmorDisplay(EntityPlayer player, ItemStack armor, int slot)
|
||||
{
|
||||
if (armor.itemID == AlchemicalWizardry.boundHelmet.itemID)
|
||||
if (armor.itemID == ModItems.boundHelmet.itemID)
|
||||
{
|
||||
return 3;
|
||||
}
|
||||
|
||||
if (armor.itemID == AlchemicalWizardry.boundPlate.itemID)
|
||||
if (armor.itemID == ModItems.boundPlate.itemID)
|
||||
{
|
||||
return 8;
|
||||
}
|
||||
|
||||
if (armor.itemID == AlchemicalWizardry.boundLeggings.itemID)
|
||||
if (armor.itemID == ModItems.boundLeggings.itemID)
|
||||
{
|
||||
return 6;
|
||||
}
|
||||
|
||||
if (armor.itemID == AlchemicalWizardry.boundBoots.itemID)
|
||||
if (armor.itemID == ModItems.boundBoots.itemID)
|
||||
{
|
||||
return 3;
|
||||
}
|
||||
|
@ -156,9 +156,9 @@ public class BoundArmour extends ItemArmor implements ISpecialArmor, IRevealer,
|
|||
{
|
||||
if (entity instanceof EntityPlayer)
|
||||
{
|
||||
EnergyItems.checkAndSetItemOwner(stack, (EntityPlayer)entity);
|
||||
EnergyItems.checkAndSetItemOwner(stack, (EntityPlayer) entity);
|
||||
|
||||
if (((EntityPlayer)entity).capabilities.isCreativeMode)
|
||||
if (((EntityPlayer) entity).capabilities.isCreativeMode)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -204,30 +204,29 @@ public class BoundArmour extends ItemArmor implements ISpecialArmor, IRevealer,
|
|||
//TODO Make the armour invisible when the player has Invisibility on.
|
||||
if (entity instanceof EntityLivingBase)
|
||||
{
|
||||
if (((EntityLivingBase)entity).isPotionActive(Potion.invisibility.id))
|
||||
if (((EntityLivingBase) entity).isPotionActive(Potion.invisibility.id))
|
||||
{
|
||||
if (itemID == AlchemicalWizardry.boundHelmet.itemID || itemID == AlchemicalWizardry.boundPlate.itemID || itemID == AlchemicalWizardry.boundBoots.itemID)
|
||||
if (itemID == ModItems.boundHelmet.itemID || itemID == ModItems.boundPlate.itemID || itemID == ModItems.boundBoots.itemID)
|
||||
{
|
||||
return "alchemicalwizardry:models/armor/boundArmour_invisible_layer_1.png";
|
||||
}
|
||||
|
||||
if (itemID == AlchemicalWizardry.boundLeggings.itemID)
|
||||
if (itemID == ModItems.boundLeggings.itemID)
|
||||
{
|
||||
return "alchemicalwizardry:models/armor/boundArmour_invisible_layer_2.png";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (itemID == AlchemicalWizardry.boundHelmet.itemID || itemID == AlchemicalWizardry.boundPlate.itemID || itemID == AlchemicalWizardry.boundBoots.itemID)
|
||||
if (itemID == ModItems.boundHelmet.itemID || itemID == ModItems.boundPlate.itemID || itemID == ModItems.boundBoots.itemID)
|
||||
{
|
||||
return "alchemicalwizardry:models/armor/boundArmour_layer_1.png";
|
||||
}
|
||||
|
||||
if (itemID == AlchemicalWizardry.boundLeggings.itemID)
|
||||
if (itemID == ModItems.boundLeggings.itemID)
|
||||
{
|
||||
return "alchemicalwizardry:models/armor/boundArmour_layer_2.png";
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
@ -314,9 +313,9 @@ public class BoundArmour extends ItemArmor implements ISpecialArmor, IRevealer,
|
|||
|
||||
if (inv[i].getItem() instanceof ArmourUpgrade && blood > 0)
|
||||
{
|
||||
if (((ArmourUpgrade)inv[i].getItem()).isUpgrade())
|
||||
if (((ArmourUpgrade) inv[i].getItem()).isUpgrade())
|
||||
{
|
||||
((ArmourUpgrade)inv[i].getItem()).onArmourUpdate(par2World, par3Entity, inv[i]);
|
||||
((ArmourUpgrade) inv[i].getItem()).onArmourUpdate(par2World, par3Entity, inv[i]);
|
||||
blood--;
|
||||
}
|
||||
|
||||
|
@ -324,7 +323,7 @@ public class BoundArmour extends ItemArmor implements ISpecialArmor, IRevealer,
|
|||
{
|
||||
if (getUpgradeCostMultiplier(par1ItemStack) > 0.02f)
|
||||
{
|
||||
EnergyItems.syphonBatteries(par1ItemStack, par3Entity, (int)(((ArmourUpgrade)inv[i].getItem()).getEnergyForTenSeconds() * getUpgradeCostMultiplier(par1ItemStack)));
|
||||
EnergyItems.syphonBatteries(par1ItemStack, par3Entity, (int) (((ArmourUpgrade) inv[i].getItem()).getEnergyForTenSeconds() * getUpgradeCostMultiplier(par1ItemStack)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -348,12 +347,12 @@ public class BoundArmour extends ItemArmor implements ISpecialArmor, IRevealer,
|
|||
|
||||
if (itemStack != null)
|
||||
{
|
||||
if (itemStack.itemID == AlchemicalWizardry.weakBloodShard.itemID)
|
||||
if (itemStack.itemID == ModItems.weakBloodShard.itemID)
|
||||
{
|
||||
max = Math.max(max, 1);
|
||||
}
|
||||
|
||||
if (itemStack.itemID == AlchemicalWizardry.demonBloodShard.itemID)
|
||||
if (itemStack.itemID == ModItems.demonBloodShard.itemID)
|
||||
{
|
||||
max = Math.max(max, 2);
|
||||
}
|
||||
|
@ -481,7 +480,7 @@ public class BoundArmour extends ItemArmor implements ISpecialArmor, IRevealer,
|
|||
continue;
|
||||
}
|
||||
|
||||
if (item.itemID == AlchemicalWizardry.voidSigil.itemID)
|
||||
if (item.itemID == ModItems.voidSigil.itemID)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@ -556,27 +555,27 @@ public class BoundArmour extends ItemArmor implements ISpecialArmor, IRevealer,
|
|||
continue;
|
||||
}
|
||||
|
||||
if (item.itemID == AlchemicalWizardry.weakBloodOrb.itemID)
|
||||
if (item.itemID == ModItems.weakBloodOrb.itemID)
|
||||
{
|
||||
return 0.75f;
|
||||
}
|
||||
|
||||
if (item.itemID == AlchemicalWizardry.apprenticeBloodOrb.itemID)
|
||||
if (item.itemID == ModItems.apprenticeBloodOrb.itemID)
|
||||
{
|
||||
return 0.50f;
|
||||
}
|
||||
|
||||
if (item.itemID == AlchemicalWizardry.magicianBloodOrb.itemID)
|
||||
if (item.itemID == ModItems.magicianBloodOrb.itemID)
|
||||
{
|
||||
return 0.25f;
|
||||
}
|
||||
|
||||
if (item.itemID == AlchemicalWizardry.masterBloodOrb.itemID)
|
||||
if (item.itemID == ModItems.masterBloodOrb.itemID)
|
||||
{
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
if (item.itemID == AlchemicalWizardry.archmageBloodOrb.itemID)
|
||||
if (item.itemID == ModItems.archmageBloodOrb.itemID)
|
||||
{
|
||||
return 0.0f;
|
||||
}
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
package WayofTime.alchemicalWizardry.common.items;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.IBindable;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockLeavesBase;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
|
@ -18,19 +19,21 @@ import net.minecraft.nbt.NBTTagList;
|
|||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeHooks;
|
||||
import WayofTime.alchemicalWizardry.common.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.IBindable;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class BoundAxe extends ItemAxe implements IBindable
|
||||
{
|
||||
/** Array of blocks the tool has extra effect against. */
|
||||
public static final Block[] blocksEffectiveAgainst = new Block[] {Block.planks, Block.bookShelf, Block.wood, Block.chest, Block.stoneDoubleSlab, Block.stoneSingleSlab, Block.pumpkin, Block.pumpkinLantern};
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class BoundAxe extends ItemAxe implements IBindable {
|
||||
/**
|
||||
* Array of blocks the tool has extra effect against.
|
||||
*/
|
||||
public static final Block[] blocksEffectiveAgainst = new Block[]{Block.planks, Block.bookShelf, Block.wood, Block.chest, Block.stoneDoubleSlab, Block.stoneSingleSlab, Block.pumpkin, Block.pumpkinLantern};
|
||||
|
||||
public float efficiencyOnProperMaterial = 12.0F;
|
||||
|
||||
/** Damage versus entities. */
|
||||
/**
|
||||
* Damage versus entities.
|
||||
*/
|
||||
public float damageVsEntity;
|
||||
|
||||
private static Icon activeIcon;
|
||||
|
@ -69,8 +72,7 @@ public class BoundAxe extends ItemAxe implements IBindable
|
|||
if (par1ItemStack.stackTagCompound.getBoolean("isActive"))
|
||||
{
|
||||
par3List.add("Activated");
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
par3List.add("Deactivated");
|
||||
}
|
||||
|
@ -104,8 +106,7 @@ public class BoundAxe extends ItemAxe implements IBindable
|
|||
if (tag.getBoolean("isActive"))
|
||||
{
|
||||
return this.activeIcon;
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
return this.passiveIcon;
|
||||
}
|
||||
|
@ -119,7 +120,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.stackTagCompound.setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % 200);
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
|
@ -133,9 +134,9 @@ public class BoundAxe extends ItemAxe implements IBindable
|
|||
return par1ItemStack;
|
||||
}
|
||||
|
||||
int posX = (int)par3EntityPlayer.posX;
|
||||
int posY = (int)par3EntityPlayer.posY;
|
||||
int posZ = (int)par3EntityPlayer.posZ;
|
||||
int posX = (int) par3EntityPlayer.posX;
|
||||
int posY = (int) par3EntityPlayer.posY;
|
||||
int posZ = (int) par3EntityPlayer.posZ;
|
||||
boolean silkTouch = false;
|
||||
int so = Enchantment.silkTouch.effectId;
|
||||
int fortune = Enchantment.fortune.effectId;
|
||||
|
@ -146,9 +147,9 @@ public class BoundAxe extends ItemAxe implements IBindable
|
|||
{
|
||||
for (int i = 0; i < enchants.tagCount(); i++)
|
||||
{
|
||||
if (enchants.tagAt(i)instanceof NBTTagCompound)
|
||||
if (enchants.tagAt(i) instanceof NBTTagCompound)
|
||||
{
|
||||
NBTTagCompound nbt = (NBTTagCompound)enchants.tagAt(i);
|
||||
NBTTagCompound nbt = (NBTTagCompound) enchants.tagAt(i);
|
||||
int id = nbt.getShort("id");
|
||||
|
||||
if (id == so)
|
||||
|
@ -188,8 +189,7 @@ public class BoundAxe extends ItemAxe implements IBindable
|
|||
{
|
||||
par2World.spawnEntityInWorld(new EntityItem(par2World, posX, posY + par3EntityPlayer.getEyeHeight(), posZ, droppedItem));
|
||||
}
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
ArrayList<ItemStack> itemDropList = block.getBlockDropped(par2World, posX + i, posY + j, posZ + k, meta, fortuneLvl);
|
||||
|
||||
|
@ -224,7 +224,7 @@ public class BoundAxe extends ItemAxe implements IBindable
|
|||
return;
|
||||
}
|
||||
|
||||
EntityPlayer par3EntityPlayer = (EntityPlayer)par3Entity;
|
||||
EntityPlayer par3EntityPlayer = (EntityPlayer) par3Entity;
|
||||
|
||||
if (par1ItemStack.stackTagCompound == null)
|
||||
{
|
||||
|
@ -303,7 +303,7 @@ public class BoundAxe extends ItemAxe implements IBindable
|
|||
|
||||
public boolean onBlockDestroyed(ItemStack par1ItemStack, World par2World, int par3, int par4, int par5, int par6, EntityLivingBase par7EntityLivingBase)
|
||||
{
|
||||
if ((double)Block.blocksList[par3].getBlockHardness(par2World, par4, par5, par6) != 0.0D)
|
||||
if ((double) Block.blocksList[par3].getBlockHardness(par2World, par4, par5, par6) != 0.0D)
|
||||
{
|
||||
//par1ItemStack.damageItem(1, par7EntityLivingBase);
|
||||
}
|
||||
|
@ -338,7 +338,9 @@ public class BoundAxe extends ItemAxe implements IBindable
|
|||
// return true;
|
||||
// }
|
||||
|
||||
/** FORGE: Overridden to allow custom tool effectiveness */
|
||||
/**
|
||||
* FORGE: Overridden to allow custom tool effectiveness
|
||||
*/
|
||||
@Override
|
||||
public float getStrVsBlock(ItemStack stack, Block block, int meta)
|
||||
{
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
package WayofTime.alchemicalWizardry.common.items;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.IBindable;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
|
@ -18,19 +19,21 @@ import net.minecraft.nbt.NBTTagList;
|
|||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeHooks;
|
||||
import WayofTime.alchemicalWizardry.common.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.IBindable;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class BoundPickaxe extends ItemPickaxe implements IBindable
|
||||
{
|
||||
/** Array of blocks the tool has extra effect against. */
|
||||
public static final Block[] blocksEffectiveAgainst = new Block[] {Block.cobblestone, Block.stoneDoubleSlab, Block.stoneSingleSlab, Block.stone, Block.sandStone, Block.cobblestoneMossy, Block.oreIron, Block.blockIron, Block.oreCoal, Block.blockGold, Block.oreGold, Block.oreDiamond, Block.blockDiamond, Block.ice, Block.netherrack, Block.oreLapis, Block.blockLapis, Block.oreRedstone, Block.oreRedstoneGlowing, Block.rail, Block.railDetector, Block.railPowered, Block.railActivator};
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class BoundPickaxe extends ItemPickaxe implements IBindable {
|
||||
/**
|
||||
* Array of blocks the tool has extra effect against.
|
||||
*/
|
||||
public static final Block[] blocksEffectiveAgainst = new Block[]{Block.cobblestone, Block.stoneDoubleSlab, Block.stoneSingleSlab, Block.stone, Block.sandStone, Block.cobblestoneMossy, Block.oreIron, Block.blockIron, Block.oreCoal, Block.blockGold, Block.oreGold, Block.oreDiamond, Block.blockDiamond, Block.ice, Block.netherrack, Block.oreLapis, Block.blockLapis, Block.oreRedstone, Block.oreRedstoneGlowing, Block.rail, Block.railDetector, Block.railPowered, Block.railActivator};
|
||||
|
||||
public float efficiencyOnProperMaterial = 12.0F;
|
||||
|
||||
/** Damage versus entities. */
|
||||
/**
|
||||
* Damage versus entities.
|
||||
*/
|
||||
public float damageVsEntity;
|
||||
|
||||
private static Icon activeIcon;
|
||||
|
@ -70,8 +73,7 @@ public class BoundPickaxe extends ItemPickaxe implements IBindable
|
|||
if (par1ItemStack.stackTagCompound.getBoolean("isActive"))
|
||||
{
|
||||
par3List.add("Activated");
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
par3List.add("Deactivated");
|
||||
}
|
||||
|
@ -105,8 +107,7 @@ public class BoundPickaxe extends ItemPickaxe implements IBindable
|
|||
if (tag.getBoolean("isActive"))
|
||||
{
|
||||
return this.activeIcon;
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
return this.passiveIcon;
|
||||
}
|
||||
|
@ -120,7 +121,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.stackTagCompound.setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % 200);
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
|
@ -134,9 +135,9 @@ public class BoundPickaxe extends ItemPickaxe implements IBindable
|
|||
return par1ItemStack;
|
||||
}
|
||||
|
||||
int posX = (int)par3EntityPlayer.posX;
|
||||
int posY = (int)par3EntityPlayer.posY;
|
||||
int posZ = (int)par3EntityPlayer.posZ;
|
||||
int posX = (int) par3EntityPlayer.posX;
|
||||
int posY = (int) par3EntityPlayer.posY;
|
||||
int posZ = (int) par3EntityPlayer.posZ;
|
||||
boolean silkTouch = false;
|
||||
int so = Enchantment.silkTouch.effectId;
|
||||
int fortune = Enchantment.fortune.effectId;
|
||||
|
@ -147,9 +148,9 @@ public class BoundPickaxe extends ItemPickaxe implements IBindable
|
|||
{
|
||||
for (int i = 0; i < enchants.tagCount(); i++)
|
||||
{
|
||||
if (enchants.tagAt(i)instanceof NBTTagCompound)
|
||||
if (enchants.tagAt(i) instanceof NBTTagCompound)
|
||||
{
|
||||
NBTTagCompound nbt = (NBTTagCompound)enchants.tagAt(i);
|
||||
NBTTagCompound nbt = (NBTTagCompound) enchants.tagAt(i);
|
||||
int id = nbt.getShort("id");
|
||||
|
||||
if (id == so)
|
||||
|
@ -189,8 +190,7 @@ public class BoundPickaxe extends ItemPickaxe implements IBindable
|
|||
{
|
||||
par2World.spawnEntityInWorld(new EntityItem(par2World, posX, posY + par3EntityPlayer.getEyeHeight(), posZ, droppedItem));
|
||||
}
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
ArrayList<ItemStack> itemDropList = block.getBlockDropped(par2World, posX + i, posY + j, posZ + k, meta, fortuneLvl);
|
||||
|
||||
|
@ -225,7 +225,7 @@ public class BoundPickaxe extends ItemPickaxe implements IBindable
|
|||
return;
|
||||
}
|
||||
|
||||
EntityPlayer par3EntityPlayer = (EntityPlayer)par3Entity;
|
||||
EntityPlayer par3EntityPlayer = (EntityPlayer) par3Entity;
|
||||
|
||||
if (par1ItemStack.stackTagCompound == null)
|
||||
{
|
||||
|
@ -305,14 +305,14 @@ public class BoundPickaxe extends ItemPickaxe implements IBindable
|
|||
@Override
|
||||
public boolean onBlockDestroyed(ItemStack par1ItemStack, World par2World, int par3, int par4, int par5, int par6, EntityLivingBase par7EntityLivingBase)
|
||||
{
|
||||
if ((double)Block.blocksList[par3].getBlockHardness(par2World, par4, par5, par6) != 0.0D)
|
||||
if ((double) Block.blocksList[par3].getBlockHardness(par2World, par4, par5, par6) != 0.0D)
|
||||
{
|
||||
//par1ItemStack.damageItem(1, par7EntityLivingBase);
|
||||
}
|
||||
|
||||
if (par7EntityLivingBase instanceof EntityPlayer)
|
||||
{
|
||||
EnergyItems.syphonBatteries(par1ItemStack, (EntityPlayer)par7EntityLivingBase, getEnergyUsed());
|
||||
EnergyItems.syphonBatteries(par1ItemStack, (EntityPlayer) par7EntityLivingBase, getEnergyUsed());
|
||||
}
|
||||
|
||||
//TODO Possibly add better functionality for the items?
|
||||
|
@ -347,7 +347,9 @@ public class BoundPickaxe extends ItemPickaxe implements IBindable
|
|||
// return false;
|
||||
// }
|
||||
|
||||
/** FORGE: Overridden to allow custom tool effectiveness */
|
||||
/**
|
||||
* FORGE: Overridden to allow custom tool effectiveness
|
||||
*/
|
||||
@Override
|
||||
public float getStrVsBlock(ItemStack stack, Block block, int meta)
|
||||
{
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
package WayofTime.alchemicalWizardry.common.items;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.IBindable;
|
||||
import com.google.common.collect.Multimap;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.enchantment.Enchantment;
|
||||
|
@ -19,22 +21,21 @@ import net.minecraft.nbt.NBTTagList;
|
|||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeHooks;
|
||||
import WayofTime.alchemicalWizardry.common.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.IBindable;
|
||||
|
||||
import com.google.common.collect.Multimap;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class BoundShovel extends ItemSpade implements IBindable
|
||||
{
|
||||
/** Array of blocks the tool has extra effect against. */
|
||||
public static final Block[] blocksEffectiveAgainst = new Block[] {Block.grass, Block.dirt, Block.sand, Block.gravel, Block.snow, Block.blockSnow, Block.blockClay, Block.tilledField, Block.slowSand, Block.mycelium};
|
||||
public class BoundShovel extends ItemSpade implements IBindable {
|
||||
/**
|
||||
* Array of blocks the tool has extra effect against.
|
||||
*/
|
||||
public static final Block[] blocksEffectiveAgainst = new Block[]{Block.grass, Block.dirt, Block.sand, Block.gravel, Block.snow, Block.blockSnow, Block.blockClay, Block.tilledField, Block.slowSand, Block.mycelium};
|
||||
|
||||
public float efficiencyOnProperMaterial = 12.0F;
|
||||
|
||||
/** Damage versus entities. */
|
||||
/**
|
||||
* Damage versus entities.
|
||||
*/
|
||||
public float damageVsEntity;
|
||||
|
||||
private static Icon activeIcon;
|
||||
|
@ -73,8 +74,7 @@ public class BoundShovel extends ItemSpade implements IBindable
|
|||
if (par1ItemStack.stackTagCompound.getBoolean("isActive"))
|
||||
{
|
||||
par3List.add("Activated");
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
par3List.add("Deactivated");
|
||||
}
|
||||
|
@ -108,8 +108,7 @@ public class BoundShovel extends ItemSpade implements IBindable
|
|||
if (tag.getBoolean("isActive"))
|
||||
{
|
||||
return this.activeIcon;
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
return this.passiveIcon;
|
||||
}
|
||||
|
@ -123,7 +122,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.stackTagCompound.setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % 200);
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
|
@ -137,9 +136,9 @@ public class BoundShovel extends ItemSpade implements IBindable
|
|||
return par1ItemStack;
|
||||
}
|
||||
|
||||
int posX = (int)par3EntityPlayer.posX;
|
||||
int posY = (int)par3EntityPlayer.posY;
|
||||
int posZ = (int)par3EntityPlayer.posZ;
|
||||
int posX = (int) par3EntityPlayer.posX;
|
||||
int posY = (int) par3EntityPlayer.posY;
|
||||
int posZ = (int) par3EntityPlayer.posZ;
|
||||
boolean silkTouch = false;
|
||||
int so = Enchantment.silkTouch.effectId;
|
||||
int fortune = Enchantment.fortune.effectId;
|
||||
|
@ -150,9 +149,9 @@ public class BoundShovel extends ItemSpade implements IBindable
|
|||
{
|
||||
for (int i = 0; i < enchants.tagCount(); i++)
|
||||
{
|
||||
if (enchants.tagAt(i)instanceof NBTTagCompound)
|
||||
if (enchants.tagAt(i) instanceof NBTTagCompound)
|
||||
{
|
||||
NBTTagCompound nbt = (NBTTagCompound)enchants.tagAt(i);
|
||||
NBTTagCompound nbt = (NBTTagCompound) enchants.tagAt(i);
|
||||
int id = nbt.getShort("id");
|
||||
|
||||
if (id == so)
|
||||
|
@ -192,8 +191,7 @@ public class BoundShovel extends ItemSpade implements IBindable
|
|||
{
|
||||
par2World.spawnEntityInWorld(new EntityItem(par2World, posX, posY + par3EntityPlayer.getEyeHeight(), posZ, droppedItem));
|
||||
}
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
ArrayList<ItemStack> itemDropList = block.getBlockDropped(par2World, posX + i, posY + j, posZ + k, meta, fortuneLvl);
|
||||
|
||||
|
@ -228,7 +226,7 @@ public class BoundShovel extends ItemSpade implements IBindable
|
|||
return;
|
||||
}
|
||||
|
||||
EntityPlayer par3EntityPlayer = (EntityPlayer)par3Entity;
|
||||
EntityPlayer par3EntityPlayer = (EntityPlayer) par3Entity;
|
||||
|
||||
if (par1ItemStack.stackTagCompound == null)
|
||||
{
|
||||
|
@ -307,7 +305,7 @@ public class BoundShovel extends ItemSpade implements IBindable
|
|||
|
||||
public boolean onBlockDestroyed(ItemStack par1ItemStack, World par2World, int par3, int par4, int par5, int par6, EntityLivingBase par7EntityLivingBase)
|
||||
{
|
||||
if ((double)Block.blocksList[par3].getBlockHardness(par2World, par4, par5, par6) != 0.0D)
|
||||
if ((double) Block.blocksList[par3].getBlockHardness(par2World, par4, par5, par6) != 0.0D)
|
||||
{
|
||||
//par1ItemStack.damageItem(1, par7EntityLivingBase);
|
||||
}
|
||||
|
@ -340,16 +338,17 @@ public class BoundShovel extends ItemSpade implements IBindable
|
|||
// {
|
||||
// return false;
|
||||
// }
|
||||
|
||||
@Override
|
||||
public Multimap getItemAttributeModifiers()
|
||||
{
|
||||
Multimap multimap = super.getItemAttributeModifiers();
|
||||
multimap.put(SharedMonsterAttributes.attackDamage.getAttributeUnlocalizedName(), new AttributeModifier(field_111210_e, "Tool modifier", (double)this.damageVsEntity, 0));
|
||||
multimap.put(SharedMonsterAttributes.attackDamage.getAttributeUnlocalizedName(), new AttributeModifier(field_111210_e, "Tool modifier", (double) this.damageVsEntity, 0));
|
||||
return multimap;
|
||||
}
|
||||
|
||||
/** FORGE: Overridden to allow custom tool effectiveness */
|
||||
/**
|
||||
* FORGE: Overridden to allow custom tool effectiveness
|
||||
*/
|
||||
@Override
|
||||
public float getStrVsBlock(ItemStack stack, Block block, int meta)
|
||||
{
|
||||
|
|
|
@ -1,7 +1,13 @@
|
|||
package WayofTime.alchemicalWizardry.common.items;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.IBindable;
|
||||
import WayofTime.alchemicalWizardry.common.LifeEssenceNetwork;
|
||||
import WayofTime.alchemicalWizardry.common.PacketHandler;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar;
|
||||
import cpw.mods.fml.common.network.PacketDispatcher;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
|
@ -11,17 +17,10 @@ import net.minecraft.server.MinecraftServer;
|
|||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.FakePlayer;
|
||||
import WayofTime.alchemicalWizardry.common.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.IBindable;
|
||||
import WayofTime.alchemicalWizardry.common.LifeEssenceNetwork;
|
||||
import WayofTime.alchemicalWizardry.common.PacketHandler;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar;
|
||||
import cpw.mods.fml.common.network.PacketDispatcher;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class CheatyItem extends Item implements IBindable
|
||||
{
|
||||
import java.util.List;
|
||||
|
||||
public class CheatyItem extends Item implements IBindable {
|
||||
// private int maxEssence;
|
||||
//protected int orbLevel;
|
||||
|
||||
|
@ -65,6 +64,7 @@ public class CheatyItem extends Item implements IBindable
|
|||
|
||||
//par3List.add("LP: " + par2EntityPlayer.getEntityData().getInteger("currentEssence"));
|
||||
}
|
||||
|
||||
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)
|
||||
{
|
||||
EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer);
|
||||
|
@ -80,8 +80,8 @@ public class CheatyItem extends Item implements IBindable
|
|||
double posX = par3EntityPlayer.posX;
|
||||
double posY = par3EntityPlayer.posY;
|
||||
double posZ = par3EntityPlayer.posZ;
|
||||
world.playSoundEffect((double)((float)posX + 0.5F), (double)((float)posY + 0.5F), (double)((float)posZ + 0.5F), "random.fizz", 0.5F, 2.6F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.8F);
|
||||
PacketDispatcher.sendPacketToAllAround(posX, posY, posZ, 20, world.provider.dimensionId, TEAltar.getParticlePacket(posX, posY, posZ, (short)4));
|
||||
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);
|
||||
PacketDispatcher.sendPacketToAllAround(posX, posY, posZ, 20, world.provider.dimensionId, TEAltar.getParticlePacket(posX, posY, posZ, (short) 4));
|
||||
}
|
||||
|
||||
if (!par3EntityPlayer.worldObj.isRemote)
|
||||
|
@ -99,8 +99,7 @@ public class CheatyItem extends Item implements IBindable
|
|||
if (par3EntityPlayer.isSneaking())
|
||||
{
|
||||
PacketDispatcher.sendPacketToServer(PacketHandler.getCreativeCheatPacket(itemTag.getString("ownerName"), false));
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
PacketDispatcher.sendPacketToServer(PacketHandler.getCreativeCheatPacket(itemTag.getString("ownerName"), true));
|
||||
}
|
||||
|
@ -139,8 +138,8 @@ public class CheatyItem extends Item implements IBindable
|
|||
double posX = player.posX;
|
||||
double posY = player.posY;
|
||||
double posZ = player.posZ;
|
||||
world.playSoundEffect((double)((float)posX + 0.5F), (double)((float)posY + 0.5F), (double)((float)posZ + 0.5F), "random.fizz", 0.5F, 2.6F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.8F);
|
||||
float f = (float)1.0F;
|
||||
world.playSoundEffect((double) ((float) posX + 0.5F), (double) ((float) posY + 0.5F), (double) ((float) posZ + 0.5F), "random.fizz", 0.5F, 2.6F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.8F);
|
||||
float f = (float) 1.0F;
|
||||
float f1 = f * 0.6F + 0.4F;
|
||||
float f2 = f * f * 0.7F - 0.5F;
|
||||
float f3 = f * f * 0.6F - 0.7F;
|
||||
|
@ -234,7 +233,7 @@ public class CheatyItem extends Item implements IBindable
|
|||
|
||||
String owner = itemTag.getString("ownerName");
|
||||
World worldSave = MinecraftServer.getServer().worldServers[0];
|
||||
LifeEssenceNetwork data = (LifeEssenceNetwork)worldSave.loadItemData(LifeEssenceNetwork.class, owner);
|
||||
LifeEssenceNetwork data = (LifeEssenceNetwork) worldSave.loadItemData(LifeEssenceNetwork.class, owner);
|
||||
|
||||
if (data == null)
|
||||
{
|
||||
|
|
|
@ -1,7 +1,11 @@
|
|||
package WayofTime.alchemicalWizardry.common.items;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar;
|
||||
import com.google.common.collect.Multimap;
|
||||
import cpw.mods.fml.common.network.PacketDispatcher;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
|
@ -21,18 +25,12 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.common.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar;
|
||||
|
||||
import com.google.common.collect.Multimap;
|
||||
import java.util.List;
|
||||
|
||||
import cpw.mods.fml.common.network.PacketDispatcher;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class DaggerOfSacrifice extends EnergyItems
|
||||
{
|
||||
public class DaggerOfSacrifice extends EnergyItems {
|
||||
private float weaponDamage;
|
||||
|
||||
public DaggerOfSacrifice(int id)
|
||||
{
|
||||
super(id);
|
||||
|
@ -80,7 +78,7 @@ public class DaggerOfSacrifice extends EnergyItems
|
|||
|
||||
for (int i = 0; i < 8; i++)
|
||||
{
|
||||
PacketDispatcher.sendPacketToAllPlayers(TEAltar.getParticlePacket(posX, posY, posZ, (short)1));
|
||||
PacketDispatcher.sendPacketToAllPlayers(TEAltar.getParticlePacket(posX, posY, posZ, (short) 1));
|
||||
}
|
||||
|
||||
par2EntityLivingBase.setHealth(-1);
|
||||
|
@ -99,7 +97,7 @@ public class DaggerOfSacrifice extends EnergyItems
|
|||
|
||||
for (int i = 0; i < 8; i++)
|
||||
{
|
||||
PacketDispatcher.sendPacketToAllPlayers(TEAltar.getParticlePacket(posX, posY, posZ, (short)1));
|
||||
PacketDispatcher.sendPacketToAllPlayers(TEAltar.getParticlePacket(posX, posY, posZ, (short) 1));
|
||||
}
|
||||
|
||||
par2EntityLivingBase.setHealth(-1);
|
||||
|
@ -118,7 +116,7 @@ public class DaggerOfSacrifice extends EnergyItems
|
|||
|
||||
for (int i = 0; i < 8; i++)
|
||||
{
|
||||
PacketDispatcher.sendPacketToAllPlayers(TEAltar.getParticlePacket(posX, posY, posZ, (short)1));
|
||||
PacketDispatcher.sendPacketToAllPlayers(TEAltar.getParticlePacket(posX, posY, posZ, (short) 1));
|
||||
}
|
||||
|
||||
par2EntityLivingBase.setHealth(-1);
|
||||
|
@ -137,7 +135,7 @@ public class DaggerOfSacrifice extends EnergyItems
|
|||
|
||||
for (int i = 0; i < 8; i++)
|
||||
{
|
||||
PacketDispatcher.sendPacketToAllPlayers(TEAltar.getParticlePacket(posX, posY, posZ, (short)1));
|
||||
PacketDispatcher.sendPacketToAllPlayers(TEAltar.getParticlePacket(posX, posY, posZ, (short) 1));
|
||||
}
|
||||
|
||||
par2EntityLivingBase.setHealth(-1);
|
||||
|
@ -154,7 +152,7 @@ public class DaggerOfSacrifice extends EnergyItems
|
|||
|
||||
for (int i = 0; i < 8; i++)
|
||||
{
|
||||
PacketDispatcher.sendPacketToAllPlayers(TEAltar.getParticlePacket(posX, posY, posZ, (short)1));
|
||||
PacketDispatcher.sendPacketToAllPlayers(TEAltar.getParticlePacket(posX, posY, posZ, (short) 1));
|
||||
}
|
||||
|
||||
par2EntityLivingBase.setHealth(-1);
|
||||
|
@ -183,8 +181,7 @@ public class DaggerOfSacrifice extends EnergyItems
|
|||
if (par2Block.blockID == Block.web.blockID)
|
||||
{
|
||||
return 15.0F;
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
Material material = par2Block.blockMaterial;
|
||||
return material != Material.plants && material != Material.vine && material != Material.coral && material != Material.leaves && material != Material.pumpkin ? 1.0F : 1.5F;
|
||||
|
@ -208,9 +205,9 @@ public class DaggerOfSacrifice extends EnergyItems
|
|||
|
||||
public boolean findAndFillAltar(World world, EntityLivingBase sacrifice, int amount)
|
||||
{
|
||||
int posX = (int)Math.round(sacrifice.posX - 0.5f);
|
||||
int posY = (int)sacrifice.posY;
|
||||
int posZ = (int)Math.round(sacrifice.posZ - 0.5f);
|
||||
int posX = (int) Math.round(sacrifice.posX - 0.5f);
|
||||
int posY = (int) sacrifice.posY;
|
||||
int posZ = (int) Math.round(sacrifice.posZ - 0.5f);
|
||||
TEAltar altarEntity = this.getAltar(world, posX, posY, posZ);
|
||||
|
||||
if (altarEntity == null)
|
||||
|
@ -237,25 +234,25 @@ public class DaggerOfSacrifice extends EnergyItems
|
|||
|
||||
if ((tileEntity instanceof TEAltar))
|
||||
{
|
||||
return (TEAltar)tileEntity;
|
||||
return (TEAltar) tileEntity;
|
||||
}
|
||||
}
|
||||
|
||||
if ((tileEntity instanceof TEAltar))
|
||||
{
|
||||
return (TEAltar)tileEntity;
|
||||
return (TEAltar) tileEntity;
|
||||
}
|
||||
}
|
||||
|
||||
if ((tileEntity instanceof TEAltar))
|
||||
{
|
||||
return (TEAltar)tileEntity;
|
||||
return (TEAltar) tileEntity;
|
||||
}
|
||||
}
|
||||
|
||||
if ((tileEntity instanceof TEAltar))
|
||||
{
|
||||
return (TEAltar)tileEntity;
|
||||
return (TEAltar) tileEntity;
|
||||
}
|
||||
|
||||
return null;
|
||||
|
|
|
@ -1,33 +1,24 @@
|
|||
package WayofTime.alchemicalWizardry.common.items;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityEggInfo;
|
||||
import net.minecraft.entity.EntityList;
|
||||
import net.minecraft.entity.EntityLiving;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.EnumMovingObjectType;
|
||||
import net.minecraft.util.Facing;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.common.entity.mob.EntityDemon;
|
||||
import WayofTime.alchemicalWizardry.common.summoning.SummoningRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.*;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.*;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class DemonPlacer extends Item
|
||||
{
|
||||
import java.util.List;
|
||||
|
||||
public class DemonPlacer extends Item {
|
||||
@SideOnly(Side.CLIENT)
|
||||
private Icon theIcon;
|
||||
|
||||
|
@ -56,7 +47,7 @@ public class DemonPlacer extends Item
|
|||
@SideOnly(Side.CLIENT)
|
||||
public int getColorFromItemStack(ItemStack par1ItemStack, int par2)
|
||||
{
|
||||
EntityEggInfo entityegginfo = (EntityEggInfo)EntityList.entityEggs.get(Integer.valueOf(par1ItemStack.getItemDamage()));
|
||||
EntityEggInfo entityegginfo = (EntityEggInfo) EntityList.entityEggs.get(Integer.valueOf(par1ItemStack.getItemDamage()));
|
||||
return entityegginfo != null ? (par2 == 0 ? entityegginfo.primaryColor : entityegginfo.secondaryColor) : 16777215;
|
||||
}
|
||||
|
||||
|
@ -69,8 +60,7 @@ public class DemonPlacer extends Item
|
|||
if (par3World.isRemote)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
int i1 = par3World.getBlockId(par4, par5, par6);
|
||||
par4 += Facing.offsetsXForSide[par7];
|
||||
|
@ -83,13 +73,13 @@ public class DemonPlacer extends Item
|
|||
d0 = 0.5D;
|
||||
}
|
||||
|
||||
Entity entity = spawnCreature(par3World, par1ItemStack.getItemDamage(), (double)par4 + 0.5D, (double)par5 + d0, (double)par6 + 0.5D, par1ItemStack);
|
||||
Entity entity = spawnCreature(par3World, par1ItemStack.getItemDamage(), (double) par4 + 0.5D, (double) par5 + d0, (double) par6 + 0.5D, par1ItemStack);
|
||||
|
||||
if (entity != null)
|
||||
{
|
||||
if (entity instanceof EntityLivingBase && par1ItemStack.hasDisplayName())
|
||||
{
|
||||
((EntityLiving)entity).setCustomNameTag(par1ItemStack.getDisplayName());
|
||||
((EntityLiving) entity).setCustomNameTag(par1ItemStack.getDisplayName());
|
||||
}
|
||||
|
||||
if (!par2EntityPlayer.capabilities.isCreativeMode)
|
||||
|
@ -110,16 +100,14 @@ public class DemonPlacer extends Item
|
|||
if (par2World.isRemote)
|
||||
{
|
||||
return par1ItemStack;
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
MovingObjectPosition movingobjectposition = this.getMovingObjectPositionFromPlayer(par2World, par3EntityPlayer, true);
|
||||
|
||||
if (movingobjectposition == null)
|
||||
{
|
||||
return par1ItemStack;
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
if (movingobjectposition.typeOfHit == EnumMovingObjectType.TILE)
|
||||
{
|
||||
|
@ -139,13 +127,13 @@ public class DemonPlacer extends Item
|
|||
|
||||
if (par2World.getBlockMaterial(i, j, k) == Material.water)
|
||||
{
|
||||
Entity entity = spawnCreature(par2World, par1ItemStack.getItemDamage(), (double)i, (double)j, (double)k, par1ItemStack);
|
||||
Entity entity = spawnCreature(par2World, par1ItemStack.getItemDamage(), (double) i, (double) j, (double) k, par1ItemStack);
|
||||
|
||||
if (entity != null)
|
||||
{
|
||||
if (entity instanceof EntityLivingBase && par1ItemStack.hasDisplayName())
|
||||
{
|
||||
((EntityLiving)entity).setCustomNameTag(par1ItemStack.getDisplayName());
|
||||
((EntityLiving) entity).setCustomNameTag(par1ItemStack.getDisplayName());
|
||||
}
|
||||
|
||||
if (!par3EntityPlayer.capabilities.isCreativeMode)
|
||||
|
@ -181,7 +169,7 @@ public class DemonPlacer extends Item
|
|||
|
||||
if (entity != null && entity instanceof EntityLivingBase)
|
||||
{
|
||||
EntityLiving entityliving = (EntityLiving)entity;
|
||||
EntityLiving entityliving = (EntityLiving) entity;
|
||||
entity.setLocationAndAngles(par2, par4, par6, MathHelper.wrapAngleTo180_float(par0World.rand.nextFloat() * 360.0F), 0.0F);
|
||||
entityliving.rotationYawHead = entityliving.rotationYaw;
|
||||
entityliving.renderYawOffset = entityliving.rotationYaw;
|
||||
|
@ -189,11 +177,11 @@ public class DemonPlacer extends Item
|
|||
//entityliving.onSpawnWithEgg((EntityLivingData)null);
|
||||
if (entityliving instanceof EntityDemon)
|
||||
{
|
||||
((EntityDemon)entityliving).setOwner(DemonPlacer.getOwnerName(itemStack));
|
||||
((EntityDemon) entityliving).setOwner(DemonPlacer.getOwnerName(itemStack));
|
||||
|
||||
if (!DemonPlacer.getOwnerName(itemStack).equals(""))
|
||||
{
|
||||
((EntityDemon)entityliving).setTamed(true);
|
||||
((EntityDemon) entityliving).setTamed(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,16 +1,15 @@
|
|||
package WayofTime.alchemicalWizardry.common.items;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class DemonicTelepositionFocus extends TelepositionFocus
|
||||
{
|
||||
import java.util.List;
|
||||
|
||||
public class DemonicTelepositionFocus extends TelepositionFocus {
|
||||
public DemonicTelepositionFocus(int par1)
|
||||
{
|
||||
super(par1, 4);
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
package WayofTime.alchemicalWizardry.common.items;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
|
||||
public class DuskScribeTool extends ScribeTool
|
||||
{
|
||||
public class DuskScribeTool extends ScribeTool {
|
||||
public DuskScribeTool(int id)
|
||||
{
|
||||
super(id, 5);
|
||||
|
|
|
@ -1,13 +1,12 @@
|
|||
package WayofTime.alchemicalWizardry.common.items;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.item.Item;
|
||||
import WayofTime.alchemicalWizardry.common.AlchemicalWizardry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.item.Item;
|
||||
|
||||
public class EarthInk extends Item
|
||||
{
|
||||
public class EarthInk extends Item {
|
||||
public EarthInk(int id)
|
||||
{
|
||||
super(id);
|
||||
|
|
|
@ -4,8 +4,7 @@ import cpw.mods.fml.relauncher.Side;
|
|||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
|
||||
public class EarthScribeTool extends ScribeTool
|
||||
{
|
||||
public class EarthScribeTool extends ScribeTool {
|
||||
public EarthScribeTool(int id)
|
||||
{
|
||||
super(id, 3);
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
package WayofTime.alchemicalWizardry.common.items;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.*;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar;
|
||||
import cpw.mods.fml.common.network.PacketDispatcher;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
|
@ -12,18 +15,10 @@ import net.minecraft.server.MinecraftServer;
|
|||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.FakePlayer;
|
||||
import WayofTime.alchemicalWizardry.common.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.ArmourUpgrade;
|
||||
import WayofTime.alchemicalWizardry.common.IBindable;
|
||||
import WayofTime.alchemicalWizardry.common.LifeEssenceNetwork;
|
||||
import WayofTime.alchemicalWizardry.common.PacketHandler;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar;
|
||||
import cpw.mods.fml.common.network.PacketDispatcher;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class EnergyBattery extends Item implements ArmourUpgrade, IBindable
|
||||
{
|
||||
import java.util.List;
|
||||
|
||||
public class EnergyBattery extends Item implements ArmourUpgrade, IBindable {
|
||||
private int maxEssence;
|
||||
protected int orbLevel;
|
||||
|
||||
|
@ -65,6 +60,7 @@ public class EnergyBattery extends Item implements ArmourUpgrade, IBindable
|
|||
|
||||
//par3List.add("LP: " + par2EntityPlayer.getEntityData().getInteger("currentEssence"));
|
||||
}
|
||||
|
||||
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)
|
||||
{
|
||||
EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer);
|
||||
|
@ -80,8 +76,8 @@ public class EnergyBattery extends Item implements ArmourUpgrade, IBindable
|
|||
double posX = par3EntityPlayer.posX;
|
||||
double posY = par3EntityPlayer.posY;
|
||||
double posZ = par3EntityPlayer.posZ;
|
||||
world.playSoundEffect((double)((float)posX + 0.5F), (double)((float)posY + 0.5F), (double)((float)posZ + 0.5F), "random.fizz", 0.5F, 2.6F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.8F);
|
||||
PacketDispatcher.sendPacketToAllAround(posX, posY, posZ, 20, world.provider.dimensionId, TEAltar.getParticlePacket(posX, posY, posZ, (short)4));
|
||||
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);
|
||||
PacketDispatcher.sendPacketToAllAround(posX, posY, posZ, 20, world.provider.dimensionId, TEAltar.getParticlePacket(posX, posY, posZ, (short) 4));
|
||||
}
|
||||
|
||||
if (!par3EntityPlayer.worldObj.isRemote && !(par3EntityPlayer.getClass().equals(EntityPlayerMP.class)))
|
||||
|
@ -135,8 +131,8 @@ public class EnergyBattery extends Item implements ArmourUpgrade, IBindable
|
|||
double posX = player.posX;
|
||||
double posY = player.posY;
|
||||
double posZ = player.posZ;
|
||||
world.playSoundEffect((double)((float)posX + 0.5F), (double)((float)posY + 0.5F), (double)((float)posZ + 0.5F), "random.fizz", 0.5F, 2.6F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.8F);
|
||||
float f = (float)1.0F;
|
||||
world.playSoundEffect((double) ((float) posX + 0.5F), (double) ((float) posY + 0.5F), (double) ((float) posZ + 0.5F), "random.fizz", 0.5F, 2.6F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.8F);
|
||||
float f = (float) 1.0F;
|
||||
float f1 = f * 0.6F + 0.4F;
|
||||
float f2 = f * f * 0.7F - 0.5F;
|
||||
float f3 = f * f * 0.6F - 0.7F;
|
||||
|
@ -230,7 +226,7 @@ public class EnergyBattery extends Item implements ArmourUpgrade, IBindable
|
|||
|
||||
String owner = itemTag.getString("ownerName");
|
||||
World worldSave = MinecraftServer.getServer().worldServers[0];
|
||||
LifeEssenceNetwork data = (LifeEssenceNetwork)worldSave.loadItemData(LifeEssenceNetwork.class, owner);
|
||||
LifeEssenceNetwork data = (LifeEssenceNetwork) worldSave.loadItemData(LifeEssenceNetwork.class, owner);
|
||||
|
||||
if (data == null)
|
||||
{
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
package WayofTime.alchemicalWizardry.common.items;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.EntityEnergyBazookaMainProjectile;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
@ -10,18 +12,16 @@ import net.minecraft.nbt.NBTTagCompound;
|
|||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.common.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.EntityEnergyBazookaMainProjectile;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class EnergyBazooka extends EnergyItems
|
||||
{
|
||||
import java.util.List;
|
||||
|
||||
public class EnergyBazooka extends EnergyItems {
|
||||
private static Icon activeIcon;
|
||||
private static Icon passiveIcon;
|
||||
private static int damage;
|
||||
//private static int delay;
|
||||
private static final int maxDelay = 150;
|
||||
|
||||
public EnergyBazooka(int id)
|
||||
{
|
||||
super(id);
|
||||
|
@ -56,8 +56,7 @@ public class EnergyBazooka extends EnergyItems
|
|||
if (tag.getBoolean("isActive"))
|
||||
{
|
||||
return this.activeIcon;
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
return this.passiveIcon;
|
||||
}
|
||||
|
@ -71,7 +70,7 @@ public class EnergyBazooka extends EnergyItems
|
|||
if (par3EntityPlayer.isSneaking())
|
||||
{
|
||||
this.setActivated(par1ItemStack, !getActivated(par1ItemStack));
|
||||
par1ItemStack.stackTagCompound.setInteger("worldTimeDelay", (int)(par2World.getWorldTime() - 1) % 100);
|
||||
par1ItemStack.stackTagCompound.setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % 100);
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
|
@ -104,7 +103,7 @@ public class EnergyBazooka extends EnergyItems
|
|||
par3EntityPlayer.motionX = -vec.xCoord * wantedVelocity;
|
||||
par3EntityPlayer.motionY = -vec.yCoord * wantedVelocity;
|
||||
par3EntityPlayer.motionZ = -vec.zCoord * wantedVelocity;
|
||||
par2World.playSoundEffect((double)((float)par3EntityPlayer.posX + 0.5F), (double)((float)par3EntityPlayer.posY + 0.5F), (double)((float)par3EntityPlayer.posZ + 0.5F), "random.fizz", 0.5F, 2.6F + (par2World.rand.nextFloat() - par2World.rand.nextFloat()) * 0.8F);
|
||||
par2World.playSoundEffect((double) ((float) par3EntityPlayer.posX + 0.5F), (double) ((float) par3EntityPlayer.posY + 0.5F), (double) ((float) par3EntityPlayer.posZ + 0.5F), "random.fizz", 0.5F, 2.6F + (par2World.rand.nextFloat() - par2World.rand.nextFloat()) * 0.8F);
|
||||
par3EntityPlayer.fallDistance = 0;
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
@ -117,7 +116,7 @@ public class EnergyBazooka extends EnergyItems
|
|||
return;
|
||||
}
|
||||
|
||||
EntityPlayer par3EntityPlayer = (EntityPlayer)par3Entity;
|
||||
EntityPlayer par3EntityPlayer = (EntityPlayer) par3Entity;
|
||||
|
||||
if (par1ItemStack.stackTagCompound == null)
|
||||
{
|
||||
|
@ -157,8 +156,7 @@ public class EnergyBazooka extends EnergyItems
|
|||
if (par1ItemStack.stackTagCompound.getBoolean("isActive"))
|
||||
{
|
||||
par3List.add("Activated");
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
par3List.add("Deactivated");
|
||||
}
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
package WayofTime.alchemicalWizardry.common.items;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.EnergyBlastProjectile;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
@ -9,18 +11,16 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.common.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.EnergyBlastProjectile;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class EnergyBlast extends EnergyItems
|
||||
{
|
||||
import java.util.List;
|
||||
|
||||
public class EnergyBlast extends EnergyItems {
|
||||
private static Icon activeIcon;
|
||||
private static Icon passiveIcon;
|
||||
private static int damage;
|
||||
//private static int delay;
|
||||
private static final int maxDelay = 15;
|
||||
|
||||
public EnergyBlast(int id)
|
||||
{
|
||||
super(id);
|
||||
|
@ -56,8 +56,7 @@ public class EnergyBlast extends EnergyItems
|
|||
if (tag.getBoolean("isActive"))
|
||||
{
|
||||
return this.activeIcon;
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
return this.passiveIcon;
|
||||
}
|
||||
|
@ -71,7 +70,7 @@ public class EnergyBlast extends EnergyItems
|
|||
if (par3EntityPlayer.isSneaking())
|
||||
{
|
||||
this.setActivated(par1ItemStack, !getActivated(par1ItemStack));
|
||||
par1ItemStack.stackTagCompound.setInteger("worldTimeDelay", (int)(par2World.getWorldTime() - 1) % 100);
|
||||
par1ItemStack.stackTagCompound.setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % 100);
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
|
@ -110,7 +109,7 @@ public class EnergyBlast extends EnergyItems
|
|||
return;
|
||||
}
|
||||
|
||||
EntityPlayer par3EntityPlayer = (EntityPlayer)par3Entity;
|
||||
EntityPlayer par3EntityPlayer = (EntityPlayer) par3Entity;
|
||||
|
||||
if (par1ItemStack.stackTagCompound == null)
|
||||
{
|
||||
|
@ -152,8 +151,7 @@ public class EnergyBlast extends EnergyItems
|
|||
if (par1ItemStack.stackTagCompound.getBoolean("isActive"))
|
||||
{
|
||||
par3List.add("Activated");
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
par3List.add("Deactivated");
|
||||
}
|
||||
|
|
|
@ -1,5 +1,11 @@
|
|||
package WayofTime.alchemicalWizardry.common.items;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.IBindable;
|
||||
import WayofTime.alchemicalWizardry.common.LifeEssenceNetwork;
|
||||
import WayofTime.alchemicalWizardry.common.PacketHandler;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar;
|
||||
import cpw.mods.fml.common.network.PacketDispatcher;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
@ -7,15 +13,8 @@ import net.minecraft.nbt.NBTTagCompound;
|
|||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.common.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.IBindable;
|
||||
import WayofTime.alchemicalWizardry.common.LifeEssenceNetwork;
|
||||
import WayofTime.alchemicalWizardry.common.PacketHandler;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar;
|
||||
import cpw.mods.fml.common.network.PacketDispatcher;
|
||||
|
||||
public class EnergyItems extends Item implements IBindable
|
||||
{
|
||||
public class EnergyItems extends Item implements IBindable {
|
||||
private int energyUsed;
|
||||
|
||||
public EnergyItems(int id)
|
||||
|
@ -43,8 +42,8 @@ public class EnergyItems extends Item implements IBindable
|
|||
double posX = player.posX;
|
||||
double posY = player.posY;
|
||||
double posZ = player.posZ;
|
||||
world.playSoundEffect((double)((float)posX + 0.5F), (double)((float)posY + 0.5F), (double)((float)posZ + 0.5F), "random.fizz", 0.5F, 2.6F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.8F);
|
||||
float f = (float)1.0F;
|
||||
world.playSoundEffect((double) ((float) posX + 0.5F), (double) ((float) posY + 0.5F), (double) ((float) posZ + 0.5F), "random.fizz", 0.5F, 2.6F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.8F);
|
||||
float f = (float) 1.0F;
|
||||
float f1 = f * 0.6F + 0.4F;
|
||||
float f2 = f * f * 0.7F - 0.5F;
|
||||
float f3 = f * f * 0.6F - 0.7F;
|
||||
|
@ -88,8 +87,8 @@ public class EnergyItems extends Item implements IBindable
|
|||
|
||||
if (particles)
|
||||
{
|
||||
PacketDispatcher.sendPacketToAllAround(posX, posY, posZ, 20, world.provider.dimensionId, TEAltar.getParticlePacket(posX, posY, posZ, (short)4));
|
||||
world.playSoundEffect((double)((float)player.posX + 0.5F), (double)((float)player.posY + 0.5F), (double)((float)player.posZ + 0.5F), "random.fizz", 0.5F, 2.6F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.8F);
|
||||
PacketDispatcher.sendPacketToAllAround(posX, posY, posZ, 20, world.provider.dimensionId, TEAltar.getParticlePacket(posX, posY, posZ, (short) 4));
|
||||
world.playSoundEffect((double) ((float) player.posX + 0.5F), (double) ((float) player.posY + 0.5F), (double) ((float) player.posZ + 0.5F), "random.fizz", 0.5F, 2.6F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.8F);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -100,8 +99,7 @@ public class EnergyItems extends Item implements IBindable
|
|||
|
||||
PacketDispatcher.sendPacketToServer(PacketHandler.getPacket(itemTag.getString("ownerName"), -damageToBeDone, 0));
|
||||
return true;
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@ -112,8 +110,7 @@ public class EnergyItems extends Item implements IBindable
|
|||
if (!player.worldObj.isRemote)
|
||||
{
|
||||
return syphonAndDamageWhileInContainer(ist, player, damageToBeDone);
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
World world = player.worldObj;
|
||||
|
||||
|
@ -124,8 +121,8 @@ public class EnergyItems extends Item implements IBindable
|
|||
double posZ = player.posZ;
|
||||
//if(particles)
|
||||
{
|
||||
PacketDispatcher.sendPacketToAllAround(posX, posY, posZ, 20, world.provider.dimensionId, TEAltar.getParticlePacket(posX, posY, posZ, (short)4));
|
||||
world.playSoundEffect((double)((float)player.posX + 0.5F), (double)((float)player.posY + 0.5F), (double)((float)player.posZ + 0.5F), "random.fizz", 0.5F, 2.6F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.8F);
|
||||
PacketDispatcher.sendPacketToAllAround(posX, posY, posZ, 20, world.provider.dimensionId, TEAltar.getParticlePacket(posX, posY, posZ, (short) 4));
|
||||
world.playSoundEffect((double) ((float) player.posX + 0.5F), (double) ((float) player.posY + 0.5F), (double) ((float) player.posZ + 0.5F), "random.fizz", 0.5F, 2.6F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.8F);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -146,7 +143,7 @@ public class EnergyItems extends Item implements IBindable
|
|||
}
|
||||
|
||||
World world = MinecraftServer.getServer().worldServers[0];
|
||||
LifeEssenceNetwork data = (LifeEssenceNetwork)world.loadItemData(LifeEssenceNetwork.class, ownerName);
|
||||
LifeEssenceNetwork data = (LifeEssenceNetwork) world.loadItemData(LifeEssenceNetwork.class, ownerName);
|
||||
|
||||
if (data == null)
|
||||
{
|
||||
|
@ -187,7 +184,7 @@ public class EnergyItems extends Item implements IBindable
|
|||
}
|
||||
|
||||
World world = MinecraftServer.getServer().worldServers[0];
|
||||
LifeEssenceNetwork data = (LifeEssenceNetwork)world.loadItemData(LifeEssenceNetwork.class, ownerName);
|
||||
LifeEssenceNetwork data = (LifeEssenceNetwork) world.loadItemData(LifeEssenceNetwork.class, ownerName);
|
||||
|
||||
if (data == null)
|
||||
{
|
||||
|
@ -221,11 +218,10 @@ public class EnergyItems extends Item implements IBindable
|
|||
|
||||
if (user.getHealth() <= 0.1f)
|
||||
{
|
||||
user.onDeath(DamageSource.generic);
|
||||
user.onDeath(DamageSource.generic);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (energySyphoned >= 100)
|
||||
} else if (energySyphoned >= 100)
|
||||
{
|
||||
if (!user.capabilities.isCreativeMode)
|
||||
{
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
package WayofTime.alchemicalWizardry.common.items;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.AlchemicalWizardry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
|
@ -15,12 +16,10 @@ import net.minecraft.potion.Potion;
|
|||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.common.AlchemicalWizardry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class EnergySword extends ItemSword
|
||||
{
|
||||
import java.util.List;
|
||||
|
||||
public class EnergySword extends ItemSword {
|
||||
//private float weaponDamaged;
|
||||
//private int maxMode = 3;
|
||||
private NBTTagCompound data;
|
||||
|
@ -73,8 +72,7 @@ public class EnergySword extends ItemSword
|
|||
if (tag.getBoolean("isActive"))
|
||||
{
|
||||
return this.activeIcon;
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
return this.passiveIcon;
|
||||
}
|
||||
|
@ -91,9 +89,9 @@ public class EnergySword extends ItemSword
|
|||
{
|
||||
if (par3EntityLivingBase instanceof EntityPlayer)
|
||||
{
|
||||
EnergyItems.checkAndSetItemOwner(par1ItemStack, (EntityPlayer)par3EntityLivingBase);
|
||||
EnergyItems.checkAndSetItemOwner(par1ItemStack, (EntityPlayer) par3EntityLivingBase);
|
||||
|
||||
if (!EnergyItems.syphonBatteries(par1ItemStack, (EntityPlayer)par3EntityLivingBase, this.getEnergyUsed()))
|
||||
if (!EnergyItems.syphonBatteries(par1ItemStack, (EntityPlayer) par3EntityLivingBase, this.getEnergyUsed()))
|
||||
{
|
||||
//this.damagePlayer(null, (EntityPlayer)par3EntityLivingBase, (this.getEnergyUsed() + 99) / 100);
|
||||
}
|
||||
|
@ -111,7 +109,7 @@ public class EnergySword extends ItemSword
|
|||
if (par3EntityPlayer.isSneaking())
|
||||
{
|
||||
this.setActivated(par1ItemStack, !getActivated(par1ItemStack));
|
||||
par1ItemStack.stackTagCompound.setInteger("worldTimeDelay", (int)(par2World.getWorldTime() - 1) % 100);
|
||||
par1ItemStack.stackTagCompound.setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % 100);
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
|
@ -137,7 +135,7 @@ public class EnergySword extends ItemSword
|
|||
return;
|
||||
}
|
||||
|
||||
EntityPlayer par3EntityPlayer = (EntityPlayer)par3Entity;
|
||||
EntityPlayer par3EntityPlayer = (EntityPlayer) par3Entity;
|
||||
|
||||
if (par1ItemStack.stackTagCompound == null)
|
||||
{
|
||||
|
@ -206,8 +204,7 @@ public class EnergySword extends ItemSword
|
|||
if (par1ItemStack.stackTagCompound.getBoolean("isActive"))
|
||||
{
|
||||
par3List.add("Activated");
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
par3List.add("Deactivated");
|
||||
}
|
||||
|
@ -225,8 +222,7 @@ public class EnergySword extends ItemSword
|
|||
if (par2Block.blockID == Block.web.blockID)
|
||||
{
|
||||
return 15.0F;
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
Material material = par2Block.blockMaterial;
|
||||
return material != Material.plants && material != Material.vine && material != Material.coral && material != Material.leaves && material != Material.pumpkin ? 1.0F : 1.5F;
|
||||
|
|
|
@ -1,13 +1,12 @@
|
|||
package WayofTime.alchemicalWizardry.common.items;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.item.Item;
|
||||
import WayofTime.alchemicalWizardry.common.AlchemicalWizardry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.item.Item;
|
||||
|
||||
public class FireInk extends Item
|
||||
{
|
||||
public class FireInk extends Item {
|
||||
public FireInk(int id)
|
||||
{
|
||||
super(id);
|
||||
|
|
|
@ -4,8 +4,7 @@ import cpw.mods.fml.relauncher.Side;
|
|||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
|
||||
public class FireScribeTool extends ScribeTool
|
||||
{
|
||||
public class FireScribeTool extends ScribeTool {
|
||||
public FireScribeTool(int id)
|
||||
{
|
||||
super(id, 2);
|
||||
|
|
|
@ -1,7 +1,12 @@
|
|||
package WayofTime.alchemicalWizardry.common.items;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.IBindable;
|
||||
import WayofTime.alchemicalWizardry.common.ModItems;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar;
|
||||
import cpw.mods.fml.common.network.PacketDispatcher;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
@ -12,15 +17,10 @@ import net.minecraft.nbt.NBTTagCompound;
|
|||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.FakePlayer;
|
||||
import WayofTime.alchemicalWizardry.common.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.IBindable;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar;
|
||||
import cpw.mods.fml.common.network.PacketDispatcher;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemDiabloKey extends EnergyItems
|
||||
{
|
||||
import java.util.List;
|
||||
|
||||
public class ItemDiabloKey extends EnergyItems {
|
||||
public ItemDiabloKey(int id)
|
||||
{
|
||||
super(id);
|
||||
|
@ -52,6 +52,7 @@ public class ItemDiabloKey extends EnergyItems
|
|||
|
||||
//par3List.add("LP: " + par2EntityPlayer.getEntityData().getInteger("currentEssence"));
|
||||
}
|
||||
|
||||
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)
|
||||
{
|
||||
EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer);
|
||||
|
@ -67,8 +68,8 @@ public class ItemDiabloKey extends EnergyItems
|
|||
double posX = par3EntityPlayer.posX;
|
||||
double posY = par3EntityPlayer.posY;
|
||||
double posZ = par3EntityPlayer.posZ;
|
||||
world.playSoundEffect((double)((float)posX + 0.5F), (double)((float)posY + 0.5F), (double)((float)posZ + 0.5F), "random.fizz", 0.5F, 2.6F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.8F);
|
||||
PacketDispatcher.sendPacketToAllAround(posX, posY, posZ, 20, world.provider.dimensionId, TEAltar.getParticlePacket(posX, posY, posZ, (short)4));
|
||||
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);
|
||||
PacketDispatcher.sendPacketToAllAround(posX, posY, posZ, 20, world.provider.dimensionId, TEAltar.getParticlePacket(posX, posY, posZ, (short) 4));
|
||||
}
|
||||
|
||||
if (!par3EntityPlayer.worldObj.isRemote && !(par3EntityPlayer.getClass().equals(EntityPlayerMP.class)))
|
||||
|
@ -118,8 +119,8 @@ public class ItemDiabloKey extends EnergyItems
|
|||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(int id, CreativeTabs creativeTab, List list)
|
||||
{
|
||||
list.add(new ItemStack(AlchemicalWizardry.itemKeyOfDiablo));
|
||||
ItemStack boundKey = new ItemStack(AlchemicalWizardry.itemKeyOfDiablo);
|
||||
list.add(new ItemStack(ModItems.itemKeyOfDiablo));
|
||||
ItemStack boundKey = new ItemStack(ModItems.itemKeyOfDiablo);
|
||||
EnergyItems.checkAndSetItemOwner(boundKey, "Server-wide Soul Network");
|
||||
list.add(boundKey);
|
||||
}
|
||||
|
|
|
@ -1,7 +1,13 @@
|
|||
package WayofTime.alchemicalWizardry.common.items;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.ModBlocks;
|
||||
import WayofTime.alchemicalWizardry.common.ModItems;
|
||||
import WayofTime.alchemicalWizardry.common.rituals.RitualComponent;
|
||||
import WayofTime.alchemicalWizardry.common.rituals.Rituals;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
@ -11,15 +17,10 @@ import net.minecraft.tileentity.TileEntity;
|
|||
import net.minecraft.util.ChatMessageComponent;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.common.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.rituals.RitualComponent;
|
||||
import WayofTime.alchemicalWizardry.common.rituals.Rituals;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemRitualDiviner extends EnergyItems
|
||||
{
|
||||
import java.util.List;
|
||||
|
||||
public class ItemRitualDiviner extends EnergyItems {
|
||||
private int maxMetaData;
|
||||
|
||||
public ItemRitualDiviner(int id)
|
||||
|
@ -46,8 +47,7 @@ public class ItemRitualDiviner extends EnergyItems
|
|||
if (this.getMaxRuneDisplacement(par1ItemStack) == 1)
|
||||
{
|
||||
par3List.add("Can place Dusk runes");
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
par3List.add("Can not place Dusk runes");
|
||||
}
|
||||
|
@ -114,8 +114,7 @@ public class ItemRitualDiviner extends EnergyItems
|
|||
int ritualID = this.getCurrentRitual(par1ItemStack);
|
||||
return "Ritual: " + Rituals.getNameOfRitual(ritualID);
|
||||
//par3List.add("Current owner: " + par1ItemStack.stackTagCompound.getString("ownerName"));
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
return super.getItemStackDisplayName(par1ItemStack);
|
||||
}
|
||||
|
@ -130,7 +129,7 @@ public class ItemRitualDiviner extends EnergyItems
|
|||
|
||||
if (tileEntity instanceof TEMasterStone)
|
||||
{
|
||||
TEMasterStone masterStone = (TEMasterStone)tileEntity;
|
||||
TEMasterStone masterStone = (TEMasterStone) tileEntity;
|
||||
List<RitualComponent> ritualList = Rituals.getRitualList(this.getCurrentRitual(par1ItemStack) + 1);
|
||||
int playerInvRitualStoneLocation = -1;
|
||||
|
||||
|
@ -141,7 +140,7 @@ public class ItemRitualDiviner extends EnergyItems
|
|||
continue;
|
||||
}
|
||||
|
||||
if (new ItemStack(AlchemicalWizardry.ritualStone).isItemEqual(playerInventory[i]))
|
||||
if (new ItemStack(ModBlocks.ritualStone).isItemEqual(playerInventory[i]))
|
||||
{
|
||||
playerInvRitualStoneLocation = i;
|
||||
break;
|
||||
|
@ -165,7 +164,7 @@ public class ItemRitualDiviner extends EnergyItems
|
|||
par2EntityPlayer.inventory.decrStackSize(playerInvRitualStoneLocation, 1);
|
||||
}
|
||||
|
||||
par3World.setBlock(par4 + rc.getX(), par5 + rc.getY(), par6 + rc.getZ(), AlchemicalWizardry.ritualStone.blockID, rc.getStoneType(), 3);
|
||||
par3World.setBlock(par4 + rc.getX(), par5 + rc.getY(), par6 + rc.getZ(), ModBlocks.ritualStone.blockID, rc.getStoneType(), 3);
|
||||
|
||||
if (par3World.isRemote)
|
||||
{
|
||||
|
@ -176,12 +175,11 @@ public class ItemRitualDiviner extends EnergyItems
|
|||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
int blockID = par3World.getBlockId(par4 + rc.getX(), par5 + rc.getY(), par6 + rc.getZ());
|
||||
|
||||
if (blockID == AlchemicalWizardry.ritualStone.blockID)
|
||||
if (blockID == ModBlocks.ritualStone.blockID)
|
||||
{
|
||||
int metadata = par3World.getBlockMetadata(par4 + rc.getX(), par5 + rc.getY(), par6 + rc.getZ());
|
||||
|
||||
|
@ -197,8 +195,7 @@ public class ItemRitualDiviner extends EnergyItems
|
|||
EnergyItems.syphonBatteries(par1ItemStack, par2EntityPlayer, getEnergyUsed());
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
par3World.playAuxSFX(0000, par4, par5 + 1, par6, 0);
|
||||
return true;
|
||||
|
@ -231,8 +228,7 @@ public class ItemRitualDiviner extends EnergyItems
|
|||
if (currentRitualID + 1 >= maxRitualID)
|
||||
{
|
||||
this.setCurrentRitual(par1ItemStack, 0);
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
this.setCurrentRitual(par1ItemStack, currentRitualID + 1);
|
||||
}
|
||||
|
@ -293,9 +289,9 @@ public class ItemRitualDiviner extends EnergyItems
|
|||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(int id, CreativeTabs creativeTab, List list)
|
||||
{
|
||||
list.add(new ItemStack(AlchemicalWizardry.itemRitualDiviner));
|
||||
ItemStack duskRitualDivinerStack = new ItemStack(AlchemicalWizardry.itemRitualDiviner);
|
||||
((ItemRitualDiviner)duskRitualDivinerStack.getItem()).setMaxRuneDisplacement(duskRitualDivinerStack, 1);
|
||||
list.add(new ItemStack(ModItems.itemRitualDiviner));
|
||||
ItemStack duskRitualDivinerStack = new ItemStack(ModItems.itemRitualDiviner);
|
||||
((ItemRitualDiviner) duskRitualDivinerStack.getItem()).setMaxRuneDisplacement(duskRitualDivinerStack, 1);
|
||||
list.add(duskRitualDivinerStack);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
package WayofTime.alchemicalWizardry.common.items;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.ArmourUpgrade;
|
||||
import WayofTime.alchemicalWizardry.common.ModItems;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
|
@ -13,13 +16,10 @@ import net.minecraft.world.World;
|
|||
import thaumcraft.api.IGoggles;
|
||||
import thaumcraft.api.IVisDiscounter;
|
||||
import thaumcraft.api.nodes.IRevealer;
|
||||
import WayofTime.alchemicalWizardry.common.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.ArmourUpgrade;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemSanguineArmour extends ItemArmor implements IRevealer, ArmourUpgrade, IGoggles, IVisDiscounter
|
||||
{
|
||||
import java.util.List;
|
||||
|
||||
public class ItemSanguineArmour extends ItemArmor implements IRevealer, ArmourUpgrade, IGoggles, IVisDiscounter {
|
||||
private static Icon helmetIcon;
|
||||
|
||||
public ItemSanguineArmour(int par1)
|
||||
|
@ -41,7 +41,7 @@ public class ItemSanguineArmour extends ItemArmor implements IRevealer, ArmourUp
|
|||
{
|
||||
//if(AlchemicalWizardry.isThaumcraftLoaded)
|
||||
{
|
||||
if (itemID == AlchemicalWizardry.sanguineHelmet.itemID)
|
||||
if (itemID == ModItems.sanguineHelmet.itemID)
|
||||
{
|
||||
return "alchemicalwizardry:models/armor/sanguineArmour_layer_1.png";
|
||||
}
|
||||
|
|
|
@ -1,19 +1,18 @@
|
|||
package WayofTime.alchemicalWizardry.common.items;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.LifeEssenceNetwork;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.common.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.LifeEssenceNetwork;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class LavaCrystal extends EnergyItems
|
||||
{
|
||||
import java.util.List;
|
||||
|
||||
public class LavaCrystal extends EnergyItems {
|
||||
public LavaCrystal(int id)
|
||||
{
|
||||
super(id);
|
||||
|
@ -85,7 +84,7 @@ public class LavaCrystal extends EnergyItems
|
|||
}
|
||||
|
||||
World world = MinecraftServer.getServer().worldServers[0];
|
||||
LifeEssenceNetwork data = (LifeEssenceNetwork)world.loadItemData(LifeEssenceNetwork.class, ownerName);
|
||||
LifeEssenceNetwork data = (LifeEssenceNetwork) world.loadItemData(LifeEssenceNetwork.class, ownerName);
|
||||
|
||||
if (data == null)
|
||||
{
|
||||
|
|
|
@ -5,8 +5,7 @@ import cpw.mods.fml.relauncher.SideOnly;
|
|||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.item.ItemBucket;
|
||||
|
||||
public class LifeBucket extends ItemBucket
|
||||
{
|
||||
public class LifeBucket extends ItemBucket {
|
||||
public LifeBucket(int par1, int par2)
|
||||
{
|
||||
super(par1, par2);
|
||||
|
|
|
@ -4,8 +4,7 @@ import cpw.mods.fml.relauncher.Side;
|
|||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
|
||||
public class MagicianBloodOrb extends EnergyBattery
|
||||
{
|
||||
public class MagicianBloodOrb extends EnergyBattery {
|
||||
public MagicianBloodOrb(int id, int damage)
|
||||
{
|
||||
super(id, damage);
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
package WayofTime.alchemicalWizardry.common.items;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
|
||||
public class MasterBloodOrb extends EnergyBattery
|
||||
{
|
||||
public class MasterBloodOrb extends EnergyBattery {
|
||||
public MasterBloodOrb(int id, int damage)
|
||||
{
|
||||
super(id, damage);
|
||||
|
|
|
@ -5,14 +5,10 @@ import cpw.mods.fml.relauncher.SideOnly;
|
|||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class OrbOfTesting extends EnergyItems
|
||||
{
|
||||
public class OrbOfTesting extends EnergyItems {
|
||||
public OrbOfTesting(int id)
|
||||
{
|
||||
super(id);
|
||||
|
|
|
@ -1,16 +1,15 @@
|
|||
package WayofTime.alchemicalWizardry.common.items;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ReinforcedTelepositionFocus extends TelepositionFocus
|
||||
{
|
||||
import java.util.List;
|
||||
|
||||
public class ReinforcedTelepositionFocus extends TelepositionFocus {
|
||||
public ReinforcedTelepositionFocus(int par1)
|
||||
{
|
||||
super(par1, 3);
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
package WayofTime.alchemicalWizardry.common.items;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
|
@ -11,13 +13,10 @@ import net.minecraft.tileentity.TileEntity;
|
|||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.FakePlayer;
|
||||
import WayofTime.alchemicalWizardry.common.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class SacrificialDagger extends Item
|
||||
{
|
||||
import java.util.List;
|
||||
|
||||
public class SacrificialDagger extends Item {
|
||||
public SacrificialDagger(int id)
|
||||
{
|
||||
super(id);
|
||||
|
@ -54,8 +53,8 @@ public class SacrificialDagger extends Item
|
|||
double posX = par3EntityPlayer.posX;
|
||||
double posY = par3EntityPlayer.posY;
|
||||
double posZ = par3EntityPlayer.posZ;
|
||||
par2World.playSoundEffect((double)((float)posX + 0.5F), (double)((float)posY + 0.5F), (double)((float)posZ + 0.5F), "random.fizz", 0.5F, 2.6F + (par2World.rand.nextFloat() - par2World.rand.nextFloat()) * 0.8F);
|
||||
float f = (float)1.0F;
|
||||
par2World.playSoundEffect((double) ((float) posX + 0.5F), (double) ((float) posY + 0.5F), (double) ((float) posZ + 0.5F), "random.fizz", 0.5F, 2.6F + (par2World.rand.nextFloat() - par2World.rand.nextFloat()) * 0.8F);
|
||||
float f = (float) 1.0F;
|
||||
float f1 = f * 0.6F + 0.4F;
|
||||
float f2 = f * f * 0.7F - 0.5F;
|
||||
float f3 = f * f * 0.6F - 0.7F;
|
||||
|
@ -83,9 +82,9 @@ public class SacrificialDagger extends Item
|
|||
|
||||
public void findAndFillAltar(World world, EntityPlayer player, int amount)
|
||||
{
|
||||
int posX = (int)Math.round(player.posX - 0.5f);
|
||||
int posY = (int)player.posY;
|
||||
int posZ = (int)Math.round(player.posZ - 0.5f);
|
||||
int posX = (int) Math.round(player.posX - 0.5f);
|
||||
int posY = (int) player.posY;
|
||||
int posZ = (int) Math.round(player.posZ - 0.5f);
|
||||
TEAltar altarEntity = getAltar(world, posX, posY, posZ);
|
||||
|
||||
if (altarEntity == null)
|
||||
|
@ -111,25 +110,25 @@ public class SacrificialDagger extends Item
|
|||
|
||||
if ((tileEntity instanceof TEAltar))
|
||||
{
|
||||
return (TEAltar)tileEntity;
|
||||
return (TEAltar) tileEntity;
|
||||
}
|
||||
}
|
||||
|
||||
if ((tileEntity instanceof TEAltar))
|
||||
{
|
||||
return (TEAltar)tileEntity;
|
||||
return (TEAltar) tileEntity;
|
||||
}
|
||||
}
|
||||
|
||||
if ((tileEntity instanceof TEAltar))
|
||||
{
|
||||
return (TEAltar)tileEntity;
|
||||
return (TEAltar) tileEntity;
|
||||
}
|
||||
}
|
||||
|
||||
if ((tileEntity instanceof TEAltar))
|
||||
{
|
||||
return (TEAltar)tileEntity;
|
||||
return (TEAltar) tileEntity;
|
||||
}
|
||||
|
||||
return null;
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
package WayofTime.alchemicalWizardry.common.items;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.AlchemicalWizardry;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.common.AlchemicalWizardry;
|
||||
|
||||
public class ScribeTool extends EnergyItems
|
||||
{
|
||||
import java.util.List;
|
||||
|
||||
public class ScribeTool extends EnergyItems {
|
||||
private int meta;
|
||||
|
||||
public ScribeTool(int id, int inkType)
|
||||
{
|
||||
super(id);
|
||||
|
|
|
@ -1,19 +1,18 @@
|
|||
package WayofTime.alchemicalWizardry.common.items;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.AlchemicalWizardry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.DimensionManager;
|
||||
import WayofTime.alchemicalWizardry.common.AlchemicalWizardry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class TelepositionFocus extends EnergyItems
|
||||
{
|
||||
import java.util.List;
|
||||
|
||||
public class TelepositionFocus extends EnergyItems {
|
||||
private int focusLevel;
|
||||
|
||||
public TelepositionFocus(int par1, int focusLevel)
|
||||
|
@ -89,8 +88,7 @@ public class TelepositionFocus extends EnergyItems
|
|||
if (!(itemStack.stackTagCompound == null))
|
||||
{
|
||||
return itemStack.stackTagCompound.getInteger("xCoord");
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -101,8 +99,7 @@ public class TelepositionFocus extends EnergyItems
|
|||
if (!(itemStack.stackTagCompound == null))
|
||||
{
|
||||
return itemStack.stackTagCompound.getInteger("yCoord");
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -113,8 +110,7 @@ public class TelepositionFocus extends EnergyItems
|
|||
if (!(itemStack.stackTagCompound == null))
|
||||
{
|
||||
return itemStack.stackTagCompound.getInteger("zCoord");
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -1,13 +1,12 @@
|
|||
package WayofTime.alchemicalWizardry.common.items;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.item.Item;
|
||||
import WayofTime.alchemicalWizardry.common.AlchemicalWizardry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.item.Item;
|
||||
|
||||
public class WaterInk extends Item
|
||||
{
|
||||
public class WaterInk extends Item {
|
||||
public WaterInk(int id)
|
||||
{
|
||||
super(id);
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
package WayofTime.alchemicalWizardry.common.items;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import WayofTime.alchemicalWizardry.common.AlchemicalWizardry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
|
||||
public class WaterScribeTool extends ScribeTool
|
||||
{
|
||||
public class WaterScribeTool extends ScribeTool {
|
||||
public WaterScribeTool(int id)
|
||||
{
|
||||
super(id, 1);
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
package WayofTime.alchemicalWizardry.common.items.potion;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.alchemy.AlchemyPotionHelper;
|
||||
import com.google.common.collect.HashMultimap;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.ai.attributes.Attribute;
|
||||
|
@ -22,16 +21,14 @@ import net.minecraft.potion.PotionEffect;
|
|||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.common.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.alchemy.AlchemyPotionHelper;
|
||||
|
||||
import com.google.common.collect.HashMultimap;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class AlchemyFlask extends Item
|
||||
{
|
||||
public class AlchemyFlask extends Item {
|
||||
private int maxPotionAmount = 20;
|
||||
|
||||
public AlchemyFlask(int id)
|
||||
|
@ -59,13 +56,12 @@ public class AlchemyFlask extends Item
|
|||
|
||||
for (int i = 0; i < nbttaglist.tagCount(); ++i)
|
||||
{
|
||||
NBTTagCompound nbttagcompound = (NBTTagCompound)nbttaglist.tagAt(i);
|
||||
NBTTagCompound nbttagcompound = (NBTTagCompound) nbttaglist.tagAt(i);
|
||||
arraylist.add(AlchemyPotionHelper.readEffectFromNBT(nbttagcompound));
|
||||
}
|
||||
|
||||
return arraylist;
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
@ -85,8 +81,7 @@ public class AlchemyFlask extends Item
|
|||
}
|
||||
|
||||
return newList;
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
@ -205,7 +200,7 @@ public class AlchemyFlask extends Item
|
|||
|
||||
if (list != null)
|
||||
{
|
||||
for (AlchemyPotionHelper aph: list)
|
||||
for (AlchemyPotionHelper aph : list)
|
||||
{
|
||||
if (aph.getPotionID() == potionID)
|
||||
{
|
||||
|
@ -224,7 +219,7 @@ public class AlchemyFlask extends Item
|
|||
|
||||
if (list != null)
|
||||
{
|
||||
for (AlchemyPotionHelper aph: list)
|
||||
for (AlchemyPotionHelper aph : list)
|
||||
{
|
||||
if (aph.getPotionID() == potionID)
|
||||
{
|
||||
|
@ -247,8 +242,7 @@ public class AlchemyFlask extends Item
|
|||
if (getEffects(par1ItemStack) != null)
|
||||
{
|
||||
return getEffects(par1ItemStack).size();
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -261,7 +255,7 @@ public class AlchemyFlask extends Item
|
|||
|
||||
if (list != null)
|
||||
{
|
||||
for (AlchemyPotionHelper aph: list)
|
||||
for (AlchemyPotionHelper aph : list)
|
||||
{
|
||||
if (aph.getPotionID() == potionID)
|
||||
{
|
||||
|
@ -277,8 +271,7 @@ public class AlchemyFlask extends Item
|
|||
this.setEffects(par1ItemStack, list);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
list = new ArrayList();
|
||||
list.add(new AlchemyPotionHelper(potionID, tickDuration, 0, 0));
|
||||
|
@ -306,7 +299,7 @@ public class AlchemyFlask extends Item
|
|||
|
||||
while (iterator.hasNext())
|
||||
{
|
||||
PotionEffect potioneffect = (PotionEffect)iterator.next();
|
||||
PotionEffect potioneffect = (PotionEffect) iterator.next();
|
||||
String s = StatCollector.translateToLocal(potioneffect.getEffectName()).trim();
|
||||
Potion potion = Potion.potionTypes[potioneffect.getPotionID()];
|
||||
Map map = potion.func_111186_k();
|
||||
|
@ -317,10 +310,10 @@ public class AlchemyFlask extends Item
|
|||
|
||||
while (iterator1.hasNext())
|
||||
{
|
||||
Entry entry = (Entry)iterator1.next();
|
||||
AttributeModifier attributemodifier = (AttributeModifier)entry.getValue();
|
||||
Entry entry = (Entry) iterator1.next();
|
||||
AttributeModifier attributemodifier = (AttributeModifier) entry.getValue();
|
||||
AttributeModifier attributemodifier1 = new AttributeModifier(attributemodifier.getName(), potion.func_111183_a(potioneffect.getAmplifier(), attributemodifier), attributemodifier.getOperation());
|
||||
hashmultimap.put(((Attribute)entry.getKey()).getAttributeUnlocalizedName(), attributemodifier1);
|
||||
hashmultimap.put(((Attribute) entry.getKey()).getAttributeUnlocalizedName(), attributemodifier1);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -337,14 +330,12 @@ public class AlchemyFlask extends Item
|
|||
if (potion.isBadEffect())
|
||||
{
|
||||
par3List.add(EnumChatFormatting.RED + s);
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
par3List.add(EnumChatFormatting.GRAY + s);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
String s1 = StatCollector.translateToLocal("potion.empty").trim();
|
||||
par3List.add(EnumChatFormatting.GRAY + s1);
|
||||
|
@ -358,28 +349,26 @@ public class AlchemyFlask extends Item
|
|||
|
||||
while (iterator.hasNext())
|
||||
{
|
||||
Entry entry1 = (Entry)iterator.next();
|
||||
AttributeModifier attributemodifier2 = (AttributeModifier)entry1.getValue();
|
||||
Entry entry1 = (Entry) iterator.next();
|
||||
AttributeModifier attributemodifier2 = (AttributeModifier) entry1.getValue();
|
||||
double d0 = attributemodifier2.getAmount();
|
||||
double d1;
|
||||
|
||||
if (attributemodifier2.getOperation() != 1 && attributemodifier2.getOperation() != 2)
|
||||
{
|
||||
d1 = attributemodifier2.getAmount();
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
d1 = attributemodifier2.getAmount() * 100.0D;
|
||||
}
|
||||
|
||||
if (d0 > 0.0D)
|
||||
{
|
||||
par3List.add(EnumChatFormatting.BLUE + StatCollector.translateToLocalFormatted("attribute.modifier.plus." + attributemodifier2.getOperation(), new Object[] {ItemStack.field_111284_a.format(d1), StatCollector.translateToLocal("attribute.name." + (String)entry1.getKey())}));
|
||||
}
|
||||
else if (d0 < 0.0D)
|
||||
par3List.add(EnumChatFormatting.BLUE + StatCollector.translateToLocalFormatted("attribute.modifier.plus." + attributemodifier2.getOperation(), new Object[]{ItemStack.field_111284_a.format(d1), StatCollector.translateToLocal("attribute.name." + (String) entry1.getKey())}));
|
||||
} else if (d0 < 0.0D)
|
||||
{
|
||||
d1 *= -1.0D;
|
||||
par3List.add(EnumChatFormatting.RED + StatCollector.translateToLocalFormatted("attribute.modifier.take." + attributemodifier2.getOperation(), new Object[] {ItemStack.field_111284_a.format(d1), StatCollector.translateToLocal("attribute.name." + (String)entry1.getKey())}));
|
||||
par3List.add(EnumChatFormatting.RED + StatCollector.translateToLocalFormatted("attribute.modifier.take." + attributemodifier2.getOperation(), new Object[]{ItemStack.field_111284_a.format(d1), StatCollector.translateToLocal("attribute.name." + (String) entry1.getKey())}));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -390,8 +379,7 @@ public class AlchemyFlask extends Item
|
|||
if (par1ItemStack.hasTagCompound() && par1ItemStack.getTagCompound().getBoolean("throwable"))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -425,8 +413,8 @@ public class AlchemyFlask extends Item
|
|||
for (PotionEffect pe : potionList)
|
||||
{
|
||||
NBTTagCompound d = new NBTTagCompound();
|
||||
d.setByte("Id", (byte)pe.getPotionID());
|
||||
d.setByte("Amplifier", (byte)pe.getAmplifier());
|
||||
d.setByte("Id", (byte) pe.getPotionID());
|
||||
d.setByte("Amplifier", (byte) pe.getAmplifier());
|
||||
//byte b1 = par0NBTTagCompound.getByte("Amplifier");
|
||||
d.setInteger("Duration", pe.getDuration());
|
||||
//int i = par0NBTTagCompound.getInteger("Duration");
|
||||
|
|
|
@ -1,10 +1,7 @@
|
|||
package WayofTime.alchemicalWizardry.common.items.potion;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.ModItems;
|
||||
import WayofTime.alchemicalWizardry.common.alchemy.AlchemyRecipeRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
@ -13,9 +10,11 @@ import net.minecraft.entity.player.EntityPlayer;
|
|||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import org.lwjgl.input.Keyboard;
|
||||
|
||||
public class AlchemyReagent extends Item
|
||||
{
|
||||
import java.util.List;
|
||||
|
||||
public class AlchemyReagent extends Item {
|
||||
public AlchemyReagent(int id)
|
||||
{
|
||||
super(id);
|
||||
|
@ -28,61 +27,61 @@ public class AlchemyReagent extends Item
|
|||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IconRegister iconRegister)
|
||||
{
|
||||
if (this.itemID == AlchemicalWizardry.incendium.itemID)
|
||||
if (this.itemID == ModItems.incendium.itemID)
|
||||
{
|
||||
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:Incendium");
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.itemID == AlchemicalWizardry.magicales.itemID)
|
||||
if (this.itemID == ModItems.magicales.itemID)
|
||||
{
|
||||
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:Magicales");
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.itemID == AlchemicalWizardry.sanctus.itemID)
|
||||
if (this.itemID == ModItems.sanctus.itemID)
|
||||
{
|
||||
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:Sanctus");
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.itemID == AlchemicalWizardry.aether.itemID)
|
||||
if (this.itemID == ModItems.aether.itemID)
|
||||
{
|
||||
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:Aether");
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.itemID == AlchemicalWizardry.simpleCatalyst.itemID)
|
||||
if (this.itemID == ModItems.simpleCatalyst.itemID)
|
||||
{
|
||||
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:SimpleCatalyst");
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.itemID == AlchemicalWizardry.crepitous.itemID)
|
||||
if (this.itemID == ModItems.crepitous.itemID)
|
||||
{
|
||||
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:Crepitous");
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.itemID == AlchemicalWizardry.crystallos.itemID)
|
||||
if (this.itemID == ModItems.crystallos.itemID)
|
||||
{
|
||||
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:Crystallos");
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.itemID == AlchemicalWizardry.terrae.itemID)
|
||||
if (this.itemID == ModItems.terrae.itemID)
|
||||
{
|
||||
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:Terrae");
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.itemID == AlchemicalWizardry.aquasalus.itemID)
|
||||
if (this.itemID == ModItems.aquasalus.itemID)
|
||||
{
|
||||
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:Aquasalus");
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.itemID == AlchemicalWizardry.tennebrae.itemID)
|
||||
if (this.itemID == ModItems.tennebrae.itemID)
|
||||
{
|
||||
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:Tennebrae");
|
||||
return;
|
||||
|
@ -102,7 +101,7 @@ public class AlchemyReagent extends Item
|
|||
{
|
||||
par3List.add(EnumChatFormatting.BLUE + "Recipe:");
|
||||
|
||||
for (ItemStack item: recipe)
|
||||
for (ItemStack item : recipe)
|
||||
{
|
||||
if (item != null)
|
||||
{
|
||||
|
@ -110,8 +109,7 @@ public class AlchemyReagent extends Item
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
par3List.add("-Press " + EnumChatFormatting.BLUE + "shift" + EnumChatFormatting.GRAY + " for Recipe-");
|
||||
}
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
package WayofTime.alchemicalWizardry.common.items.potion;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
|
||||
public class AverageLengtheningCatalyst extends LengtheningCatalyst
|
||||
{
|
||||
public class AverageLengtheningCatalyst extends LengtheningCatalyst {
|
||||
public AverageLengtheningCatalyst(int id)
|
||||
{
|
||||
super(id, 2);
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
package WayofTime.alchemicalWizardry.common.items.potion;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
|
||||
public class AveragePowerCatalyst extends PowerCatalyst
|
||||
{
|
||||
public class AveragePowerCatalyst extends PowerCatalyst {
|
||||
public AveragePowerCatalyst(int id)
|
||||
{
|
||||
super(id, 2);
|
||||
|
|
|
@ -1,14 +1,13 @@
|
|||
package WayofTime.alchemicalWizardry.common.items.potion;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import WayofTime.alchemicalWizardry.common.AlchemicalWizardry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
|
||||
public class EnhancedFillingAgent extends WeakFillingAgent
|
||||
{
|
||||
import java.util.Random;
|
||||
|
||||
public class EnhancedFillingAgent extends WeakFillingAgent {
|
||||
public EnhancedFillingAgent(int par1)
|
||||
{
|
||||
super(par1);
|
||||
|
|
|
@ -1,17 +1,16 @@
|
|||
package WayofTime.alchemicalWizardry.common.items.potion;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.items.TelepositionFocus;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import WayofTime.alchemicalWizardry.common.items.TelepositionFocus;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class EnhancedTelepositionFocus extends TelepositionFocus
|
||||
{
|
||||
import java.util.List;
|
||||
|
||||
public class EnhancedTelepositionFocus extends TelepositionFocus {
|
||||
public EnhancedTelepositionFocus(int par1)
|
||||
{
|
||||
super(par1, 2);
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
package WayofTime.alchemicalWizardry.common.items.potion;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
|
||||
public class GreaterLengtheningCatalyst extends LengtheningCatalyst
|
||||
{
|
||||
public class GreaterLengtheningCatalyst extends LengtheningCatalyst {
|
||||
public GreaterLengtheningCatalyst(int id)
|
||||
{
|
||||
super(id, 3);
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
package WayofTime.alchemicalWizardry.common.items.potion;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
|
||||
public class GreaterPowerCatalyst extends PowerCatalyst
|
||||
{
|
||||
public class GreaterPowerCatalyst extends PowerCatalyst {
|
||||
public GreaterPowerCatalyst(int id)
|
||||
{
|
||||
super(id, 3);
|
||||
|
|
|
@ -1,20 +1,17 @@
|
|||
package WayofTime.alchemicalWizardry.common.items.potion;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.ICatalyst;
|
||||
import WayofTime.alchemicalWizardry.common.alchemy.AlchemyRecipeRegistry;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import org.lwjgl.input.Keyboard;
|
||||
|
||||
public class LengtheningCatalyst extends Item implements ICatalyst
|
||||
{
|
||||
import java.util.List;
|
||||
|
||||
public class LengtheningCatalyst extends Item implements ICatalyst {
|
||||
private int catalystStrength;
|
||||
|
||||
public LengtheningCatalyst(int id, int catalystStrength)
|
||||
|
@ -49,7 +46,7 @@ public class LengtheningCatalyst extends Item implements ICatalyst
|
|||
{
|
||||
par3List.add(EnumChatFormatting.BLUE + "Recipe:");
|
||||
|
||||
for (ItemStack item: recipe)
|
||||
for (ItemStack item : recipe)
|
||||
{
|
||||
if (item != null)
|
||||
{
|
||||
|
@ -57,8 +54,7 @@ public class LengtheningCatalyst extends Item implements ICatalyst
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
par3List.add("-Press " + EnumChatFormatting.BLUE + "shift" + EnumChatFormatting.GRAY + " for Recipe-");
|
||||
}
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
package WayofTime.alchemicalWizardry.common.items.potion;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
|
||||
public class MundaneLengtheningCatalyst extends LengtheningCatalyst
|
||||
{
|
||||
public class MundaneLengtheningCatalyst extends LengtheningCatalyst {
|
||||
public MundaneLengtheningCatalyst(int id)
|
||||
{
|
||||
super(id, 1);
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
package WayofTime.alchemicalWizardry.common.items.potion;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
|
||||
public class MundanePowerCatalyst extends PowerCatalyst
|
||||
{
|
||||
public class MundanePowerCatalyst extends PowerCatalyst {
|
||||
public MundanePowerCatalyst(int id)
|
||||
{
|
||||
super(id, 1);
|
||||
|
|
|
@ -1,20 +1,17 @@
|
|||
package WayofTime.alchemicalWizardry.common.items.potion;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.ICatalyst;
|
||||
import WayofTime.alchemicalWizardry.common.alchemy.AlchemyRecipeRegistry;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import org.lwjgl.input.Keyboard;
|
||||
|
||||
public class PowerCatalyst extends Item implements ICatalyst
|
||||
{
|
||||
import java.util.List;
|
||||
|
||||
public class PowerCatalyst extends Item implements ICatalyst {
|
||||
private int catalystStrength;
|
||||
|
||||
public PowerCatalyst(int id, int catalystStrength)
|
||||
|
@ -49,7 +46,7 @@ public class PowerCatalyst extends Item implements ICatalyst
|
|||
{
|
||||
par3List.add(EnumChatFormatting.BLUE + "Recipe:");
|
||||
|
||||
for (ItemStack item: recipe)
|
||||
for (ItemStack item : recipe)
|
||||
{
|
||||
if (item != null)
|
||||
{
|
||||
|
@ -57,8 +54,7 @@ public class PowerCatalyst extends Item implements ICatalyst
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
par3List.add("-Press " + EnumChatFormatting.BLUE + "shift" + EnumChatFormatting.GRAY + " for Recipe-");
|
||||
}
|
||||
|
|
|
@ -1,23 +1,20 @@
|
|||
package WayofTime.alchemicalWizardry.common.items.potion;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.IBindingAgent;
|
||||
import WayofTime.alchemicalWizardry.common.alchemy.AlchemyRecipeRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import org.lwjgl.input.Keyboard;
|
||||
|
||||
public class StandardBindingAgent extends Item implements IBindingAgent
|
||||
{
|
||||
import java.util.List;
|
||||
|
||||
public class StandardBindingAgent extends Item implements IBindingAgent {
|
||||
public StandardBindingAgent(int id)
|
||||
{
|
||||
super(id);
|
||||
|
@ -50,7 +47,7 @@ public class StandardBindingAgent extends Item implements IBindingAgent
|
|||
{
|
||||
par3List.add(EnumChatFormatting.BLUE + "Recipe:");
|
||||
|
||||
for (ItemStack item: recipe)
|
||||
for (ItemStack item : recipe)
|
||||
{
|
||||
if (item != null)
|
||||
{
|
||||
|
@ -58,8 +55,7 @@ public class StandardBindingAgent extends Item implements IBindingAgent
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
par3List.add("-Press " + EnumChatFormatting.BLUE + "shift" + EnumChatFormatting.GRAY + " for Recipe-");
|
||||
}
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
package WayofTime.alchemicalWizardry.common.items.potion;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import WayofTime.alchemicalWizardry.common.AlchemicalWizardry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
|
||||
public class StandardFillingAgent extends WeakFillingAgent
|
||||
{
|
||||
public class StandardFillingAgent extends WeakFillingAgent {
|
||||
public StandardFillingAgent(int par1)
|
||||
{
|
||||
super(par1);
|
||||
|
@ -24,7 +23,7 @@ public class StandardFillingAgent extends WeakFillingAgent
|
|||
|
||||
if (potionEffects >= 1 && potionEffects <= 3)
|
||||
{
|
||||
return (int)(4 * (Math.pow(0.5f, potionEffects - 1) + 0.01f));
|
||||
return (int) (4 * (Math.pow(0.5f, potionEffects - 1) + 0.01f));
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
package WayofTime.alchemicalWizardry.common.items.potion;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
|
||||
public class WeakBindingAgent extends StandardBindingAgent
|
||||
{
|
||||
public class WeakBindingAgent extends StandardBindingAgent {
|
||||
public WeakBindingAgent(int id)
|
||||
{
|
||||
super(id);
|
||||
|
|
|
@ -1,24 +1,21 @@
|
|||
package WayofTime.alchemicalWizardry.common.items.potion;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.IFillingAgent;
|
||||
import WayofTime.alchemicalWizardry.common.alchemy.AlchemyRecipeRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import org.lwjgl.input.Keyboard;
|
||||
|
||||
public class WeakFillingAgent extends Item implements IFillingAgent
|
||||
{
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
public class WeakFillingAgent extends Item implements IFillingAgent {
|
||||
public WeakFillingAgent(int par1)
|
||||
{
|
||||
super(par1);
|
||||
|
@ -39,9 +36,8 @@ public class WeakFillingAgent extends Item implements IFillingAgent
|
|||
{
|
||||
if (rand.nextFloat() > 0.5f)
|
||||
{
|
||||
return(4 - potionEffects);
|
||||
}
|
||||
else
|
||||
return (4 - potionEffects);
|
||||
} else
|
||||
{
|
||||
return 3 - potionEffects;
|
||||
}
|
||||
|
@ -70,7 +66,7 @@ public class WeakFillingAgent extends Item implements IFillingAgent
|
|||
{
|
||||
par3List.add(EnumChatFormatting.BLUE + "Recipe:");
|
||||
|
||||
for (ItemStack item: recipe)
|
||||
for (ItemStack item : recipe)
|
||||
{
|
||||
if (item != null)
|
||||
{
|
||||
|
@ -78,8 +74,7 @@ public class WeakFillingAgent extends Item implements IFillingAgent
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
par3List.add("-Press " + EnumChatFormatting.BLUE + "shift" + EnumChatFormatting.GRAY + " for Recipe-");
|
||||
}
|
||||
|
|
|
@ -1,20 +1,19 @@
|
|||
package WayofTime.alchemicalWizardry.common.items.sigil;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.common.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.ArmourUpgrade;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class AirSigil extends EnergyItems implements ArmourUpgrade
|
||||
{
|
||||
import java.util.List;
|
||||
|
||||
public class AirSigil extends EnergyItems implements ArmourUpgrade {
|
||||
private int energyUsed;
|
||||
|
||||
public AirSigil(int id)
|
||||
|
@ -66,7 +65,7 @@ public class AirSigil extends EnergyItems implements ArmourUpgrade
|
|||
par3EntityPlayer.motionX = vec.xCoord * wantedVelocity;
|
||||
par3EntityPlayer.motionY = vec.yCoord * wantedVelocity;
|
||||
par3EntityPlayer.motionZ = vec.zCoord * wantedVelocity;
|
||||
par2World.playSoundEffect((double)((float)par3EntityPlayer.posX + 0.5F), (double)((float)par3EntityPlayer.posY + 0.5F), (double)((float)par3EntityPlayer.posZ + 0.5F), "random.fizz", 0.5F, 2.6F + (par2World.rand.nextFloat() - par2World.rand.nextFloat()) * 0.8F);
|
||||
par2World.playSoundEffect((double) ((float) par3EntityPlayer.posX + 0.5F), (double) ((float) par3EntityPlayer.posY + 0.5F), (double) ((float) par3EntityPlayer.posZ + 0.5F), "random.fizz", 0.5F, 2.6F + (par2World.rand.nextFloat() - par2World.rand.nextFloat()) * 0.8F);
|
||||
par3EntityPlayer.fallDistance = 0;
|
||||
|
||||
if (!par3EntityPlayer.capabilities.isCreativeMode)
|
||||
|
@ -74,8 +73,7 @@ public class AirSigil extends EnergyItems implements ArmourUpgrade
|
|||
if (!EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed()))
|
||||
{
|
||||
}
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
|
|
@ -1,7 +1,12 @@
|
|||
package WayofTime.alchemicalWizardry.common.items.sigil;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.ArmourUpgrade;
|
||||
import WayofTime.alchemicalWizardry.common.PacketHandler;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
|
||||
import cpw.mods.fml.common.network.PacketDispatcher;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
|
@ -10,16 +15,10 @@ import net.minecraft.nbt.NBTTagCompound;
|
|||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.common.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.ArmourUpgrade;
|
||||
import WayofTime.alchemicalWizardry.common.PacketHandler;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
|
||||
import cpw.mods.fml.common.network.PacketDispatcher;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class DivinationSigil extends Item implements ArmourUpgrade
|
||||
{
|
||||
import java.util.List;
|
||||
|
||||
public class DivinationSigil extends Item implements ArmourUpgrade {
|
||||
public DivinationSigil(int par1)
|
||||
{
|
||||
super(par1);
|
||||
|
|
|
@ -1,21 +1,21 @@
|
|||
package WayofTime.alchemicalWizardry.common.items.sigil;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.ModBlocks;
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.EntityBloodLightProjectile;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.common.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.EntityBloodLightProjectile;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemBloodLightSigil extends EnergyItems
|
||||
{
|
||||
import java.util.List;
|
||||
|
||||
public class ItemBloodLightSigil extends EnergyItems {
|
||||
private int tickDelay = 100;
|
||||
|
||||
public ItemBloodLightSigil(int id)
|
||||
|
@ -59,32 +59,32 @@ public class ItemBloodLightSigil extends EnergyItems
|
|||
|
||||
if (par7 == 0 && par3World.isAirBlock(par4, par5 - 1, par6))
|
||||
{
|
||||
par3World.setBlock(par4, par5 - 1, par6, AlchemicalWizardry.blockBloodLight.blockID);
|
||||
par3World.setBlock(par4, par5 - 1, par6, ModBlocks.blockBloodLight.blockID);
|
||||
}
|
||||
|
||||
if (par7 == 1 && par3World.isAirBlock(par4, par5 + 1, par6))
|
||||
{
|
||||
par3World.setBlock(par4, par5 + 1, par6, AlchemicalWizardry.blockBloodLight.blockID);
|
||||
par3World.setBlock(par4, par5 + 1, par6, ModBlocks.blockBloodLight.blockID);
|
||||
}
|
||||
|
||||
if (par7 == 2 && par3World.isAirBlock(par4, par5, par6 - 1))
|
||||
{
|
||||
par3World.setBlock(par4, par5, par6 - 1 , AlchemicalWizardry.blockBloodLight.blockID);
|
||||
par3World.setBlock(par4, par5, par6 - 1, ModBlocks.blockBloodLight.blockID);
|
||||
}
|
||||
|
||||
if (par7 == 3 && par3World.isAirBlock(par4, par5, par6 + 1))
|
||||
{
|
||||
par3World.setBlock(par4, par5, par6 + 1 , AlchemicalWizardry.blockBloodLight.blockID);
|
||||
par3World.setBlock(par4, par5, par6 + 1, ModBlocks.blockBloodLight.blockID);
|
||||
}
|
||||
|
||||
if (par7 == 4 && par3World.isAirBlock(par4 - 1, par5, par6))
|
||||
{
|
||||
par3World.setBlock(par4 - 1, par5, par6, AlchemicalWizardry.blockBloodLight.blockID);
|
||||
par3World.setBlock(par4 - 1, par5, par6, ModBlocks.blockBloodLight.blockID);
|
||||
}
|
||||
|
||||
if (par7 == 5 && par3World.isAirBlock(par4 + 1, par5, par6))
|
||||
{
|
||||
par3World.setBlock(par4 + 1, par5, par6, AlchemicalWizardry.blockBloodLight.blockID);
|
||||
par3World.setBlock(par4 + 1, par5, par6, ModBlocks.blockBloodLight.blockID);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
@ -123,7 +123,7 @@ public class ItemBloodLightSigil extends EnergyItems
|
|||
return;
|
||||
}
|
||||
|
||||
EntityPlayer par3EntityPlayer = (EntityPlayer)par3Entity;
|
||||
EntityPlayer par3EntityPlayer = (EntityPlayer) par3Entity;
|
||||
|
||||
if (par1ItemStack.stackTagCompound == null)
|
||||
{
|
||||
|
@ -134,7 +134,7 @@ public class ItemBloodLightSigil extends EnergyItems
|
|||
{
|
||||
if (par2World.getWorldTime() % tickDelay == par1ItemStack.stackTagCompound.getInteger("worldTimeDelay") && par3Entity instanceof EntityPlayer)
|
||||
{
|
||||
EnergyItems.syphonBatteries(par1ItemStack, (EntityPlayer)par3Entity, getEnergyUsed());
|
||||
EnergyItems.syphonBatteries(par1ItemStack, (EntityPlayer) par3Entity, getEnergyUsed());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,11 @@
|
|||
package WayofTime.alchemicalWizardry.common.items.sigil;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.ArmourUpgrade;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyBattery;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
@ -13,16 +17,13 @@ import net.minecraft.potion.PotionEffect;
|
|||
import net.minecraft.util.EnumMovingObjectType;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.common.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.ArmourUpgrade;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyBattery;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class LavaSigil extends ItemBucket implements ArmourUpgrade
|
||||
{
|
||||
/** field for checking if the bucket has been filled. */
|
||||
import java.util.List;
|
||||
|
||||
public class LavaSigil extends ItemBucket implements ArmourUpgrade {
|
||||
/**
|
||||
* field for checking if the bucket has been filled.
|
||||
*/
|
||||
private int isFull = Block.lavaMoving.blockID;
|
||||
private int energyUsed;
|
||||
|
||||
|
@ -76,17 +77,16 @@ public class LavaSigil extends ItemBucket implements ArmourUpgrade
|
|||
}
|
||||
|
||||
float f = 1.0F;
|
||||
double d0 = par3EntityPlayer.prevPosX + (par3EntityPlayer.posX - par3EntityPlayer.prevPosX) * (double)f;
|
||||
double d1 = par3EntityPlayer.prevPosY + (par3EntityPlayer.posY - par3EntityPlayer.prevPosY) * (double)f + 1.62D - (double)par3EntityPlayer.yOffset;
|
||||
double d2 = par3EntityPlayer.prevPosZ + (par3EntityPlayer.posZ - par3EntityPlayer.prevPosZ) * (double)f;
|
||||
double d0 = par3EntityPlayer.prevPosX + (par3EntityPlayer.posX - par3EntityPlayer.prevPosX) * (double) f;
|
||||
double d1 = par3EntityPlayer.prevPosY + (par3EntityPlayer.posY - par3EntityPlayer.prevPosY) * (double) f + 1.62D - (double) par3EntityPlayer.yOffset;
|
||||
double d2 = par3EntityPlayer.prevPosZ + (par3EntityPlayer.posZ - par3EntityPlayer.prevPosZ) * (double) f;
|
||||
boolean flag = this.isFull == 0;
|
||||
MovingObjectPosition movingobjectposition = this.getMovingObjectPositionFromPlayer(par2World, par3EntityPlayer, flag);
|
||||
|
||||
if (movingobjectposition == null)
|
||||
{
|
||||
return par1ItemStack;
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
if (movingobjectposition.typeOfHit == EnumMovingObjectType.TILE)
|
||||
{
|
||||
|
@ -102,8 +102,7 @@ public class LavaSigil extends ItemBucket implements ArmourUpgrade
|
|||
if (this.isFull == 0)
|
||||
{
|
||||
//Empty
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
if (movingobjectposition.sideHit == 0)
|
||||
{
|
||||
|
@ -147,8 +146,7 @@ public class LavaSigil extends ItemBucket implements ArmourUpgrade
|
|||
if (!EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed()))
|
||||
{
|
||||
}
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
@ -168,16 +166,13 @@ public class LavaSigil extends ItemBucket implements ArmourUpgrade
|
|||
if (this.isFull <= 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else if (!par1World.isAirBlock(par8, par9, par10) && par1World.getBlockMaterial(par8, par9, par10).isSolid())
|
||||
} else if (!par1World.isAirBlock(par8, par9, par10) && par1World.getBlockMaterial(par8, par9, par10).isSolid())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else if ((par1World.getBlockId(par8, par9, par10) == Block.lavaMoving.blockID || par1World.getBlockId(par8, par9, par10) == Block.lavaStill.blockID) && par1World.getBlockMetadata(par8, par9, par10) == 0)
|
||||
} else if ((par1World.getBlockId(par8, par9, par10) == Block.lavaMoving.blockID || par1World.getBlockId(par8, par9, par10) == Block.lavaStill.blockID) && par1World.getBlockMetadata(par8, par9, par10) == 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
par1World.setBlock(par8, par9, par10, this.isFull, 0, 3);
|
||||
return true;
|
||||
|
@ -196,7 +191,7 @@ public class LavaSigil extends ItemBucket implements ArmourUpgrade
|
|||
//Heals the player using the item. If the player is at full health, or if the durability cannot be used any more,
|
||||
//the item is not used.
|
||||
|
||||
// protected void damagePlayer(World world, EntityPlayer player, int damage)
|
||||
// protected void damagePlayer(World world, EntityPlayer player, int damage)
|
||||
// {
|
||||
// if (world != null)
|
||||
// {
|
||||
|
@ -258,8 +253,7 @@ public class LavaSigil extends ItemBucket implements ArmourUpgrade
|
|||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
package WayofTime.alchemicalWizardry.common.items.sigil;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
@ -11,17 +13,15 @@ import net.minecraft.potion.Potion;
|
|||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.common.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class SigilOfElementalAffinity extends EnergyItems
|
||||
{
|
||||
import java.util.List;
|
||||
|
||||
public class SigilOfElementalAffinity extends EnergyItems {
|
||||
@SideOnly(Side.CLIENT)
|
||||
private static Icon activeIcon;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private static Icon passiveIcon;
|
||||
|
||||
public SigilOfElementalAffinity(int id)
|
||||
{
|
||||
super(id);
|
||||
|
@ -42,8 +42,7 @@ public class SigilOfElementalAffinity extends EnergyItems
|
|||
if (par1ItemStack.stackTagCompound.getBoolean("isActive"))
|
||||
{
|
||||
par3List.add("Activated");
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
par3List.add("Deactivated");
|
||||
}
|
||||
|
@ -74,8 +73,7 @@ public class SigilOfElementalAffinity extends EnergyItems
|
|||
if (tag.getBoolean("isActive"))
|
||||
{
|
||||
return this.activeIcon;
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
return this.passiveIcon;
|
||||
}
|
||||
|
@ -88,8 +86,7 @@ public class SigilOfElementalAffinity extends EnergyItems
|
|||
if (par1 == 1)
|
||||
{
|
||||
return this.activeIcon;
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
return this.passiveIcon;
|
||||
}
|
||||
|
@ -116,7 +113,7 @@ public class SigilOfElementalAffinity extends EnergyItems
|
|||
if (tag.getBoolean("isActive"))
|
||||
{
|
||||
par1ItemStack.setItemDamage(1);
|
||||
tag.setInteger("worldTimeDelay", (int)(par2World.getWorldTime() - 1) % 200);
|
||||
tag.setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % 200);
|
||||
par3EntityPlayer.addPotionEffect(new PotionEffect(Potion.waterBreathing.id, 2, 0, true));
|
||||
par3EntityPlayer.addPotionEffect(new PotionEffect(Potion.fireResistance.id, 2, 0, true));
|
||||
|
||||
|
@ -128,8 +125,7 @@ public class SigilOfElementalAffinity extends EnergyItems
|
|||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
par1ItemStack.setItemDamage(par1ItemStack.getMaxDamage());
|
||||
}
|
||||
|
@ -145,7 +141,7 @@ public class SigilOfElementalAffinity extends EnergyItems
|
|||
return;
|
||||
}
|
||||
|
||||
EntityPlayer par3EntityPlayer = (EntityPlayer)par3Entity;
|
||||
EntityPlayer par3EntityPlayer = (EntityPlayer) par3Entity;
|
||||
|
||||
if (par1ItemStack.stackTagCompound == null)
|
||||
{
|
||||
|
|
|
@ -1,14 +1,11 @@
|
|||
package WayofTime.alchemicalWizardry.common.items.sigil;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockCocoa;
|
||||
import net.minecraft.block.BlockCrops;
|
||||
import net.minecraft.block.BlockDirectional;
|
||||
import net.minecraft.block.BlockMushroom;
|
||||
import net.minecraft.block.BlockSapling;
|
||||
import net.minecraft.block.BlockStem;
|
||||
import WayofTime.alchemicalWizardry.common.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.ArmourUpgrade;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.*;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
@ -21,14 +18,10 @@ import net.minecraftforge.common.IPlantable;
|
|||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.event.Event.Result;
|
||||
import net.minecraftforge.event.entity.player.BonemealEvent;
|
||||
import WayofTime.alchemicalWizardry.common.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.ArmourUpgrade;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class SigilOfGrowth extends EnergyItems implements ArmourUpgrade
|
||||
{
|
||||
import java.util.List;
|
||||
|
||||
public class SigilOfGrowth extends EnergyItems implements ArmourUpgrade {
|
||||
private static Icon activeIcon;
|
||||
private static Icon passiveIcon;
|
||||
private int tickDelay = 100;
|
||||
|
@ -54,8 +47,7 @@ public class SigilOfGrowth extends EnergyItems implements ArmourUpgrade
|
|||
if (par1ItemStack.stackTagCompound.getBoolean("isActive"))
|
||||
{
|
||||
par3List.add("Activated");
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
par3List.add("Deactivated");
|
||||
}
|
||||
|
@ -86,8 +78,7 @@ public class SigilOfGrowth extends EnergyItems implements ArmourUpgrade
|
|||
if (tag.getBoolean("isActive"))
|
||||
{
|
||||
return this.activeIcon;
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
return this.passiveIcon;
|
||||
}
|
||||
|
@ -100,8 +91,7 @@ public class SigilOfGrowth extends EnergyItems implements ArmourUpgrade
|
|||
if (par1 == 1)
|
||||
{
|
||||
return this.activeIcon;
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
return this.passiveIcon;
|
||||
}
|
||||
|
@ -149,14 +139,13 @@ public class SigilOfGrowth extends EnergyItems implements ArmourUpgrade
|
|||
if (tag.getBoolean("isActive"))
|
||||
{
|
||||
par1ItemStack.setItemDamage(1);
|
||||
tag.setInteger("worldTimeDelay", (int)(par2World.getWorldTime() - 1) % tickDelay);
|
||||
tag.setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % tickDelay);
|
||||
|
||||
if (!par3EntityPlayer.capabilities.isCreativeMode)
|
||||
{
|
||||
EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed());
|
||||
}
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
par1ItemStack.setItemDamage(par1ItemStack.getMaxDamage());
|
||||
}
|
||||
|
@ -172,7 +161,7 @@ public class SigilOfGrowth extends EnergyItems implements ArmourUpgrade
|
|||
return;
|
||||
}
|
||||
|
||||
EntityPlayer par3EntityPlayer = (EntityPlayer)par3Entity;
|
||||
EntityPlayer par3EntityPlayer = (EntityPlayer) par3Entity;
|
||||
|
||||
if (par1ItemStack.stackTagCompound == null)
|
||||
{
|
||||
|
@ -183,14 +172,14 @@ public class SigilOfGrowth extends EnergyItems implements ArmourUpgrade
|
|||
{
|
||||
if (par2World.getWorldTime() % tickDelay == par1ItemStack.stackTagCompound.getInteger("worldTimeDelay") && par3Entity instanceof EntityPlayer)
|
||||
{
|
||||
EnergyItems.syphonBatteries(par1ItemStack, (EntityPlayer)par3Entity, getEnergyUsed());
|
||||
EnergyItems.syphonBatteries(par1ItemStack, (EntityPlayer) par3Entity, getEnergyUsed());
|
||||
}
|
||||
|
||||
int range = 5;
|
||||
int verticalRange = 2;
|
||||
int posX = (int)Math.round(par3Entity.posX - 0.5f);
|
||||
int posY = (int)par3Entity.posY;
|
||||
int posZ = (int)Math.round(par3Entity.posZ - 0.5f);
|
||||
int posX = (int) Math.round(par3Entity.posX - 0.5f);
|
||||
int posY = (int) par3Entity.posY;
|
||||
int posZ = (int) Math.round(par3Entity.posZ - 0.5f);
|
||||
|
||||
for (int ix = posX - range; ix <= posX + range; ix++)
|
||||
{
|
||||
|
@ -235,15 +224,14 @@ public class SigilOfGrowth extends EnergyItems implements ArmourUpgrade
|
|||
{
|
||||
if (!par1World.isRemote)
|
||||
{
|
||||
if ((double)par1World.rand.nextFloat() < 0.45D)
|
||||
if ((double) par1World.rand.nextFloat() < 0.45D)
|
||||
{
|
||||
((BlockSapling)Block.sapling).markOrGrowMarked(par1World, par2, par3, par4, par1World.rand);
|
||||
((BlockSapling) Block.sapling).markOrGrowMarked(par1World, par2, par3, par4, par1World.rand);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
else if (l != Block.mushroomBrown.blockID && l != Block.mushroomRed.blockID)
|
||||
} else if (l != Block.mushroomBrown.blockID && l != Block.mushroomRed.blockID)
|
||||
{
|
||||
if (l != Block.melonStem.blockID && l != Block.pumpkinStem.blockID)
|
||||
{
|
||||
|
@ -252,18 +240,16 @@ public class SigilOfGrowth extends EnergyItems implements ArmourUpgrade
|
|||
if (par1World.getBlockMetadata(par2, par3, par4) == 7)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
if (!par1World.isRemote)
|
||||
{
|
||||
((BlockCrops)Block.blocksList[l]).fertilize(par1World, par2, par3, par4);
|
||||
((BlockCrops) Block.blocksList[l]).fertilize(par1World, par2, par3, par4);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
int i1;
|
||||
int j1;
|
||||
|
@ -278,8 +264,7 @@ public class SigilOfGrowth extends EnergyItems implements ArmourUpgrade
|
|||
if (k1 >= 2)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
if (!par1World.isRemote)
|
||||
{
|
||||
|
@ -289,12 +274,10 @@ public class SigilOfGrowth extends EnergyItems implements ArmourUpgrade
|
|||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else if (l != Block.grass.blockID)
|
||||
} else if (l != Block.grass.blockID)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
if (!par1World.isRemote)
|
||||
{
|
||||
|
@ -326,8 +309,7 @@ public class SigilOfGrowth extends EnergyItems implements ArmourUpgrade
|
|||
{
|
||||
par1World.setBlock(j1, k1, l1, Block.tallGrass.blockID, 1, 3);
|
||||
}
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
ForgeHooks.plantGrass(par1World, j1, k1, l1);
|
||||
}
|
||||
|
@ -338,28 +320,25 @@ public class SigilOfGrowth extends EnergyItems implements ArmourUpgrade
|
|||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (par1World.getBlockMetadata(par2, par3, par4) == 7)
|
||||
} else if (par1World.getBlockMetadata(par2, par3, par4) == 7)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
if (!par1World.isRemote)
|
||||
{
|
||||
((BlockStem)Block.blocksList[l]).fertilizeStem(par1World, par2, par3, par4);
|
||||
((BlockStem) Block.blocksList[l]).fertilizeStem(par1World, par2, par3, par4);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
if (!par1World.isRemote)
|
||||
{
|
||||
if ((double)par1World.rand.nextFloat() < 0.4D)
|
||||
if ((double) par1World.rand.nextFloat() < 0.4D)
|
||||
{
|
||||
((BlockMushroom)Block.blocksList[l]).fertilizeMushroom(par1World, par2, par3, par4, par1World.rand);
|
||||
((BlockMushroom) Block.blocksList[l]).fertilizeMushroom(par1World, par2, par3, par4, par1World.rand);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -372,9 +351,9 @@ public class SigilOfGrowth extends EnergyItems implements ArmourUpgrade
|
|||
{
|
||||
int range = 5;
|
||||
int verticalRange = 2;
|
||||
int posX = (int)Math.round(player.posX - 0.5f);
|
||||
int posY = (int)player.posY;
|
||||
int posZ = (int)Math.round(player.posZ - 0.5f);
|
||||
int posX = (int) Math.round(player.posX - 0.5f);
|
||||
int posY = (int) player.posY;
|
||||
int posZ = (int) Math.round(player.posZ - 0.5f);
|
||||
|
||||
for (int ix = posX - range; ix <= posX + range; ix++)
|
||||
{
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
package WayofTime.alchemicalWizardry.common.items.sigil;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.ArmourUpgrade;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
@ -10,18 +13,15 @@ import net.minecraft.nbt.NBTTagCompound;
|
|||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.common.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.ArmourUpgrade;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class SigilOfHaste extends EnergyItems implements ArmourUpgrade
|
||||
{
|
||||
import java.util.List;
|
||||
|
||||
public class SigilOfHaste extends EnergyItems implements ArmourUpgrade {
|
||||
@SideOnly(Side.CLIENT)
|
||||
private static Icon activeIcon;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private static Icon passiveIcon;
|
||||
|
||||
public SigilOfHaste(int id)
|
||||
{
|
||||
super(id);
|
||||
|
@ -41,8 +41,7 @@ public class SigilOfHaste extends EnergyItems implements ArmourUpgrade
|
|||
if (par1ItemStack.stackTagCompound.getBoolean("isActive"))
|
||||
{
|
||||
par3List.add("Activated");
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
par3List.add("Deactivated");
|
||||
}
|
||||
|
@ -73,8 +72,7 @@ public class SigilOfHaste extends EnergyItems implements ArmourUpgrade
|
|||
if (tag.getBoolean("isActive"))
|
||||
{
|
||||
return this.activeIcon;
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
return this.passiveIcon;
|
||||
}
|
||||
|
@ -87,8 +85,7 @@ public class SigilOfHaste extends EnergyItems implements ArmourUpgrade
|
|||
if (par1 == 1)
|
||||
{
|
||||
return this.activeIcon;
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
return this.passiveIcon;
|
||||
}
|
||||
|
@ -115,7 +112,7 @@ public class SigilOfHaste extends EnergyItems implements ArmourUpgrade
|
|||
if (tag.getBoolean("isActive"))
|
||||
{
|
||||
par1ItemStack.setItemDamage(1);
|
||||
tag.setInteger("worldTimeDelay", (int)(par2World.getWorldTime() - 1) % 200);
|
||||
tag.setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % 200);
|
||||
par3EntityPlayer.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionBoost.id, 3, 1));
|
||||
//par3EntityPlayer.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionProjProt.id, 2, 2));
|
||||
|
||||
|
@ -127,8 +124,7 @@ public class SigilOfHaste extends EnergyItems implements ArmourUpgrade
|
|||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
par1ItemStack.setItemDamage(par1ItemStack.getMaxDamage());
|
||||
}
|
||||
|
@ -144,7 +140,7 @@ public class SigilOfHaste extends EnergyItems implements ArmourUpgrade
|
|||
return;
|
||||
}
|
||||
|
||||
EntityPlayer par3EntityPlayer = (EntityPlayer)par3Entity;
|
||||
EntityPlayer par3EntityPlayer = (EntityPlayer) par3Entity;
|
||||
|
||||
if (par1ItemStack.stackTagCompound == null)
|
||||
{
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
package WayofTime.alchemicalWizardry.common.items.sigil;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.ModItems;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
@ -11,13 +13,11 @@ import net.minecraft.nbt.NBTTagCompound;
|
|||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.common.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class SigilOfHolding extends EnergyItems
|
||||
{
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class SigilOfHolding extends EnergyItems {
|
||||
private int invSize = 4;
|
||||
|
||||
public static List<Integer> allowedSigils = new ArrayList();
|
||||
|
@ -241,8 +241,7 @@ public class SigilOfHolding extends EnergyItems
|
|||
if (inv[i] != null)
|
||||
{
|
||||
filledSlots++;
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
@ -258,8 +257,7 @@ public class SigilOfHolding extends EnergyItems
|
|||
if (getSelectedSlot(itemStack) + 1 < filledSlots)
|
||||
{
|
||||
itemTag.setInteger("selectedSlot", itemTag.getInteger("selectedSlot") + 1);
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
itemTag.setInteger("selectedSlot", 0);
|
||||
}
|
||||
|
@ -303,7 +301,7 @@ public class SigilOfHolding extends EnergyItems
|
|||
return false;
|
||||
}
|
||||
|
||||
for (Integer i: allowedSigils)
|
||||
for (Integer i : allowedSigils)
|
||||
{
|
||||
if (i.intValue() == itemID)
|
||||
{
|
||||
|
@ -335,16 +333,16 @@ public class SigilOfHolding extends EnergyItems
|
|||
|
||||
public static void initiateSigilOfHolding()
|
||||
{
|
||||
allowedSigils.add(new Integer(AlchemicalWizardry.waterSigil.itemID));
|
||||
allowedSigils.add(new Integer(AlchemicalWizardry.lavaSigil.itemID));
|
||||
allowedSigils.add(new Integer(AlchemicalWizardry.voidSigil.itemID));
|
||||
allowedSigils.add(new Integer(AlchemicalWizardry.airSigil.itemID));
|
||||
allowedSigils.add(new Integer(AlchemicalWizardry.sigilOfTheFastMiner.itemID));
|
||||
allowedSigils.add(new Integer(AlchemicalWizardry.divinationSigil.itemID));
|
||||
allowedSigils.add(new Integer(AlchemicalWizardry.sigilOfElementalAffinity.itemID));
|
||||
allowedSigils.add(new Integer(AlchemicalWizardry.growthSigil.itemID));
|
||||
allowedSigils.add(new Integer(AlchemicalWizardry.sigilOfHaste.itemID));
|
||||
allowedSigils.add(new Integer(AlchemicalWizardry.sigilOfWind.itemID));
|
||||
allowedSigils.add(new Integer(ModItems.waterSigil.itemID));
|
||||
allowedSigils.add(new Integer(ModItems.lavaSigil.itemID));
|
||||
allowedSigils.add(new Integer(ModItems.voidSigil.itemID));
|
||||
allowedSigils.add(new Integer(ModItems.airSigil.itemID));
|
||||
allowedSigils.add(new Integer(ModItems.sigilOfTheFastMiner.itemID));
|
||||
allowedSigils.add(new Integer(ModItems.divinationSigil.itemID));
|
||||
allowedSigils.add(new Integer(ModItems.sigilOfElementalAffinity.itemID));
|
||||
allowedSigils.add(new Integer(ModItems.growthSigil.itemID));
|
||||
allowedSigils.add(new Integer(ModItems.sigilOfHaste.itemID));
|
||||
allowedSigils.add(new Integer(ModItems.sigilOfWind.itemID));
|
||||
}
|
||||
|
||||
public ItemStack getCurrentItem(ItemStack sigilItemStack)
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
package WayofTime.alchemicalWizardry.common.items.sigil;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.ArmourUpgrade;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
|
@ -11,14 +14,10 @@ import net.minecraft.nbt.NBTTagCompound;
|
|||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.common.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.ArmourUpgrade;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class SigilOfMagnetism extends EnergyItems implements ArmourUpgrade
|
||||
{
|
||||
import java.util.List;
|
||||
|
||||
public class SigilOfMagnetism extends EnergyItems implements ArmourUpgrade {
|
||||
private static Icon activeIcon;
|
||||
private static Icon passiveIcon;
|
||||
private int tickDelay = 300;
|
||||
|
@ -44,8 +43,7 @@ public class SigilOfMagnetism extends EnergyItems implements ArmourUpgrade
|
|||
if (par1ItemStack.stackTagCompound.getBoolean("isActive"))
|
||||
{
|
||||
par3List.add("Activated");
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
par3List.add("Deactivated");
|
||||
}
|
||||
|
@ -76,8 +74,7 @@ public class SigilOfMagnetism extends EnergyItems implements ArmourUpgrade
|
|||
if (tag.getBoolean("isActive"))
|
||||
{
|
||||
return this.activeIcon;
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
return this.passiveIcon;
|
||||
}
|
||||
|
@ -90,8 +87,7 @@ public class SigilOfMagnetism extends EnergyItems implements ArmourUpgrade
|
|||
if (par1 == 1)
|
||||
{
|
||||
return this.activeIcon;
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
return this.passiveIcon;
|
||||
}
|
||||
|
@ -135,14 +131,13 @@ public class SigilOfMagnetism extends EnergyItems implements ArmourUpgrade
|
|||
if (tag.getBoolean("isActive"))
|
||||
{
|
||||
par1ItemStack.setItemDamage(1);
|
||||
tag.setInteger("worldTimeDelay", (int)(par2World.getWorldTime() - 1) % tickDelay);
|
||||
tag.setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % tickDelay);
|
||||
|
||||
if (!par3EntityPlayer.capabilities.isCreativeMode)
|
||||
{
|
||||
EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed());
|
||||
}
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
par1ItemStack.setItemDamage(par1ItemStack.getMaxDamage());
|
||||
}
|
||||
|
@ -158,7 +153,7 @@ public class SigilOfMagnetism extends EnergyItems implements ArmourUpgrade
|
|||
return;
|
||||
}
|
||||
|
||||
EntityPlayer par3EntityPlayer = (EntityPlayer)par3Entity;
|
||||
EntityPlayer par3EntityPlayer = (EntityPlayer) par3Entity;
|
||||
|
||||
if (par1ItemStack.stackTagCompound == null)
|
||||
{
|
||||
|
@ -169,13 +164,13 @@ public class SigilOfMagnetism extends EnergyItems implements ArmourUpgrade
|
|||
{
|
||||
if (par2World.getWorldTime() % tickDelay == par1ItemStack.stackTagCompound.getInteger("worldTimeDelay") && par3Entity instanceof EntityPlayer)
|
||||
{
|
||||
EnergyItems.syphonBatteries(par1ItemStack, (EntityPlayer)par3Entity, getEnergyUsed());
|
||||
EnergyItems.syphonBatteries(par1ItemStack, (EntityPlayer) par3Entity, getEnergyUsed());
|
||||
}
|
||||
|
||||
int range = 5;
|
||||
int verticalRange = 5;
|
||||
float posX = Math.round(par3Entity.posX);
|
||||
float posY = (float)(par3Entity.posY - par3Entity.getEyeHeight());
|
||||
float posY = (float) (par3Entity.posY - par3Entity.getEyeHeight());
|
||||
float posZ = Math.round(par3Entity.posZ);
|
||||
List<EntityItem> entities = par3EntityPlayer.worldObj.getEntitiesWithinAABB(EntityItem.class, AxisAlignedBB.getBoundingBox(posX - 0.5f, posY - 0.5f, posZ - 0.5f, posX + 0.5f, posY + 0.5f, posZ + 0.5f).expand(range, verticalRange, range));
|
||||
|
||||
|
@ -197,7 +192,7 @@ public class SigilOfMagnetism extends EnergyItems implements ArmourUpgrade
|
|||
int range = 5;
|
||||
int verticalRange = 5;
|
||||
float posX = Math.round(player.posX);
|
||||
float posY = (float)(player.posY - player.getEyeHeight());
|
||||
float posY = (float) (player.posY - player.getEyeHeight());
|
||||
float posZ = Math.round(player.posZ);
|
||||
List<EntityItem> entities = player.worldObj.getEntitiesWithinAABB(EntityItem.class, AxisAlignedBB.getBoundingBox(posX - 0.5f, posY - 0.5f, posZ - 0.5f, posX + 0.5f, posY + 0.5f, posZ + 0.5f).expand(range, verticalRange, range));
|
||||
|
||||
|
|
|
@ -1,7 +1,11 @@
|
|||
package WayofTime.alchemicalWizardry.common.items.sigil;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.ArmourUpgrade;
|
||||
import WayofTime.alchemicalWizardry.common.ModBlocks;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
@ -10,14 +14,10 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.common.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.ArmourUpgrade;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class SigilOfTheBridge extends EnergyItems implements ArmourUpgrade
|
||||
{
|
||||
import java.util.List;
|
||||
|
||||
public class SigilOfTheBridge extends EnergyItems implements ArmourUpgrade {
|
||||
private static Icon activeIcon;
|
||||
private static Icon passiveIcon;
|
||||
private int tickDelay = 200;
|
||||
|
@ -43,8 +43,7 @@ public class SigilOfTheBridge extends EnergyItems implements ArmourUpgrade
|
|||
if (par1ItemStack.stackTagCompound.getBoolean("isActive"))
|
||||
{
|
||||
par3List.add("Activated");
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
par3List.add("Deactivated");
|
||||
}
|
||||
|
@ -75,8 +74,7 @@ public class SigilOfTheBridge extends EnergyItems implements ArmourUpgrade
|
|||
if (tag.getBoolean("isActive"))
|
||||
{
|
||||
return this.activeIcon;
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
return this.passiveIcon;
|
||||
}
|
||||
|
@ -89,8 +87,7 @@ public class SigilOfTheBridge extends EnergyItems implements ArmourUpgrade
|
|||
if (par1 == 1)
|
||||
{
|
||||
return this.activeIcon;
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
return this.passiveIcon;
|
||||
}
|
||||
|
@ -134,14 +131,13 @@ public class SigilOfTheBridge extends EnergyItems implements ArmourUpgrade
|
|||
if (tag.getBoolean("isActive"))
|
||||
{
|
||||
par1ItemStack.setItemDamage(1);
|
||||
tag.setInteger("worldTimeDelay", (int)(par2World.getWorldTime() - 1) % tickDelay);
|
||||
tag.setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % tickDelay);
|
||||
|
||||
if (!par3EntityPlayer.capabilities.isCreativeMode)
|
||||
{
|
||||
EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed());
|
||||
}
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
par1ItemStack.setItemDamage(par1ItemStack.getMaxDamage());
|
||||
}
|
||||
|
@ -157,7 +153,7 @@ public class SigilOfTheBridge extends EnergyItems implements ArmourUpgrade
|
|||
return;
|
||||
}
|
||||
|
||||
EntityPlayer par3EntityPlayer = (EntityPlayer)par3Entity;
|
||||
EntityPlayer par3EntityPlayer = (EntityPlayer) par3Entity;
|
||||
|
||||
if (par1ItemStack.stackTagCompound == null)
|
||||
{
|
||||
|
@ -168,7 +164,7 @@ public class SigilOfTheBridge extends EnergyItems implements ArmourUpgrade
|
|||
{
|
||||
if (par2World.getWorldTime() % tickDelay == par1ItemStack.stackTagCompound.getInteger("worldTimeDelay") && par3Entity instanceof EntityPlayer)
|
||||
{
|
||||
EnergyItems.syphonBatteries(par1ItemStack, (EntityPlayer)par3Entity, this.getLPUsed(par1ItemStack));
|
||||
EnergyItems.syphonBatteries(par1ItemStack, (EntityPlayer) par3Entity, this.getLPUsed(par1ItemStack));
|
||||
this.setLPUsed(par1ItemStack, 0);
|
||||
}
|
||||
|
||||
|
@ -194,9 +190,9 @@ public class SigilOfTheBridge extends EnergyItems implements ArmourUpgrade
|
|||
verticalOffset--;
|
||||
}
|
||||
|
||||
int posX = (int)Math.round(par3Entity.posX - 0.5f);
|
||||
int posY = (int)par3Entity.posY;
|
||||
int posZ = (int)Math.round(par3Entity.posZ - 0.5f);
|
||||
int posX = (int) Math.round(par3Entity.posX - 0.5f);
|
||||
int posY = (int) par3Entity.posY;
|
||||
int posZ = (int) Math.round(par3Entity.posZ - 0.5f);
|
||||
int incremented = 0;
|
||||
|
||||
for (int ix = posX - range; ix <= posX + range; ix++)
|
||||
|
@ -210,7 +206,7 @@ public class SigilOfTheBridge extends EnergyItems implements ArmourUpgrade
|
|||
|
||||
if (par2World.isAirBlock(ix, posY + verticalOffset, iz))
|
||||
{
|
||||
par2World.setBlock(ix, posY + verticalOffset, iz, AlchemicalWizardry.spectralBlock.blockID, 0, 3);
|
||||
par2World.setBlock(ix, posY + verticalOffset, iz, ModBlocks.spectralBlock.blockID, 0, 3);
|
||||
|
||||
if (par2World.rand.nextInt(2) == 0)
|
||||
{
|
||||
|
@ -273,9 +269,9 @@ public class SigilOfTheBridge extends EnergyItems implements ArmourUpgrade
|
|||
verticalOffset--;
|
||||
}
|
||||
|
||||
int posX = (int)Math.round(player.posX - 0.5f);
|
||||
int posY = (int)player.posY;
|
||||
int posZ = (int)Math.round(player.posZ - 0.5f);
|
||||
int posX = (int) Math.round(player.posX - 0.5f);
|
||||
int posY = (int) player.posY;
|
||||
int posZ = (int) Math.round(player.posZ - 0.5f);
|
||||
|
||||
//int incremented = 0;
|
||||
|
||||
|
@ -290,7 +286,7 @@ public class SigilOfTheBridge extends EnergyItems implements ArmourUpgrade
|
|||
|
||||
if (world.isAirBlock(ix, posY + verticalOffset, iz))
|
||||
{
|
||||
world.setBlock(ix, posY + verticalOffset, iz, AlchemicalWizardry.spectralBlock.blockID, 0, 3);
|
||||
world.setBlock(ix, posY + verticalOffset, iz, ModBlocks.spectralBlock.blockID, 0, 3);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
package WayofTime.alchemicalWizardry.common.items.sigil;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.ArmourUpgrade;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
@ -11,18 +14,15 @@ import net.minecraft.potion.Potion;
|
|||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.common.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.ArmourUpgrade;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class SigilOfTheFastMiner extends EnergyItems implements ArmourUpgrade
|
||||
{
|
||||
import java.util.List;
|
||||
|
||||
public class SigilOfTheFastMiner extends EnergyItems implements ArmourUpgrade {
|
||||
@SideOnly(Side.CLIENT)
|
||||
private static Icon activeIcon;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private static Icon passiveIcon;
|
||||
|
||||
public SigilOfTheFastMiner(int id)
|
||||
{
|
||||
super(id);
|
||||
|
@ -42,8 +42,7 @@ public class SigilOfTheFastMiner extends EnergyItems implements ArmourUpgrade
|
|||
if (par1ItemStack.stackTagCompound.getBoolean("isActive"))
|
||||
{
|
||||
par3List.add("Activated");
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
par3List.add("Deactivated");
|
||||
}
|
||||
|
@ -74,8 +73,7 @@ public class SigilOfTheFastMiner extends EnergyItems implements ArmourUpgrade
|
|||
if (tag.getBoolean("isActive"))
|
||||
{
|
||||
return this.activeIcon;
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
return this.passiveIcon;
|
||||
}
|
||||
|
@ -88,8 +86,7 @@ public class SigilOfTheFastMiner extends EnergyItems implements ArmourUpgrade
|
|||
if (par1 == 1)
|
||||
{
|
||||
return this.activeIcon;
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
return this.passiveIcon;
|
||||
}
|
||||
|
@ -116,7 +113,7 @@ public class SigilOfTheFastMiner extends EnergyItems implements ArmourUpgrade
|
|||
if (tag.getBoolean("isActive"))
|
||||
{
|
||||
par1ItemStack.setItemDamage(1);
|
||||
tag.setInteger("worldTimeDelay", (int)(par2World.getWorldTime() - 1) % 200);
|
||||
tag.setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % 200);
|
||||
par3EntityPlayer.addPotionEffect(new PotionEffect(Potion.digSpeed.id, 2, 1, true));
|
||||
|
||||
//Test with added health boost
|
||||
|
@ -127,8 +124,7 @@ public class SigilOfTheFastMiner extends EnergyItems implements ArmourUpgrade
|
|||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
par1ItemStack.setItemDamage(par1ItemStack.getMaxDamage());
|
||||
}
|
||||
|
@ -144,7 +140,7 @@ public class SigilOfTheFastMiner extends EnergyItems implements ArmourUpgrade
|
|||
return;
|
||||
}
|
||||
|
||||
EntityPlayer par3EntityPlayer = (EntityPlayer)par3Entity;
|
||||
EntityPlayer par3EntityPlayer = (EntityPlayer) par3Entity;
|
||||
|
||||
if (par1ItemStack.stackTagCompound == null)
|
||||
{
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
package WayofTime.alchemicalWizardry.common.items.sigil;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.ArmourUpgrade;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
@ -10,18 +13,15 @@ import net.minecraft.nbt.NBTTagCompound;
|
|||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.common.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.ArmourUpgrade;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class SigilOfWind extends EnergyItems implements ArmourUpgrade
|
||||
{
|
||||
import java.util.List;
|
||||
|
||||
public class SigilOfWind extends EnergyItems implements ArmourUpgrade {
|
||||
@SideOnly(Side.CLIENT)
|
||||
private static Icon activeIcon;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private static Icon passiveIcon;
|
||||
|
||||
public SigilOfWind(int id)
|
||||
{
|
||||
super(id);
|
||||
|
@ -41,8 +41,7 @@ public class SigilOfWind extends EnergyItems implements ArmourUpgrade
|
|||
if (par1ItemStack.stackTagCompound.getBoolean("isActive"))
|
||||
{
|
||||
par3List.add("Activated");
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
par3List.add("Deactivated");
|
||||
}
|
||||
|
@ -73,8 +72,7 @@ public class SigilOfWind extends EnergyItems implements ArmourUpgrade
|
|||
if (tag.getBoolean("isActive"))
|
||||
{
|
||||
return this.activeIcon;
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
return this.passiveIcon;
|
||||
}
|
||||
|
@ -87,8 +85,7 @@ public class SigilOfWind extends EnergyItems implements ArmourUpgrade
|
|||
if (par1 == 1)
|
||||
{
|
||||
return this.activeIcon;
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
return this.passiveIcon;
|
||||
}
|
||||
|
@ -115,7 +112,7 @@ public class SigilOfWind extends EnergyItems implements ArmourUpgrade
|
|||
if (tag.getBoolean("isActive"))
|
||||
{
|
||||
par1ItemStack.setItemDamage(1);
|
||||
tag.setInteger("worldTimeDelay", (int)(par2World.getWorldTime() - 1) % 200);
|
||||
tag.setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % 200);
|
||||
par3EntityPlayer.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionProjProt.id, 2, 1));
|
||||
//par3EntityPlayer.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionProjProt.id, 2, 2));
|
||||
|
||||
|
@ -127,8 +124,7 @@ public class SigilOfWind extends EnergyItems implements ArmourUpgrade
|
|||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
par1ItemStack.setItemDamage(par1ItemStack.getMaxDamage());
|
||||
}
|
||||
|
@ -144,7 +140,7 @@ public class SigilOfWind extends EnergyItems implements ArmourUpgrade
|
|||
return;
|
||||
}
|
||||
|
||||
EntityPlayer par3EntityPlayer = (EntityPlayer)par3Entity;
|
||||
EntityPlayer par3EntityPlayer = (EntityPlayer) par3Entity;
|
||||
|
||||
if (par1ItemStack.stackTagCompound == null)
|
||||
{
|
||||
|
|
|
@ -1,7 +1,11 @@
|
|||
package WayofTime.alchemicalWizardry.common.items.sigil;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.ArmourUpgrade;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyBattery;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.material.MaterialLiquid;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
@ -13,17 +17,13 @@ import net.minecraft.util.MovingObjectPosition;
|
|||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.event.entity.player.FillBucketEvent;
|
||||
import WayofTime.alchemicalWizardry.common.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.ArmourUpgrade;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyBattery;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class VoidSigil extends ItemBucket implements ArmourUpgrade
|
||||
{
|
||||
import java.util.List;
|
||||
|
||||
public class VoidSigil extends ItemBucket implements ArmourUpgrade {
|
||||
private int isFull;
|
||||
private int energyUsed;
|
||||
|
||||
public VoidSigil(int id)
|
||||
{
|
||||
super(id, 0);
|
||||
|
@ -71,7 +71,7 @@ public class VoidSigil extends ItemBucket implements ArmourUpgrade
|
|||
return this.energyUsed;
|
||||
}
|
||||
|
||||
// protected void damagePlayer(World world, EntityPlayer player, int damage)
|
||||
// protected void damagePlayer(World world, EntityPlayer player, int damage)
|
||||
// {
|
||||
// if (world != null)
|
||||
// {
|
||||
|
@ -133,8 +133,7 @@ public class VoidSigil extends ItemBucket implements ArmourUpgrade
|
|||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@ -151,17 +150,16 @@ public class VoidSigil extends ItemBucket implements ArmourUpgrade
|
|||
}
|
||||
|
||||
float f = 1.0F;
|
||||
double d0 = par3EntityPlayer.prevPosX + (par3EntityPlayer.posX - par3EntityPlayer.prevPosX) * (double)f;
|
||||
double d1 = par3EntityPlayer.prevPosY + (par3EntityPlayer.posY - par3EntityPlayer.prevPosY) * (double)f + 1.62D - (double)par3EntityPlayer.yOffset;
|
||||
double d2 = par3EntityPlayer.prevPosZ + (par3EntityPlayer.posZ - par3EntityPlayer.prevPosZ) * (double)f;
|
||||
double d0 = par3EntityPlayer.prevPosX + (par3EntityPlayer.posX - par3EntityPlayer.prevPosX) * (double) f;
|
||||
double d1 = par3EntityPlayer.prevPosY + (par3EntityPlayer.posY - par3EntityPlayer.prevPosY) * (double) f + 1.62D - (double) par3EntityPlayer.yOffset;
|
||||
double d2 = par3EntityPlayer.prevPosZ + (par3EntityPlayer.posZ - par3EntityPlayer.prevPosZ) * (double) f;
|
||||
boolean flag = this.isFull == 0;
|
||||
MovingObjectPosition movingobjectposition = this.getMovingObjectPositionFromPlayer(par2World, par3EntityPlayer, flag);
|
||||
|
||||
if (movingobjectposition == null)
|
||||
{
|
||||
return par1ItemStack;
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
FillBucketEvent event = new FillBucketEvent(par3EntityPlayer, par1ItemStack, par2World, movingobjectposition);
|
||||
|
||||
|
@ -197,8 +195,7 @@ public class VoidSigil extends ItemBucket implements ArmourUpgrade
|
|||
if (!EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed()))
|
||||
{
|
||||
}
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
package WayofTime.alchemicalWizardry.common.items.sigil;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.ArmourUpgrade;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
@ -13,15 +16,13 @@ import net.minecraft.potion.PotionEffect;
|
|||
import net.minecraft.util.EnumMovingObjectType;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.common.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.ArmourUpgrade;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class WaterSigil extends ItemBucket implements ArmourUpgrade
|
||||
{
|
||||
/** field for checking if the bucket has been filled. */
|
||||
import java.util.List;
|
||||
|
||||
public class WaterSigil extends ItemBucket implements ArmourUpgrade {
|
||||
/**
|
||||
* field for checking if the bucket has been filled.
|
||||
*/
|
||||
private int isFull = Block.waterMoving.blockID;
|
||||
private int energyUsed;
|
||||
|
||||
|
@ -83,17 +84,16 @@ public class WaterSigil extends ItemBucket implements ArmourUpgrade
|
|||
}
|
||||
|
||||
float f = 1.0F;
|
||||
double d0 = par3EntityPlayer.prevPosX + (par3EntityPlayer.posX - par3EntityPlayer.prevPosX) * (double)f;
|
||||
double d1 = par3EntityPlayer.prevPosY + (par3EntityPlayer.posY - par3EntityPlayer.prevPosY) * (double)f + 1.62D - (double)par3EntityPlayer.yOffset;
|
||||
double d2 = par3EntityPlayer.prevPosZ + (par3EntityPlayer.posZ - par3EntityPlayer.prevPosZ) * (double)f;
|
||||
double d0 = par3EntityPlayer.prevPosX + (par3EntityPlayer.posX - par3EntityPlayer.prevPosX) * (double) f;
|
||||
double d1 = par3EntityPlayer.prevPosY + (par3EntityPlayer.posY - par3EntityPlayer.prevPosY) * (double) f + 1.62D - (double) par3EntityPlayer.yOffset;
|
||||
double d2 = par3EntityPlayer.prevPosZ + (par3EntityPlayer.posZ - par3EntityPlayer.prevPosZ) * (double) f;
|
||||
boolean flag = this.isFull == 0;
|
||||
MovingObjectPosition movingobjectposition = this.getMovingObjectPositionFromPlayer(par2World, par3EntityPlayer, flag);
|
||||
|
||||
if (movingobjectposition == null)
|
||||
{
|
||||
return par1ItemStack;
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
if (movingobjectposition.typeOfHit == EnumMovingObjectType.TILE)
|
||||
{
|
||||
|
@ -109,8 +109,7 @@ public class WaterSigil extends ItemBucket implements ArmourUpgrade
|
|||
if (this.isFull == 0)
|
||||
{
|
||||
//Empty
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
if (movingobjectposition.sideHit == 0)
|
||||
{
|
||||
|
@ -154,8 +153,7 @@ public class WaterSigil extends ItemBucket implements ArmourUpgrade
|
|||
if (!EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed()))
|
||||
{
|
||||
}
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
@ -175,16 +173,13 @@ public class WaterSigil extends ItemBucket implements ArmourUpgrade
|
|||
if (this.isFull <= 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else if (!par1World.isAirBlock(par8, par9, par10) && par1World.getBlockMaterial(par8, par9, par10).isSolid())
|
||||
} else if (!par1World.isAirBlock(par8, par9, par10) && par1World.getBlockMaterial(par8, par9, par10).isSolid())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else if ((par1World.getBlockId(par8, par9, par10) == Block.waterMoving.blockID || par1World.getBlockId(par8, par9, par10) == Block.waterStill.blockID) && par1World.getBlockMetadata(par8, par9, par10) == 0)
|
||||
} else if ((par1World.getBlockId(par8, par9, par10) == Block.waterMoving.blockID || par1World.getBlockId(par8, par9, par10) == Block.waterStill.blockID) && par1World.getBlockMetadata(par8, par9, par10) == 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
if (par1World.provider.isHellWorld)
|
||||
{
|
||||
|
@ -192,10 +187,9 @@ public class WaterSigil extends ItemBucket implements ArmourUpgrade
|
|||
|
||||
for (int l = 0; l < 8; ++l)
|
||||
{
|
||||
par1World.spawnParticle("largesmoke", (double)par8 + Math.random(), (double)par9 + Math.random(), (double)par10 + Math.random(), 0.0D, 0.0D, 0.0D);
|
||||
par1World.spawnParticle("largesmoke", (double) par8 + Math.random(), (double) par9 + Math.random(), (double) par10 + Math.random(), 0.0D, 0.0D, 0.0D);
|
||||
}
|
||||
}
|
||||
else
|
||||
} else
|
||||
{
|
||||
par1World.setBlock(par8, par9, par10, this.isFull, 0, 3);
|
||||
}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package WayofTime.alchemicalWizardry.common.items.thaumcraft;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
|
@ -15,11 +15,10 @@ import thaumcraft.api.ThaumcraftApi;
|
|||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
import thaumcraft.api.wands.IWandFocus;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public abstract class FocusBase extends EnergyItems implements IWandFocus
|
||||
{
|
||||
import java.util.List;
|
||||
|
||||
public abstract class FocusBase extends EnergyItems implements IWandFocus {
|
||||
protected Icon ornament, depth;
|
||||
|
||||
public FocusBase(int par1)
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
package WayofTime.alchemicalWizardry.common.items.thaumcraft;
|
||||
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.EnergyBlastProjectile;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
|
@ -13,20 +12,19 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.world.World;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
import thaumcraft.api.wands.IWandFocus.WandFocusAnimation;
|
||||
import WayofTime.alchemicalWizardry.common.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.EnergyBlastProjectile;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class FocusBloodBlast extends FocusBase
|
||||
{
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class FocusBloodBlast extends FocusBase {
|
||||
private static final AspectList visUsage = new AspectList().add(Aspect.AIR, 15).add(Aspect.ENTROPY, 45);
|
||||
|
||||
private final int maxCooldown = 7;
|
||||
|
||||
public static Map<String, Integer> playerCooldown = new HashMap();
|
||||
public static Map<String,Integer> playerCooldown = new HashMap();
|
||||
|
||||
public FocusBloodBlast(int par1)
|
||||
{
|
||||
|
@ -120,33 +118,28 @@ public class FocusBloodBlast extends FocusBase
|
|||
if (!world.isRemote)
|
||||
{
|
||||
//par2World.spawnEntityInWorld(new EnergyBlastProjectile(par2World, par3EntityPlayer, damage));
|
||||
world.spawnEntityInWorld(new EnergyBlastProjectile(world, par3EntityPlayer, (int)(5)));
|
||||
world.spawnEntityInWorld(new EnergyBlastProjectile(world, par3EntityPlayer, (int) (5)));
|
||||
//this.setDelay(par1ItemStack, maxDelay);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (NoSuchMethodException e1)
|
||||
} catch (NoSuchMethodException e1)
|
||||
{
|
||||
// TODO Auto-generated catch block
|
||||
e1.printStackTrace();
|
||||
}
|
||||
catch (SecurityException e1)
|
||||
} catch (SecurityException e1)
|
||||
{
|
||||
// TODO Auto-generated catch block
|
||||
e1.printStackTrace();
|
||||
}
|
||||
catch (IllegalAccessException e)
|
||||
} catch (IllegalAccessException e)
|
||||
{
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
catch (IllegalArgumentException e)
|
||||
} catch (IllegalArgumentException e)
|
||||
{
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
catch (InvocationTargetException e)
|
||||
} catch (InvocationTargetException e)
|
||||
{
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
package WayofTime.alchemicalWizardry.common.items.thaumcraft;
|
||||
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import WayofTime.alchemicalWizardry.common.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.enchantment.EnchantmentHelper;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
@ -18,18 +16,19 @@ import net.minecraft.world.World;
|
|||
import thaumcraft.api.ThaumcraftApi;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
import WayofTime.alchemicalWizardry.common.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class FocusGravityWell extends FocusBase
|
||||
{
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class FocusGravityWell extends FocusBase {
|
||||
private static final AspectList visUsage = new AspectList().add(Aspect.AIR, 5).add(Aspect.ORDER, 5);
|
||||
|
||||
private final int maxCooldown = 1;
|
||||
|
||||
public static Map<String, Integer> playerCooldown = new HashMap();
|
||||
public static Map<String,Integer> playerCooldown = new HashMap();
|
||||
|
||||
public FocusGravityWell(int par1)
|
||||
{
|
||||
|
@ -115,7 +114,7 @@ public class FocusGravityWell extends FocusBase
|
|||
{
|
||||
List<Entity> entities = par3EntityPlayer.worldObj.getEntitiesWithinAABB(Entity.class, AxisAlignedBB.getBoundingBox(par3EntityPlayer.posX + vector.xCoord * distance - 0.5f, par3EntityPlayer.posY + vector.yCoord * distance - 0.5f, par3EntityPlayer.posZ + vector.zCoord * distance - 0.5f, par3EntityPlayer.posX + vector.xCoord * distance + 0.5f, par3EntityPlayer.posY + vector.yCoord * distance + 0.5f, par3EntityPlayer.posZ + vector.zCoord * distance + 0.5f).expand(1, 1, 1));
|
||||
|
||||
for (Entity entity: entities)
|
||||
for (Entity entity : entities)
|
||||
{
|
||||
if (entity.getEntityName() == par3EntityPlayer.username)
|
||||
{
|
||||
|
@ -136,28 +135,23 @@ public class FocusGravityWell extends FocusBase
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (NoSuchMethodException e1)
|
||||
} catch (NoSuchMethodException e1)
|
||||
{
|
||||
// TODO Auto-generated catch block
|
||||
e1.printStackTrace();
|
||||
}
|
||||
catch (SecurityException e1)
|
||||
} catch (SecurityException e1)
|
||||
{
|
||||
// TODO Auto-generated catch block
|
||||
e1.printStackTrace();
|
||||
}
|
||||
catch (IllegalAccessException e)
|
||||
} catch (IllegalAccessException e)
|
||||
{
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
catch (IllegalArgumentException e)
|
||||
} catch (IllegalArgumentException e)
|
||||
{
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
catch (InvocationTargetException e)
|
||||
} catch (InvocationTargetException e)
|
||||
{
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
|
@ -203,7 +197,7 @@ public class FocusGravityWell extends FocusBase
|
|||
{
|
||||
List<Entity> entities = par3EntityPlayer.worldObj.getEntitiesWithinAABB(Entity.class, AxisAlignedBB.getBoundingBox(par3EntityPlayer.posX + vector.xCoord * distance - 0.5f, par3EntityPlayer.posY + vector.yCoord * distance - 0.5f, par3EntityPlayer.posZ + vector.zCoord * distance - 0.5f, par3EntityPlayer.posX + vector.xCoord * distance + 0.5f, par3EntityPlayer.posY + vector.yCoord * distance + 0.5f, par3EntityPlayer.posZ + vector.zCoord * distance + 0.5f).expand(1, 1, 1));
|
||||
|
||||
for (Entity entity: entities)
|
||||
for (Entity entity : entities)
|
||||
{
|
||||
if (entity.getEntityName() == par3EntityPlayer.username)
|
||||
{
|
||||
|
@ -218,28 +212,23 @@ public class FocusGravityWell extends FocusBase
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (NoSuchMethodException e1)
|
||||
} catch (NoSuchMethodException e1)
|
||||
{
|
||||
// TODO Auto-generated catch block
|
||||
e1.printStackTrace();
|
||||
}
|
||||
catch (SecurityException e1)
|
||||
} catch (SecurityException e1)
|
||||
{
|
||||
// TODO Auto-generated catch block
|
||||
e1.printStackTrace();
|
||||
}
|
||||
catch (IllegalAccessException e)
|
||||
} catch (IllegalAccessException e)
|
||||
{
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
catch (IllegalArgumentException e)
|
||||
} catch (IllegalArgumentException e)
|
||||
{
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
catch (InvocationTargetException e)
|
||||
} catch (InvocationTargetException e)
|
||||
{
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue