Anti-comments sweep!
This commit is contained in:
parent
e6a10f3f06
commit
dea1f87078
454 changed files with 23594 additions and 26739 deletions
|
@ -1,13 +1,13 @@
|
|||
package WayofTime.alchemicalWizardry.common.items;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.ModItems;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.ModItems;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class AWBaseItems extends Item
|
||||
{
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package WayofTime.alchemicalWizardry.common.items;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.swing.Icon;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
@ -13,13 +13,9 @@ import net.minecraft.util.EnumChatFormatting;
|
|||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import java.util.List;
|
||||
|
||||
public class ActivationCrystal extends EnergyItems
|
||||
{
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package WayofTime.alchemicalWizardry.common.items;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
|
||||
public class AirScribeTool extends ScribeTool
|
||||
{
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package WayofTime.alchemicalWizardry.common.items;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
|
||||
public class ApprenticeBloodOrb extends EnergyBattery
|
||||
{
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package WayofTime.alchemicalWizardry.common.items;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
|
||||
public class ArchmageBloodOrb extends EnergyBattery
|
||||
{
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
package WayofTime.alchemicalWizardry.common.items;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.swing.Icon;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
@ -12,9 +11,8 @@ import net.minecraft.nbt.NBTTagCompound;
|
|||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ArmourInhibitor extends EnergyItems
|
||||
{
|
||||
|
@ -26,7 +24,6 @@ public class ArmourInhibitor extends EnergyItems
|
|||
{
|
||||
super();
|
||||
this.maxStackSize = 1;
|
||||
//setMaxDamage(1000);
|
||||
setEnergyUsed(0);
|
||||
setCreativeTab(AlchemicalWizardry.tabBloodMagic);
|
||||
}
|
||||
|
@ -92,23 +89,6 @@ public class ArmourInhibitor extends EnergyItems
|
|||
}
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, int par5, int par6, int par7, float par8, float par9, float par10)
|
||||
// {
|
||||
//
|
||||
// if(applyBonemeal(par1ItemStack,par3World,par4,par5,par6,par2EntityPlayer))
|
||||
// {
|
||||
// if (par3World.isRemote)
|
||||
// {
|
||||
// par3World.playAuxSFX(2005, par4, par5, par6, 0);
|
||||
// EnergyItems.syphonBatteries(par1ItemStack, par2EntityPlayer, getEnergyUsed());
|
||||
// return true;
|
||||
// }
|
||||
// return true;
|
||||
// }
|
||||
// return false;
|
||||
// }
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)
|
||||
{
|
||||
|
@ -134,7 +114,6 @@ public class ArmourInhibitor extends EnergyItems
|
|||
|
||||
if (!par3EntityPlayer.capabilities.isCreativeMode)
|
||||
{
|
||||
//EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed());
|
||||
}
|
||||
} else
|
||||
{
|
||||
|
@ -163,7 +142,6 @@ public class ArmourInhibitor extends EnergyItems
|
|||
{
|
||||
if (par2World.getWorldTime() % tickDelay == par1ItemStack.stackTagCompound.getInteger("worldTimeDelay") && par3Entity instanceof EntityPlayer)
|
||||
{
|
||||
//EnergyItems.syphonBatteries(par1ItemStack, (EntityPlayer)par3Entity, getEnergyUsed());
|
||||
}
|
||||
|
||||
//TODO Do stuff
|
||||
|
@ -172,44 +150,4 @@ public class ArmourInhibitor extends EnergyItems
|
|||
|
||||
return;
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public void onArmourUpdate(World world, EntityPlayer player, ItemStack thisItemStack) {
|
||||
//
|
||||
// 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);
|
||||
//
|
||||
// for(int ix=posX-range;ix<=posX+range;ix++)
|
||||
// {
|
||||
// for(int iz=posZ-range;iz<=posZ+range;iz++)
|
||||
// {
|
||||
// for(int iy=posY-verticalRange;iy<=posY+verticalRange;iy++)
|
||||
// {
|
||||
// int id = world.getBlockId(ix, iy, iz);
|
||||
// Block block = Block.blocksList[id];
|
||||
// if(block instanceof IPlantable)
|
||||
// {
|
||||
// if(world.rand.nextInt(10)==0)
|
||||
// block.updateTick(world, ix, iy, iz, world.rand);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// }
|
||||
|
||||
// @Override
|
||||
// public boolean isUpgrade() {
|
||||
// // TODO Auto-generated method stub
|
||||
// return true;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public int getEnergyForTenSeconds() {
|
||||
// // TODO Auto-generated method stub
|
||||
// return 50;
|
||||
// }
|
||||
}
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
package WayofTime.alchemicalWizardry.common.items;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import WayofTime.alchemicalWizardry.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.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
@ -9,10 +11,8 @@ import net.minecraft.nbt.NBTTagCompound;
|
|||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.DimensionManager;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEHomHeart;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class BlankSpell extends EnergyItems
|
||||
{
|
||||
|
@ -61,7 +61,6 @@ public class BlankSpell extends EnergyItems
|
|||
|
||||
if (!par2World.isRemote)
|
||||
{
|
||||
//World world = MinecraftServer.getServer().worldServers[getDimensionID(par1ItemStack)];
|
||||
World world = DimensionManager.getWorld(getDimensionID(par1ItemStack));
|
||||
|
||||
if (world != null)
|
||||
|
@ -92,13 +91,7 @@ public class BlankSpell extends EnergyItems
|
|||
{
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
par2World.playSoundAtEntity(par3EntityPlayer, "random.fizz", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F));
|
||||
// if (!par2World.isRemote)
|
||||
// {
|
||||
// //par2World.spawnEntityInWorld(new EnergyBlastProjectile(par2World, par3EntityPlayer, damage));
|
||||
// par2World.spawnEntityInWorld(new FireProjectile(par2World, par3EntityPlayer, 10));
|
||||
// }
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
package WayofTime.alchemicalWizardry.common.items;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.ModItems;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class BloodShard extends Item implements ArmourUpgrade
|
||||
{
|
||||
|
@ -17,7 +17,6 @@ public class BloodShard extends Item implements ArmourUpgrade
|
|||
{
|
||||
super();
|
||||
this.maxStackSize = 64;
|
||||
//setEnergyUsed(100);
|
||||
setCreativeTab(AlchemicalWizardry.tabBloodMagic);
|
||||
}
|
||||
|
||||
|
@ -40,8 +39,8 @@ public class BloodShard extends Item implements ArmourUpgrade
|
|||
|
||||
public int getBloodShardLevel()
|
||||
{
|
||||
if (this.equals(ModItems.weakBloodShard))
|
||||
{
|
||||
if (this.equals(ModItems.weakBloodShard))
|
||||
{
|
||||
return 1;
|
||||
} else if (this.equals(ModItems.demonBloodShard))
|
||||
{
|
||||
|
@ -54,20 +53,17 @@ public class BloodShard extends Item implements ArmourUpgrade
|
|||
@Override
|
||||
public void onArmourUpdate(World world, EntityPlayer player, ItemStack thisItemStack)
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isUpgrade()
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getEnergyForTenSeconds()
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
package WayofTime.alchemicalWizardry.common.items;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import WayofTime.alchemicalWizardry.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.IIconRegister;
|
||||
|
@ -10,14 +11,12 @@ import net.minecraft.entity.player.EntityPlayer;
|
|||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class BloodboundSword extends EnergyItems
|
||||
{
|
||||
private float weaponDamage;
|
||||
//private int maxMode = 3;
|
||||
private NBTTagCompound data;
|
||||
|
||||
public BloodboundSword(int id)
|
||||
|
@ -45,20 +44,12 @@ public class BloodboundSword extends EnergyItems
|
|||
|
||||
if (!this.syphonBatteries(par1ItemStack, (EntityPlayer) par3EntityLivingBase, this.getEnergyUsed()))
|
||||
{
|
||||
//this.damagePlayer(null, (EntityPlayer)par3EntityLivingBase, (this.getEnergyUsed() + 99) / 100);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
public int getDamageVsEntity(Entity par1Entity)
|
||||
{
|
||||
return this.weaponDamage;
|
||||
}
|
||||
*/
|
||||
|
||||
public float func_82803_g()
|
||||
{
|
||||
return 4.0F;
|
||||
|
@ -93,11 +84,4 @@ public class BloodboundSword extends EnergyItems
|
|||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// public Multimap func_111205_h()
|
||||
// {
|
||||
// Multimap multimap = super.func_111205_h();
|
||||
// multimap.put(SharedMonsterAttributes.field_111264_e.func_111108_a(), new AttributeModifier(field_111210_e, "Weapon modifier", (double)this.weaponDamage, 0));
|
||||
// return multimap;
|
||||
// }
|
||||
}
|
|
@ -1,7 +1,15 @@
|
|||
package WayofTime.alchemicalWizardry.common.items;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.ModItems;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.IAlchemyGoggles;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.model.ModelOmegaArmour;
|
||||
import cpw.mods.fml.common.Optional;
|
||||
import cpw.mods.fml.common.Optional.Interface;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.model.ModelBiped;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
@ -22,26 +30,18 @@ import net.minecraftforge.common.util.Constants;
|
|||
import thaumcraft.api.IGoggles;
|
||||
import thaumcraft.api.IRunicArmor;
|
||||
import thaumcraft.api.nodes.IRevealer;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.ModItems;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.IAlchemyGoggles;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable;
|
||||
import WayofTime.alchemicalWizardry.common.renderer.model.ModelOmegaArmour;
|
||||
import cpw.mods.fml.common.Optional;
|
||||
import cpw.mods.fml.common.Optional.Interface;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
@Optional.InterfaceList(value = {@Interface(iface="thaumcraft.api.nodes.IRevealer", modid = "Thaumcraft"), @Interface(iface="thaumcraft.api.IGoggles", modid = "Thaumcraft"), @Interface(iface="thaumcraft.api.IRunicArmor", modid = "Thaumcraft")})
|
||||
public class BoundArmour extends ItemArmor implements IAlchemyGoggles,ISpecialArmor,IBindable ,IRevealer, IGoggles, IRunicArmor
|
||||
import java.util.List;
|
||||
|
||||
@Optional.InterfaceList(value = {@Interface(iface = "thaumcraft.api.nodes.IRevealer", modid = "Thaumcraft"), @Interface(iface = "thaumcraft.api.IGoggles", modid = "Thaumcraft"), @Interface(iface = "thaumcraft.api.IRunicArmor", modid = "Thaumcraft")})
|
||||
public class BoundArmour extends ItemArmor implements IAlchemyGoggles, ISpecialArmor, IBindable, IRevealer, IGoggles, IRunicArmor
|
||||
{
|
||||
private static int invSize = 9;
|
||||
private static IIcon helmetIcon;
|
||||
private static IIcon plateIcon;
|
||||
private static IIcon leggingsIcon;
|
||||
private static IIcon bootsIcon;
|
||||
|
||||
|
||||
private static final boolean tryComplexRendering = true;
|
||||
|
||||
public BoundArmour(int armorType)
|
||||
|
@ -54,70 +54,70 @@ public class BoundArmour extends ItemArmor implements IAlchemyGoggles,ISpecialAr
|
|||
ModelBiped model1 = null;
|
||||
ModelBiped model2 = null;
|
||||
ModelBiped model = null;
|
||||
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemStack, int armorSlot)
|
||||
{
|
||||
if(tryComplexRendering)
|
||||
{
|
||||
int type = ((ItemArmor)itemStack.getItem()).armorType;
|
||||
if(this.model1 == null)
|
||||
{
|
||||
this.model1 = new ModelOmegaArmour(1.0f, true, true, false, true);
|
||||
}
|
||||
if(this.model2 == null)
|
||||
{
|
||||
this.model2 = new ModelOmegaArmour(0.5f, false, false, true, false);
|
||||
}
|
||||
|
||||
if(type == 1 || type == 3 || type == 0)
|
||||
{
|
||||
this.model = model1;
|
||||
}else
|
||||
{
|
||||
this.model = model2;
|
||||
}
|
||||
|
||||
if(this.model != null)
|
||||
{
|
||||
this.model.bipedHead.showModel = (type == 0);
|
||||
this.model.bipedHeadwear.showModel = (type == 0);
|
||||
this.model.bipedBody.showModel = ((type == 1) || (type == 2));
|
||||
this.model.bipedLeftArm.showModel = (type == 1);
|
||||
this.model.bipedRightArm.showModel = (type == 1);
|
||||
this.model.bipedLeftLeg.showModel = (type == 2 || type == 3);
|
||||
this.model.bipedRightLeg.showModel = (type == 2 || type == 3);
|
||||
this.model.isSneak = entityLiving.isSneaking();
|
||||
|
||||
this.model.isRiding = entityLiving.isRiding();
|
||||
this.model.isChild = entityLiving.isChild();
|
||||
|
||||
this.model.aimedBow = false;
|
||||
this.model.heldItemRight = (entityLiving.getHeldItem() != null ? 1 : 0);
|
||||
|
||||
if ((entityLiving instanceof EntityPlayer))
|
||||
{
|
||||
if (((EntityPlayer)entityLiving).getItemInUseDuration() > 0)
|
||||
{
|
||||
EnumAction enumaction = ((EntityPlayer)entityLiving).getItemInUse().getItemUseAction();
|
||||
if (enumaction == EnumAction.block)
|
||||
{
|
||||
this.model.heldItemRight = 3;
|
||||
} else if (enumaction == EnumAction.bow)
|
||||
{
|
||||
this.model.aimedBow = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return model;
|
||||
|
||||
}else
|
||||
{
|
||||
return super.getArmorModel(entityLiving, itemStack, armorSlot);
|
||||
}
|
||||
if (tryComplexRendering)
|
||||
{
|
||||
int type = ((ItemArmor) itemStack.getItem()).armorType;
|
||||
if (this.model1 == null)
|
||||
{
|
||||
this.model1 = new ModelOmegaArmour(1.0f, true, true, false, true);
|
||||
}
|
||||
if (this.model2 == null)
|
||||
{
|
||||
this.model2 = new ModelOmegaArmour(0.5f, false, false, true, false);
|
||||
}
|
||||
|
||||
if (type == 1 || type == 3 || type == 0)
|
||||
{
|
||||
this.model = model1;
|
||||
} else
|
||||
{
|
||||
this.model = model2;
|
||||
}
|
||||
|
||||
if (this.model != null)
|
||||
{
|
||||
this.model.bipedHead.showModel = (type == 0);
|
||||
this.model.bipedHeadwear.showModel = (type == 0);
|
||||
this.model.bipedBody.showModel = ((type == 1) || (type == 2));
|
||||
this.model.bipedLeftArm.showModel = (type == 1);
|
||||
this.model.bipedRightArm.showModel = (type == 1);
|
||||
this.model.bipedLeftLeg.showModel = (type == 2 || type == 3);
|
||||
this.model.bipedRightLeg.showModel = (type == 2 || type == 3);
|
||||
this.model.isSneak = entityLiving.isSneaking();
|
||||
|
||||
this.model.isRiding = entityLiving.isRiding();
|
||||
this.model.isChild = entityLiving.isChild();
|
||||
|
||||
this.model.aimedBow = false;
|
||||
this.model.heldItemRight = (entityLiving.getHeldItem() != null ? 1 : 0);
|
||||
|
||||
if ((entityLiving instanceof EntityPlayer))
|
||||
{
|
||||
if (((EntityPlayer) entityLiving).getItemInUseDuration() > 0)
|
||||
{
|
||||
EnumAction enumaction = ((EntityPlayer) entityLiving).getItemInUse().getItemUseAction();
|
||||
if (enumaction == EnumAction.block)
|
||||
{
|
||||
this.model.heldItemRight = 3;
|
||||
} else if (enumaction == EnumAction.bow)
|
||||
{
|
||||
this.model.aimedBow = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return model;
|
||||
|
||||
} else
|
||||
{
|
||||
return super.getArmorModel(entityLiving, itemStack, armorSlot);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -166,30 +166,30 @@ public class BoundArmour extends ItemArmor implements IAlchemyGoggles,ISpecialAr
|
|||
@Override
|
||||
public ArmorProperties getProperties(EntityLivingBase player, ItemStack armor, DamageSource source, double damage, int slot)
|
||||
{
|
||||
double armourReduction = 0.0;
|
||||
|
||||
if(player.isPotionActive(AlchemicalWizardry.customPotionSoulFray))
|
||||
double armourReduction = 0.0;
|
||||
|
||||
if (player.isPotionActive(AlchemicalWizardry.customPotionSoulFray))
|
||||
{
|
||||
int i = player.getActivePotionEffect(AlchemicalWizardry.customPotionSoulFray).getAmplifier() + 1;
|
||||
|
||||
armourReduction = (i+1)*0.1;
|
||||
|
||||
armourReduction = (i + 1) * 0.1;
|
||||
}
|
||||
|
||||
double damageAmount = 0.25;
|
||||
|
||||
if(player.isPotionActive(AlchemicalWizardry.customPotionSoulHarden))
|
||||
{
|
||||
int i = player.getActivePotionEffect(AlchemicalWizardry.customPotionSoulHarden).getAmplifier() + 1;
|
||||
damageAmount /= Math.max((1 - i*0.1), 0.1);
|
||||
}else
|
||||
{
|
||||
damageAmount *= 0.9;
|
||||
}
|
||||
|
||||
damageAmount *= (1.0-armourReduction);
|
||||
|
||||
int maxAbsorption = 100000;
|
||||
|
||||
|
||||
double damageAmount = 0.25;
|
||||
|
||||
if (player.isPotionActive(AlchemicalWizardry.customPotionSoulHarden))
|
||||
{
|
||||
int i = player.getActivePotionEffect(AlchemicalWizardry.customPotionSoulHarden).getAmplifier() + 1;
|
||||
damageAmount /= Math.max((1 - i * 0.1), 0.1);
|
||||
} else
|
||||
{
|
||||
damageAmount *= 0.9;
|
||||
}
|
||||
|
||||
damageAmount *= (1.0 - armourReduction);
|
||||
|
||||
int maxAbsorption = 100000;
|
||||
|
||||
if (source.equals(DamageSource.drown))
|
||||
{
|
||||
return new ArmorProperties(-1, 0, 0);
|
||||
|
@ -266,8 +266,6 @@ public class BoundArmour extends ItemArmor implements IAlchemyGoggles,ISpecialAr
|
|||
{
|
||||
return;
|
||||
}
|
||||
|
||||
//EnergyItems.syphonBatteries(stack, (EntityPlayer)entity, 200);
|
||||
}
|
||||
|
||||
stack.setItemDamage(stack.getItemDamage() + damage);
|
||||
|
@ -305,16 +303,16 @@ public class BoundArmour extends ItemArmor implements IAlchemyGoggles,ISpecialAr
|
|||
@Override
|
||||
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type)
|
||||
{
|
||||
if(this.tryComplexRendering)
|
||||
{
|
||||
return "alchemicalwizardry:models/armor/BloodArmour_WIP.png";
|
||||
}
|
||||
if (this.tryComplexRendering)
|
||||
{
|
||||
return "alchemicalwizardry:models/armor/BloodArmour_WIP.png";
|
||||
}
|
||||
|
||||
if (entity instanceof EntityLivingBase)
|
||||
if (entity instanceof EntityLivingBase)
|
||||
{
|
||||
if (this.getIsInvisible(stack))
|
||||
{
|
||||
if (this== ModItems.boundHelmet || this == ModItems.boundPlate || this == ModItems.boundBoots)
|
||||
if (this == ModItems.boundHelmet || this == ModItems.boundPlate || this == ModItems.boundBoots)
|
||||
{
|
||||
return "alchemicalwizardry:models/armor/boundArmour_invisible_layer_1.png";
|
||||
}
|
||||
|
@ -368,7 +366,7 @@ public class BoundArmour extends ItemArmor implements IAlchemyGoggles,ISpecialAr
|
|||
{
|
||||
tickInternalInventory(itemStack, world, player, 0, false);
|
||||
}
|
||||
|
||||
|
||||
this.setIsInvisible(itemStack, player.isPotionActive(Potion.invisibility.id));
|
||||
|
||||
if (itemStack.getItemDamage() > 0)
|
||||
|
@ -395,8 +393,6 @@ public class BoundArmour extends ItemArmor implements IAlchemyGoggles,ISpecialAr
|
|||
}
|
||||
|
||||
int blood = getMaxBloodShardLevel(par1ItemStack);
|
||||
|
||||
//int blood = 1;
|
||||
for (int i = 0; i < invSize; i++)
|
||||
{
|
||||
if (inv[i] == null)
|
||||
|
@ -633,7 +629,7 @@ public class BoundArmour extends ItemArmor implements IAlchemyGoggles,ISpecialAr
|
|||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
public float getUpgradeCostMultiplier(ItemStack itemStack)
|
||||
{
|
||||
ItemStack[] inv = getInternalInventory(itemStack);
|
||||
|
@ -683,29 +679,29 @@ public class BoundArmour extends ItemArmor implements IAlchemyGoggles,ISpecialAr
|
|||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
public boolean getIsInvisible(ItemStack armourStack)
|
||||
{
|
||||
NBTTagCompound tag = armourStack.getTagCompound();
|
||||
if(tag != null)
|
||||
{
|
||||
return tag.getBoolean("invisible");
|
||||
}
|
||||
|
||||
return false;
|
||||
NBTTagCompound tag = armourStack.getTagCompound();
|
||||
if (tag != null)
|
||||
{
|
||||
return tag.getBoolean("invisible");
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
public void setIsInvisible(ItemStack armourStack, boolean invisible)
|
||||
{
|
||||
NBTTagCompound tag = armourStack.getTagCompound();
|
||||
|
||||
if(tag == null)
|
||||
{
|
||||
armourStack.setTagCompound(new NBTTagCompound());
|
||||
tag = armourStack.getTagCompound();
|
||||
}
|
||||
|
||||
tag.setBoolean("invisible", invisible);
|
||||
NBTTagCompound tag = armourStack.getTagCompound();
|
||||
|
||||
if (tag == null)
|
||||
{
|
||||
armourStack.setTagCompound(new NBTTagCompound());
|
||||
tag = armourStack.getTagCompound();
|
||||
}
|
||||
|
||||
tag.setBoolean("invisible", invisible);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -722,66 +718,66 @@ public class BoundArmour extends ItemArmor implements IAlchemyGoggles,ISpecialAr
|
|||
return this.hasIGoggles(itemstack);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Optional.Method(modid = "Thaumcraft")
|
||||
public int getRunicCharge(ItemStack itemstack)
|
||||
{
|
||||
ItemStack[] inv = this.getInternalInventory(itemstack);
|
||||
int shardLevel = this.getMaxBloodShardLevel(itemstack);
|
||||
int count = 0;
|
||||
int harden = 0;
|
||||
|
||||
if(inv == null)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
for(ItemStack stack : inv)
|
||||
{
|
||||
if(count >= shardLevel)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
if(stack == null || !(stack.getItem() instanceof ArmourUpgrade))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if(stack.getItem() instanceof ItemArmor && ((ItemArmor)stack.getItem()).armorType != this.armorType)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if(stack.hasTagCompound())
|
||||
{
|
||||
NBTTagCompound tag = stack.getTagCompound();
|
||||
|
||||
int enchLvl = tag.getByte("RS.HARDEN");
|
||||
|
||||
if(stack.getItem() instanceof IRunicArmor)
|
||||
{
|
||||
enchLvl += ((IRunicArmor)stack.getItem()).getRunicCharge(stack);
|
||||
}
|
||||
|
||||
if(enchLvl > 0)
|
||||
{
|
||||
harden += enchLvl;
|
||||
if(((ArmourUpgrade)stack.getItem()).isUpgrade())
|
||||
{
|
||||
count += 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return harden;
|
||||
}
|
||||
@Override
|
||||
@Optional.Method(modid = "Thaumcraft")
|
||||
public int getRunicCharge(ItemStack itemstack)
|
||||
{
|
||||
ItemStack[] inv = this.getInternalInventory(itemstack);
|
||||
int shardLevel = this.getMaxBloodShardLevel(itemstack);
|
||||
int count = 0;
|
||||
int harden = 0;
|
||||
|
||||
@Override
|
||||
public boolean showIngameHUD(World world, ItemStack stack, EntityPlayer player)
|
||||
{
|
||||
ItemStack[] inv = getInternalInventory(stack);
|
||||
if (inv == null)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
for (ItemStack stack : inv)
|
||||
{
|
||||
if (count >= shardLevel)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
if (stack == null || !(stack.getItem() instanceof ArmourUpgrade))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (stack.getItem() instanceof ItemArmor && ((ItemArmor) stack.getItem()).armorType != this.armorType)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (stack.hasTagCompound())
|
||||
{
|
||||
NBTTagCompound tag = stack.getTagCompound();
|
||||
|
||||
int enchLvl = tag.getByte("RS.HARDEN");
|
||||
|
||||
if (stack.getItem() instanceof IRunicArmor)
|
||||
{
|
||||
enchLvl += ((IRunicArmor) stack.getItem()).getRunicCharge(stack);
|
||||
}
|
||||
|
||||
if (enchLvl > 0)
|
||||
{
|
||||
harden += enchLvl;
|
||||
if (((ArmourUpgrade) stack.getItem()).isUpgrade())
|
||||
{
|
||||
count += 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return harden;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean showIngameHUD(World world, ItemStack stack, EntityPlayer player)
|
||||
{
|
||||
ItemStack[] inv = getInternalInventory(stack);
|
||||
|
||||
if (inv == null)
|
||||
{
|
||||
|
@ -802,5 +798,5 @@ public class BoundArmour extends ItemArmor implements IAlchemyGoggles,ISpecialAr
|
|||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,58 +1,41 @@
|
|||
package WayofTime.alchemicalWizardry.common.items;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import javax.swing.Icon;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockLeavesBase;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.enchantment.Enchantment;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemAxe;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeHooks;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
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.IIconRegister;
|
||||
import net.minecraft.enchantment.EnchantmentHelper;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemAxe;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeHooks;
|
||||
|
||||
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[]{Blocks.planks, Blocks.bookshelf, Blocks.log, Blocks.chest, Blocks.stone_slab, Blocks.pumpkin, Blocks.lit_pumpkin};
|
||||
|
||||
public float efficiencyOnProperMaterial = 12.0F;
|
||||
|
||||
/**
|
||||
* Damage versus entities.
|
||||
*/
|
||||
public float damageVsEntity;
|
||||
|
||||
private static IIcon activeIcon;
|
||||
private static IIcon passiveIcon;
|
||||
|
||||
private int energyUsed;
|
||||
|
||||
public BoundAxe()
|
||||
{
|
||||
super(AlchemicalWizardry.bloodBoundToolMaterial);
|
||||
this.maxStackSize = 1;
|
||||
//this.setMaxDamage(par3EnumToolMaterial.getMaxUses());
|
||||
this.efficiencyOnProperMaterial = 12.0F;
|
||||
this.damageVsEntity = 5;
|
||||
setCreativeTab(AlchemicalWizardry.tabBloodMagic);
|
||||
|
@ -142,9 +125,9 @@ public class BoundAxe extends ItemAxe implements IBindable
|
|||
}
|
||||
|
||||
Vec3 blockVec = SpellHelper.getEntityBlockVector(par3EntityPlayer);
|
||||
int posX = (int)(blockVec.xCoord);
|
||||
int posY = (int)(blockVec.yCoord);
|
||||
int posZ = (int)(blockVec.zCoord);
|
||||
int posX = (int) (blockVec.xCoord);
|
||||
int posY = (int) (blockVec.yCoord);
|
||||
int posZ = (int) (blockVec.zCoord);
|
||||
boolean silkTouch = EnchantmentHelper.getSilkTouchModifier(par3EntityPlayer);
|
||||
int fortuneLvl = EnchantmentHelper.getFortuneModifier(par3EntityPlayer);
|
||||
|
||||
|
@ -163,7 +146,6 @@ public class BoundAxe extends ItemAxe implements IBindable
|
|||
|
||||
if (str > 1.1f || block instanceof BlockLeavesBase && par2World.canMineBlock(par3EntityPlayer, posX + i, posY + j, posZ + k))
|
||||
{
|
||||
//par1ItemStack.getEnchantmentTagList();
|
||||
if (silkTouch)
|
||||
{
|
||||
ItemStack droppedItem = new ItemStack(block, 1, meta);
|
||||
|
@ -187,7 +169,6 @@ public class BoundAxe extends ItemAxe implements IBindable
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
par2World.setBlockToAir(posX + i, posY + j, posZ + k);
|
||||
}
|
||||
}
|
||||
|
@ -213,12 +194,6 @@ public class BoundAxe extends ItemAxe implements IBindable
|
|||
{
|
||||
par1ItemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
// if(par1ItemStack.stackTagCompound.getBoolean("isActive"))
|
||||
// {
|
||||
// EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, 1);
|
||||
// }
|
||||
|
||||
if (par2World.getWorldTime() % 200 == par1ItemStack.stackTagCompound.getInteger("worldTimeDelay") && par1ItemStack.stackTagCompound.getBoolean("isActive"))
|
||||
{
|
||||
if (!par3EntityPlayer.capabilities.isCreativeMode)
|
||||
|
@ -280,8 +255,6 @@ public class BoundAxe extends ItemAxe implements IBindable
|
|||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
//par1ItemStack.damageItem(2, par3EntityLivingBase);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -289,7 +262,6 @@ public class BoundAxe extends ItemAxe implements IBindable
|
|||
{
|
||||
if ((double) par3.getBlockHardness(par2World, par4, par5, par6) != 0.0D)
|
||||
{
|
||||
//par1ItemStack.damageItem(1, par7EntityLivingBase);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
@ -314,14 +286,6 @@ public class BoundAxe extends ItemAxe implements IBindable
|
|||
return 30;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return whether this item is repairable in an anvil.
|
||||
*/
|
||||
// public boolean getIsRepairable(ItemStack par1ItemStack, ItemStack par2ItemStack)
|
||||
// {
|
||||
// return true;
|
||||
// }
|
||||
|
||||
/**
|
||||
* FORGE: Overridden to allow custom tool effectiveness
|
||||
*/
|
||||
|
@ -346,15 +310,15 @@ public class BoundAxe extends ItemAxe implements IBindable
|
|||
{
|
||||
return !getActivated(stack);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getHarvestLevel(ItemStack stack, String toolClass)
|
||||
{
|
||||
if("axe".equals(toolClass))
|
||||
{
|
||||
return 5;
|
||||
}
|
||||
|
||||
return 0;
|
||||
if ("axe".equals(toolClass))
|
||||
{
|
||||
return 5;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,11 +1,13 @@
|
|||
package WayofTime.alchemicalWizardry.common.items;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.enchantment.Enchantment;
|
||||
import net.minecraft.enchantment.EnchantmentHelper;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
|
@ -13,32 +15,19 @@ import net.minecraft.entity.player.EntityPlayer;
|
|||
import net.minecraft.item.ItemPickaxe;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeHooks;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.enchantment.EnchantmentHelper;
|
||||
|
||||
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[]{Blocks.cobblestone, Blocks.stoneDoubleSlab, Blocks.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.
|
||||
*/
|
||||
public float damageVsEntity;
|
||||
|
||||
private static IIcon activeIcon;
|
||||
private static IIcon passiveIcon;
|
||||
|
||||
|
@ -48,7 +37,6 @@ public class BoundPickaxe extends ItemPickaxe implements IBindable
|
|||
{
|
||||
super(AlchemicalWizardry.bloodBoundToolMaterial);
|
||||
this.maxStackSize = 1;
|
||||
//this.setMaxDamage(par3EnumToolMaterial.getMaxUses());
|
||||
this.efficiencyOnProperMaterial = 12.0F;
|
||||
this.damageVsEntity = 5;
|
||||
setCreativeTab(AlchemicalWizardry.tabBloodMagic);
|
||||
|
@ -137,16 +125,16 @@ public class BoundPickaxe extends ItemPickaxe implements IBindable
|
|||
{
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
if(par2World.isRemote)
|
||||
|
||||
if (par2World.isRemote)
|
||||
{
|
||||
return par1ItemStack;
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
|
||||
Vec3 blockVec = SpellHelper.getEntityBlockVector(par3EntityPlayer);
|
||||
int posX = (int)(blockVec.xCoord);
|
||||
int posY = (int)(blockVec.yCoord);
|
||||
int posZ = (int)(blockVec.zCoord);
|
||||
int posX = (int) (blockVec.xCoord);
|
||||
int posY = (int) (blockVec.yCoord);
|
||||
int posZ = (int) (blockVec.zCoord);
|
||||
boolean silkTouch = EnchantmentHelper.getSilkTouchModifier(par3EntityPlayer);
|
||||
int fortuneLvl = EnchantmentHelper.getFortuneModifier(par3EntityPlayer);
|
||||
|
||||
|
@ -165,7 +153,6 @@ public class BoundPickaxe extends ItemPickaxe implements IBindable
|
|||
|
||||
if (str > 1.1f && par2World.canMineBlock(par3EntityPlayer, posX + i, posY + j, posZ + k))
|
||||
{
|
||||
//par1ItemStack.getEnchantmentTagList();
|
||||
if (silkTouch)
|
||||
{
|
||||
ItemStack droppedItem = new ItemStack(block, 1, meta);
|
||||
|
@ -216,11 +203,6 @@ public class BoundPickaxe extends ItemPickaxe implements IBindable
|
|||
par1ItemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
// if(par1ItemStack.stackTagCompound.getBoolean("isActive"))
|
||||
// {
|
||||
// EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, 1);
|
||||
// }
|
||||
|
||||
if (par2World.getWorldTime() % 200 == par1ItemStack.stackTagCompound.getInteger("worldTimeDelay") && par1ItemStack.stackTagCompound.getBoolean("isActive"))
|
||||
{
|
||||
if (!par3EntityPlayer.capabilities.isCreativeMode)
|
||||
|
@ -282,8 +264,6 @@ public class BoundPickaxe extends ItemPickaxe implements IBindable
|
|||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
//par1ItemStack.damageItem(2, par3EntityLivingBase);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -295,9 +275,6 @@ public class BoundPickaxe extends ItemPickaxe implements IBindable
|
|||
{
|
||||
EnergyItems.syphonBatteries(par1ItemStack, (EntityPlayer) par7EntityLivingBase, getEnergyUsed());
|
||||
}
|
||||
|
||||
//TODO Possibly add better functionality for the items?
|
||||
//par7EntityLivingBase.getLookVec();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -320,14 +297,6 @@ public class BoundPickaxe extends ItemPickaxe implements IBindable
|
|||
return 30;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return whether this item is repairable in an anvil.
|
||||
*/
|
||||
// public boolean getIsRepairable(ItemStack par1ItemStack, ItemStack par2ItemStack)
|
||||
// {
|
||||
// return false;
|
||||
// }
|
||||
|
||||
/**
|
||||
* FORGE: Overridden to allow custom tool effectiveness
|
||||
*/
|
||||
|
@ -347,30 +316,20 @@ public class BoundPickaxe extends ItemPickaxe implements IBindable
|
|||
return func_150893_a(stack, block);
|
||||
}
|
||||
|
||||
// @Override
|
||||
//
|
||||
// /**
|
||||
// * Returns if the item (tool) can harvest results from the block type.
|
||||
// */
|
||||
// public boolean func_150897_b(Block par1Block) //canHarvestBlock
|
||||
// {
|
||||
// return par1Block == Blocks.obsidian ? true : (par1Block != Blocks.diamond_block && par1Block != Blocks.diamond_ore ? (par1Block != Blocks.emerald_ore && par1Block != Blocks.emerald_block ? (par1Block != Blocks.gold_block && par1Block != Blocks.gold_ore ? (par1Block != Blocks.iron_block && par1Block != Blocks.iron_ore ? (par1Block != Blocks.lapis_block && par1Block != Blocks.lapis_ore ? (par1Block != Blocks.redstone_ore && par1Block != Blocks.oreRedstoneGlowing ? (par1Block.getMaterial() == Material.rock ? true : (par1Block.blockMaterial == Material.iron ? true : par1Block.blockMaterial == Material.anvil)) : true) : true) : true) : true) : true) : true);
|
||||
// }
|
||||
|
||||
@Override
|
||||
public boolean onLeftClickEntity(ItemStack stack, EntityPlayer player, Entity entity)
|
||||
{
|
||||
return !getActivated(stack);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getHarvestLevel(ItemStack stack, String toolClass)
|
||||
{
|
||||
if("pickaxe".equals(toolClass))
|
||||
{
|
||||
return 5;
|
||||
}
|
||||
|
||||
return 0;
|
||||
if ("pickaxe".equals(toolClass))
|
||||
{
|
||||
return 5;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,11 +1,14 @@
|
|||
package WayofTime.alchemicalWizardry.common.items;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
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.IIconRegister;
|
||||
import net.minecraft.enchantment.Enchantment;
|
||||
import net.minecraft.enchantment.EnchantmentHelper;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.SharedMonsterAttributes;
|
||||
|
@ -15,33 +18,17 @@ import net.minecraft.entity.player.EntityPlayer;
|
|||
import net.minecraft.item.ItemSpade;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeHooks;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import net.minecraft.enchantment.EnchantmentHelper;
|
||||
|
||||
import com.google.common.collect.Multimap;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
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.
|
||||
*/
|
||||
public float damageVsEntity;
|
||||
|
||||
private static IIcon activeIcon;
|
||||
|
@ -53,7 +40,6 @@ public class BoundShovel extends ItemSpade implements IBindable
|
|||
{
|
||||
super(AlchemicalWizardry.bloodBoundToolMaterial);
|
||||
this.maxStackSize = 1;
|
||||
//this.setMaxDamage(par3EnumToolMaterial.getMaxUses());
|
||||
this.efficiencyOnProperMaterial = 12.0F;
|
||||
this.damageVsEntity = 5;
|
||||
setCreativeTab(AlchemicalWizardry.tabBloodMagic);
|
||||
|
@ -143,10 +129,10 @@ public class BoundShovel extends ItemSpade implements IBindable
|
|||
}
|
||||
|
||||
Vec3 blockVec = SpellHelper.getEntityBlockVector(par3EntityPlayer);
|
||||
int posX = (int)(blockVec.xCoord);
|
||||
int posY = (int)(blockVec.yCoord);
|
||||
int posZ = (int)(blockVec.zCoord);
|
||||
boolean silkTouch = EnchantmentHelper.getSilkTouchModifier(par3EntityPlayer);
|
||||
int posX = (int) (blockVec.xCoord);
|
||||
int posY = (int) (blockVec.yCoord);
|
||||
int posZ = (int) (blockVec.zCoord);
|
||||
boolean silkTouch = EnchantmentHelper.getSilkTouchModifier(par3EntityPlayer);
|
||||
int fortuneLvl = EnchantmentHelper.getFortuneModifier(par3EntityPlayer);
|
||||
|
||||
for (int i = -5; i <= 5; i++)
|
||||
|
@ -164,7 +150,6 @@ public class BoundShovel extends ItemSpade implements IBindable
|
|||
|
||||
if (str > 1.1f && par2World.canMineBlock(par3EntityPlayer, posX + i, posY + j, posZ + k))
|
||||
{
|
||||
//par1ItemStack.getEnchantmentTagList();
|
||||
if (silkTouch)
|
||||
{
|
||||
ItemStack droppedItem = new ItemStack(block, 1, meta);
|
||||
|
@ -214,12 +199,6 @@ public class BoundShovel extends ItemSpade implements IBindable
|
|||
{
|
||||
par1ItemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
// if(par1ItemStack.stackTagCompound.getBoolean("isActive"))
|
||||
// {
|
||||
// EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, 1);
|
||||
// }
|
||||
|
||||
if (par2World.getWorldTime() % 200 == par1ItemStack.stackTagCompound.getInteger("worldTimeDelay") && par1ItemStack.stackTagCompound.getBoolean("isActive"))
|
||||
{
|
||||
if (!par3EntityPlayer.capabilities.isCreativeMode)
|
||||
|
@ -281,8 +260,6 @@ public class BoundShovel extends ItemSpade implements IBindable
|
|||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
//par1ItemStack.damageItem(2, par3EntityLivingBase);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -309,13 +286,6 @@ public class BoundShovel extends ItemSpade implements IBindable
|
|||
return 30;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return whether this item is repairable in an anvil.
|
||||
*/
|
||||
// public boolean getIsRepairable(ItemStack par1ItemStack, ItemStack par2ItemStack)
|
||||
// {
|
||||
// return false;
|
||||
// }
|
||||
@Override
|
||||
public Multimap getItemAttributeModifiers()
|
||||
{
|
||||
|
@ -342,26 +312,21 @@ public class BoundShovel extends ItemSpade implements IBindable
|
|||
|
||||
return func_150893_a(stack, block);
|
||||
}
|
||||
//
|
||||
// public boolean canHarvestBlock(Block par1Block)
|
||||
// {
|
||||
// return par1Block == Block.snow ? true : par1Block == Block.blockSnow;
|
||||
// }
|
||||
|
||||
@Override
|
||||
public boolean onLeftClickEntity(ItemStack stack, EntityPlayer player, Entity entity)
|
||||
{
|
||||
return !getActivated(stack);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getHarvestLevel(ItemStack stack, String toolClass)
|
||||
{
|
||||
if("shovel".equals(toolClass))
|
||||
{
|
||||
return 5;
|
||||
}
|
||||
|
||||
return 0;
|
||||
if ("shovel".equals(toolClass))
|
||||
{
|
||||
return 5;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,11 @@
|
|||
package WayofTime.alchemicalWizardry.common.items;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable;
|
||||
import WayofTime.alchemicalWizardry.api.soulNetwork.LifeEssenceNetwork;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
|
@ -11,30 +15,17 @@ import net.minecraft.server.MinecraftServer;
|
|||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.FakePlayer;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable;
|
||||
import WayofTime.alchemicalWizardry.api.soulNetwork.LifeEssenceNetwork;
|
||||
import WayofTime.alchemicalWizardry.common.PacketHandler;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class CheatyItem extends Item implements IBindable
|
||||
{
|
||||
// private int maxEssence;
|
||||
//protected int orbLevel;
|
||||
|
||||
public CheatyItem()
|
||||
{
|
||||
super();
|
||||
DamageSource damageSource = DamageSource.generic;
|
||||
setMaxStackSize(1);
|
||||
//setMaxDamage(damage);
|
||||
setCreativeTab(AlchemicalWizardry.tabBloodMagic);
|
||||
//setFull3D();
|
||||
//maxEssence = damage;
|
||||
//orbLevel = 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -51,19 +42,10 @@ public class CheatyItem extends Item implements IBindable
|
|||
par3List.add("Right-click to fill network,");
|
||||
par3List.add("shift-right to empty.");
|
||||
|
||||
//par3List.add("LP: " + (this.getMaxDamage() - this.getDamage(par1ItemStack)));
|
||||
if (!(par1ItemStack.stackTagCompound == null))
|
||||
{
|
||||
par3List.add("Current owner: " + par1ItemStack.stackTagCompound.getString("ownerName"));
|
||||
// EntityPlayer owner = MinecraftServer.getServer().getConfigurationManager().getPlayerForUsername(par1ItemStack.stackTagCompound.getString("ownerName"));
|
||||
// if(owner!=null)
|
||||
// {
|
||||
// NBTTagCompound tag = owner.getEntityData();
|
||||
// par3List.add("LP: " + tag.getInteger("currentEssence"));
|
||||
// }
|
||||
}
|
||||
|
||||
//par3List.add("LP: " + par2EntityPlayer.getEntityData().getInteger("currentEssence"));
|
||||
}
|
||||
|
||||
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)
|
||||
|
@ -104,16 +86,6 @@ public class CheatyItem extends Item implements IBindable
|
|||
{
|
||||
EnergyItems.addEssenceToMaximum(itemTag.getString("ownerName"), 1000000, Integer.MAX_VALUE);
|
||||
}
|
||||
|
||||
//PacketDispatcher.sendPacketToPlayer(PacketHandler.getPacket(itemTag.getString("ownerName")), (Player)par3EntityPlayer);
|
||||
// EntityPlayer owner = MinecraftServer.getServer().getConfigurationManager().getPlayerForUsername(itemTag.getString("ownerName"));
|
||||
// if(owner==null){return par1ItemStack;}
|
||||
// NBTTagCompound ownerTag = owner.getEntityData();
|
||||
// if(ownerTag.getInteger("currentEssence")<=this.maxEssence)
|
||||
// {
|
||||
// damagePlayer(par2World, par3EntityPlayer,2);
|
||||
// ownerTag.setInteger("currentEssence", Math.min(this.maxEssence, ownerTag.getInteger("currentEssence")+200/2));
|
||||
// }
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
|
@ -156,7 +128,6 @@ public class CheatyItem extends Item implements IBindable
|
|||
for (int i = 0; i < damage; i++)
|
||||
{
|
||||
player.setHealth((player.getHealth() - 1));
|
||||
//player.setEntityHealth(player.func_110143_aJ() - 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -166,48 +137,9 @@ public class CheatyItem extends Item implements IBindable
|
|||
}
|
||||
}
|
||||
|
||||
// public int getMaxEssence()
|
||||
// {
|
||||
// return this.maxEssence;
|
||||
// }
|
||||
//
|
||||
// public int getOrbLevel()
|
||||
// {
|
||||
// return orbLevel;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onArmourUpdate(World world, EntityPlayer player,
|
||||
// ItemStack thisItemStack) {
|
||||
// // TODO Auto-generated method stub
|
||||
//
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public boolean isUpgrade()
|
||||
// {
|
||||
// // TODO Auto-generated method stub
|
||||
// return false;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public int getEnergyForTenSeconds()
|
||||
// {
|
||||
// // TODO Auto-generated method stub
|
||||
// return 0;
|
||||
// }
|
||||
|
||||
@Override
|
||||
public ItemStack getContainerItem(ItemStack itemStack)
|
||||
{
|
||||
//if(!syphonBatteries(itemStack, null, 10))
|
||||
{
|
||||
//syphonWhileInContainer(itemStack, this.getEnergyUsed());
|
||||
// ItemStack copiedStack = itemStack.copy();
|
||||
// copiedStack.setItemDamage(copiedStack.getItemDamage());
|
||||
// copiedStack.stackSize = 1;
|
||||
// return copiedStack;
|
||||
}
|
||||
return itemStack;
|
||||
}
|
||||
|
||||
|
@ -217,7 +149,6 @@ public class CheatyItem extends Item implements IBindable
|
|||
return true;
|
||||
}
|
||||
|
||||
//@SideOnly(Side.SERVER)
|
||||
public int getCurrentEssence(ItemStack par1ItemStack)
|
||||
{
|
||||
if (par1ItemStack == null)
|
||||
|
|
|
@ -1,7 +1,11 @@
|
|||
package WayofTime.alchemicalWizardry.common.items;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar;
|
||||
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.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
|
@ -16,20 +20,13 @@ import net.minecraft.entity.monster.EntitySlime;
|
|||
import net.minecraft.entity.passive.EntityAnimal;
|
||||
import net.minecraft.entity.passive.EntityVillager;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar;
|
||||
|
||||
import com.google.common.collect.Multimap;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import java.util.List;
|
||||
|
||||
public class DaggerOfSacrifice extends EnergyItems
|
||||
{
|
||||
|
@ -61,14 +58,13 @@ public class DaggerOfSacrifice extends EnergyItems
|
|||
return false;
|
||||
}
|
||||
|
||||
//EntityWither d;
|
||||
if (par2EntityLivingBase.isChild() || par2EntityLivingBase instanceof EntityWither || par2EntityLivingBase instanceof EntityDragon || par2EntityLivingBase instanceof EntityPlayer || par2EntityLivingBase instanceof IBossDisplayData)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
World world = par2EntityLivingBase.worldObj;
|
||||
|
||||
|
||||
if (par2EntityLivingBase.isDead || par2EntityLivingBase.getHealth() < 0.5f)
|
||||
{
|
||||
return false;
|
||||
|
@ -82,8 +78,7 @@ public class DaggerOfSacrifice extends EnergyItems
|
|||
double posY = par2EntityLivingBase.posY;
|
||||
double posZ = par2EntityLivingBase.posZ;
|
||||
|
||||
|
||||
|
||||
|
||||
for (int i = 0; i < 8; i++)
|
||||
{
|
||||
SpellHelper.sendIndexedParticleToAllAround(world, posX, posY, posZ, 20, world.provider.dimensionId, 1, posX, posY, posZ);
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
package WayofTime.alchemicalWizardry.common.items;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import WayofTime.alchemicalWizardry.api.summoningRegistry.SummoningRegistry;
|
||||
import WayofTime.alchemicalWizardry.common.entity.mob.EntityDemon;
|
||||
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.IIconRegister;
|
||||
|
@ -16,20 +18,14 @@ import net.minecraft.item.Item;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.Facing;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.api.summoningRegistry.SummoningRegistry;
|
||||
import WayofTime.alchemicalWizardry.common.entity.mob.EntityDemon;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class DemonPlacer extends Item
|
||||
{
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon theIcon;
|
||||
|
||||
public DemonPlacer()
|
||||
{
|
||||
super();
|
||||
|
@ -40,15 +36,6 @@ public class DemonPlacer extends Item
|
|||
|
||||
public String getItemDisplayName(ItemStack par1ItemStack)
|
||||
{
|
||||
// String s = ("" + StatCollector.translateToLocal(this.getUnlocalizedName() + ".name")).trim();
|
||||
// String s1 = EntityList.getStringFromID(par1ItemStack.getItemDamage());
|
||||
//
|
||||
// if (s1 != null)
|
||||
// {
|
||||
// s = s + " " + StatCollector.translateToLocal("entity." + s1 + ".name");
|
||||
// }
|
||||
//
|
||||
// return s;
|
||||
return "Demon Crystal";
|
||||
}
|
||||
|
||||
|
@ -163,77 +150,35 @@ public class DemonPlacer extends Item
|
|||
*/
|
||||
public static Entity spawnCreature(World par0World, int par1, double par2, double par4, double par6, ItemStack itemStack)
|
||||
{
|
||||
// if (!EntityList.entityEggs.containsKey(Integer.valueOf(par1)))
|
||||
// {
|
||||
// return null;
|
||||
// }
|
||||
// else
|
||||
Entity entity = null;
|
||||
|
||||
for (int j = 0; j < 1; ++j)
|
||||
{
|
||||
Entity entity = null;
|
||||
entity = SummoningRegistry.getEntityWithID(par0World, par1);
|
||||
|
||||
for (int j = 0; j < 1; ++j)
|
||||
if (entity != null && entity instanceof EntityLivingBase)
|
||||
{
|
||||
entity = SummoningRegistry.getEntityWithID(par0World, par1);
|
||||
|
||||
if (entity != null && entity instanceof EntityLivingBase)
|
||||
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;
|
||||
if (entityliving instanceof EntityDemon)
|
||||
{
|
||||
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;
|
||||
((EntityDemon) entityliving).func_152115_b(DemonPlacer.getOwnerName(itemStack));
|
||||
|
||||
//entityliving.onSpawnWithEgg((EntityLivingData)null);
|
||||
if (entityliving instanceof EntityDemon)
|
||||
if (!DemonPlacer.getOwnerName(itemStack).equals(""))
|
||||
{
|
||||
((EntityDemon) entityliving).func_152115_b(DemonPlacer.getOwnerName(itemStack));
|
||||
|
||||
if (!DemonPlacer.getOwnerName(itemStack).equals(""))
|
||||
{
|
||||
((EntityDemon) entityliving).setTamed(true);
|
||||
}
|
||||
((EntityDemon) entityliving).setTamed(true);
|
||||
}
|
||||
|
||||
par0World.spawnEntityInWorld(entity);
|
||||
entityliving.playLivingSound();
|
||||
}
|
||||
|
||||
par0World.spawnEntityInWorld(entity);
|
||||
entityliving.playLivingSound();
|
||||
}
|
||||
|
||||
return entity;
|
||||
}
|
||||
return entity;
|
||||
}
|
||||
|
||||
// @SideOnly(Side.CLIENT)
|
||||
// public boolean requiresMultipleRenderPasses()
|
||||
// {
|
||||
// return true;
|
||||
// }
|
||||
|
||||
// @SideOnly(Side.CLIENT)
|
||||
//
|
||||
// /**
|
||||
// * Gets an icon index based on an item's damage value and the given render pass
|
||||
// */
|
||||
// public Icon getIconFromDamageForRenderPass(int par1, int par2)
|
||||
// {
|
||||
// return par2 > 0 ? this.theIcon : super.getIconFromDamageForRenderPass(par1, par2);
|
||||
// }
|
||||
|
||||
// @SideOnly(Side.CLIENT)
|
||||
//
|
||||
// /**
|
||||
// * returns a list of items with the same ID, but different meta (eg: dye returns 16 items)
|
||||
// */
|
||||
// public void getSubItems(int par1, CreativeTabs par2CreativeTabs, List par3List)
|
||||
// {
|
||||
// Iterator iterator = EntityList.entityEggs.values().iterator();
|
||||
//
|
||||
// while (iterator.hasNext())
|
||||
// {
|
||||
// EntityEggInfo entityegginfo = (EntityEggInfo)iterator.next();
|
||||
// par3List.add(new ItemStack(par1, 1, entityegginfo.spawnedID));
|
||||
// }
|
||||
// }
|
||||
|
||||
public static void setOwnerName(ItemStack par1ItemStack, String ownerName)
|
||||
{
|
||||
if (par1ItemStack.stackTagCompound == null)
|
||||
|
|
|
@ -1,27 +1,25 @@
|
|||
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.IIconRegister;
|
||||
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;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class DemonicTelepositionFocus extends TelepositionFocus
|
||||
{
|
||||
public DemonicTelepositionFocus()
|
||||
{
|
||||
super(4);
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister iconRegister)
|
||||
{
|
||||
//TODO
|
||||
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:DemonicTeleposerFocus");
|
||||
}
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package WayofTime.alchemicalWizardry.common.items;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
|
||||
public class DuskScribeTool extends ScribeTool
|
||||
{
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package WayofTime.alchemicalWizardry.common.items;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
|
||||
public class EarthScribeTool extends ScribeTool
|
||||
{
|
||||
|
|
|
@ -1,15 +1,5 @@
|
|||
package WayofTime.alchemicalWizardry.common.items;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable;
|
||||
|
@ -18,6 +8,16 @@ import WayofTime.alchemicalWizardry.api.soulNetwork.LifeEssenceNetwork;
|
|||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class EnergyBattery extends Item implements ArmourUpgrade, IBindable, IBloodOrb
|
||||
{
|
||||
|
@ -29,9 +29,7 @@ public class EnergyBattery extends Item implements ArmourUpgrade, IBindable, IBl
|
|||
super();
|
||||
DamageSource damageSource = DamageSource.generic;
|
||||
setMaxStackSize(1);
|
||||
//setMaxDamage(damage);
|
||||
setCreativeTab(AlchemicalWizardry.tabBloodMagic);
|
||||
//setFull3D();
|
||||
maxEssence = damage;
|
||||
orbLevel = 1;
|
||||
}
|
||||
|
@ -47,32 +45,16 @@ public class EnergyBattery extends Item implements ArmourUpgrade, IBindable, IBl
|
|||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4)
|
||||
{
|
||||
par3List.add("Stores raw Life Essence");
|
||||
|
||||
//par3List.add("LP: " + (this.getMaxDamage() - this.getDamage(par1ItemStack)));
|
||||
if (!(par1ItemStack.stackTagCompound == null))
|
||||
{
|
||||
par3List.add("Current owner: " + par1ItemStack.stackTagCompound.getString("ownerName"));
|
||||
// EntityPlayer owner = MinecraftServer.getServer().getConfigurationManager().getPlayerForUsername(par1ItemStack.stackTagCompound.getString("ownerName"));
|
||||
// if(owner!=null)
|
||||
// {
|
||||
// NBTTagCompound tag = owner.getEntityData();
|
||||
// par3List.add("LP: " + tag.getInteger("currentEssence"));
|
||||
// }
|
||||
}
|
||||
|
||||
//par3List.add("LP: " + par2EntityPlayer.getEntityData().getInteger("currentEssence"));
|
||||
}
|
||||
|
||||
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)
|
||||
{
|
||||
EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer);
|
||||
World world = par3EntityPlayer.worldObj;
|
||||
|
||||
// if (par3EntityPlayer instanceof FakePlayer || par3EntityPlayer instanceof EntityPlayerMP)
|
||||
// {
|
||||
// return par1ItemStack;
|
||||
// }
|
||||
|
||||
if (world != null)
|
||||
{
|
||||
double posX = par3EntityPlayer.posX;
|
||||
|
@ -81,41 +63,20 @@ public class EnergyBattery extends Item implements ArmourUpgrade, IBindable, IBl
|
|||
world.playSoundEffect((double) ((float) posX + 0.5F), (double) ((float) posY + 0.5F), (double) ((float) posZ + 0.5F), "random.fizz", 0.5F, 2.6F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.8F);
|
||||
SpellHelper.sendIndexedParticleToAllAround(world, posX, posY, posZ, 20, world.provider.dimensionId, 4, posX, posY, posZ);
|
||||
}
|
||||
|
||||
// if (!(par3EntityPlayer.getClass().equals(EntityPlayerMP.class)))
|
||||
// {
|
||||
// return par1ItemStack;
|
||||
// }
|
||||
|
||||
|
||||
|
||||
// if (Keyboard.isKeyDown(Keyboard.KEY_RSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_LSHIFT))
|
||||
// {
|
||||
// return par1ItemStack;
|
||||
// }
|
||||
NBTTagCompound itemTag = par1ItemStack.stackTagCompound;
|
||||
|
||||
if (itemTag == null || itemTag.getString("ownerName").equals(""))
|
||||
{
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
if(world.isRemote)
|
||||
|
||||
if (world.isRemote)
|
||||
{
|
||||
return par1ItemStack;
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
EnergyItems.addEssenceToMaximum(itemTag.getString("ownerName"), 200, this.getMaxEssence());
|
||||
EnergyItems.hurtPlayer(par3EntityPlayer, 200);
|
||||
//PacketDispatcher.sendPacketToPlayer(PacketHandler.getPacket(itemTag.getString("ownerName")), (Player)par3EntityPlayer);
|
||||
// EntityPlayer owner = MinecraftServer.getServer().getConfigurationManager().getPlayerForUsername(itemTag.getString("ownerName"));
|
||||
// if(owner==null){return par1ItemStack;}
|
||||
// NBTTagCompound ownerTag = owner.getEntityData();
|
||||
// if(ownerTag.getInteger("currentEssence")<=this.maxEssence)
|
||||
// {
|
||||
// damagePlayer(par2World, par3EntityPlayer,2);
|
||||
// ownerTag.setInteger("currentEssence", Math.min(this.maxEssence, ownerTag.getInteger("currentEssence")+200/2));
|
||||
// }
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
|
@ -158,7 +119,6 @@ public class EnergyBattery extends Item implements ArmourUpgrade, IBindable, IBl
|
|||
for (int i = 0; i < damage; i++)
|
||||
{
|
||||
player.setHealth((player.getHealth() - 1));
|
||||
//player.setEntityHealth(player.func_110143_aJ() - 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -198,14 +158,6 @@ public class EnergyBattery extends Item implements ArmourUpgrade, IBindable, IBl
|
|||
@Override
|
||||
public ItemStack getContainerItem(ItemStack itemStack)
|
||||
{
|
||||
//if(!syphonBatteries(itemStack, null, 10))
|
||||
{
|
||||
//syphonWhileInContainer(itemStack, this.getEnergyUsed());
|
||||
// ItemStack copiedStack = itemStack.copy();
|
||||
// copiedStack.setItemDamage(copiedStack.getItemDamage());
|
||||
// copiedStack.stackSize = 1;
|
||||
// return copiedStack;
|
||||
}
|
||||
return itemStack;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
package WayofTime.alchemicalWizardry.common.items;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import WayofTime.alchemicalWizardry.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.IIconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
@ -10,17 +12,14 @@ import net.minecraft.nbt.NBTTagCompound;
|
|||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.EntityEnergyBazookaMainProjectile;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class EnergyBazooka extends EnergyItems
|
||||
{
|
||||
private static IIcon activeIcon;
|
||||
private static IIcon passiveIcon;
|
||||
private static int damage;
|
||||
//private static int delay;
|
||||
private static final int maxDelay = 150;
|
||||
|
||||
public EnergyBazooka()
|
||||
|
@ -32,7 +31,6 @@ public class EnergyBazooka extends EnergyItems
|
|||
setMaxDamage(250);
|
||||
this.setEnergyUsed(20000);
|
||||
damage = 12;
|
||||
//delay = 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -94,7 +92,6 @@ public class EnergyBazooka extends EnergyItems
|
|||
|
||||
if (!par2World.isRemote)
|
||||
{
|
||||
//par2World.spawnEntityInWorld(new EntityEnergyBazookaMainProjectile(par2World, par3EntityPlayer, damage));
|
||||
par2World.spawnEntityInWorld(new EntityEnergyBazookaMainProjectile(par2World, par3EntityPlayer, damage));
|
||||
this.setDelay(par1ItemStack, maxDelay);
|
||||
}
|
||||
|
@ -123,11 +120,6 @@ public class EnergyBazooka extends EnergyItems
|
|||
{
|
||||
par1ItemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
// if(par1ItemStack.stackTagCompound.getBoolean("isActive"))
|
||||
// {
|
||||
// EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, 1);
|
||||
// }
|
||||
int delay = this.getDelay(par1ItemStack);
|
||||
|
||||
if (!par2World.isRemote && delay > 0)
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
package WayofTime.alchemicalWizardry.common.items;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import WayofTime.alchemicalWizardry.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.IIconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
@ -9,17 +11,14 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.entity.projectile.EnergyBlastProjectile;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class EnergyBlast extends EnergyItems
|
||||
{
|
||||
private static IIcon activeIcon;
|
||||
private static IIcon passiveIcon;
|
||||
private static int damage;
|
||||
//private static int delay;
|
||||
private static final int maxDelay = 15;
|
||||
|
||||
public EnergyBlast()
|
||||
|
@ -32,7 +31,6 @@ public class EnergyBlast extends EnergyItems
|
|||
setMaxDamage(250);
|
||||
this.setEnergyUsed(150);
|
||||
damage = 12;
|
||||
//delay = 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -94,7 +92,6 @@ public class EnergyBlast extends EnergyItems
|
|||
|
||||
if (!par2World.isRemote)
|
||||
{
|
||||
//par2World.spawnEntityInWorld(new EnergyBlastProjectile(par2World, par3EntityPlayer, damage));
|
||||
par2World.spawnEntityInWorld(new EnergyBlastProjectile(par2World, par3EntityPlayer, damage));
|
||||
this.setDelay(par1ItemStack, maxDelay);
|
||||
}
|
||||
|
@ -109,18 +106,12 @@ public class EnergyBlast extends EnergyItems
|
|||
{
|
||||
return;
|
||||
}
|
||||
|
||||
EntityPlayer par3EntityPlayer = (EntityPlayer) par3Entity;
|
||||
|
||||
if (par1ItemStack.stackTagCompound == null)
|
||||
{
|
||||
par1ItemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
// if(par1ItemStack.stackTagCompound.getBoolean("isActive"))
|
||||
// {
|
||||
// EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, 1);
|
||||
// }
|
||||
int delay = this.getDelay(par1ItemStack);
|
||||
|
||||
if (!par2World.isRemote && delay > 0)
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
package WayofTime.alchemicalWizardry.common.items;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable;
|
||||
import WayofTime.alchemicalWizardry.api.soulNetwork.LifeEssenceNetwork;
|
||||
import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
@ -7,11 +12,6 @@ import net.minecraft.nbt.NBTTagCompound;
|
|||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable;
|
||||
import WayofTime.alchemicalWizardry.api.soulNetwork.LifeEssenceNetwork;
|
||||
import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
|
||||
public class EnergyItems extends Item implements IBindable
|
||||
{
|
||||
|
@ -32,8 +32,6 @@ public class EnergyItems extends Item implements IBindable
|
|||
{
|
||||
return this.energyUsed;
|
||||
}
|
||||
//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)
|
||||
{
|
||||
|
@ -47,16 +45,13 @@ public class EnergyItems extends Item implements IBindable
|
|||
float f1 = f * 0.6F + 0.4F;
|
||||
float f2 = f * f * 0.7F - 0.5F;
|
||||
float f3 = f * f * 0.6F - 0.7F;
|
||||
|
||||
for (int l = 0; l < 8; ++l)
|
||||
{
|
||||
world.spawnParticle("reddust", posX + Math.random() - Math.random(), posY + Math.random() - Math.random(), posZ + Math.random() - Math.random(), f1, f2, f3);
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < damage; i++)
|
||||
{
|
||||
//player.setEntityHealth((player.getHealth()-1));
|
||||
player.setHealth((player.getHealth() - 1));
|
||||
|
||||
if (player.getHealth() <= 0.0005)
|
||||
|
@ -75,22 +70,17 @@ public class EnergyItems extends Item implements IBindable
|
|||
} else
|
||||
{
|
||||
World world = player.worldObj;
|
||||
|
||||
if (world != null)
|
||||
{
|
||||
double posX = player.posX;
|
||||
double posY = player.posY;
|
||||
double posZ = player.posZ;
|
||||
//if(particles)
|
||||
{
|
||||
SpellHelper.sendIndexedParticleToAllAround(world, posX, posY, posZ, 20, world.provider.dimensionId, 4, posX, posY, posZ);
|
||||
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);
|
||||
}
|
||||
|
||||
SpellHelper.sendIndexedParticleToAllAround(world, posX, posY, posZ, 20, world.provider.dimensionId, 4, posX, posY, posZ);
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
//return syphonBatteriesWithoutParticles(ist, player, damageToBeDone, true);
|
||||
}
|
||||
|
||||
public static boolean syphonWhileInContainer(ItemStack ist, int damageToBeDone)
|
||||
|
@ -119,16 +109,6 @@ public class EnergyItems extends Item implements IBindable
|
|||
data.markDirty();
|
||||
return true;
|
||||
}
|
||||
|
||||
// EntityPlayer ownerEntity = MinecraftServer.getServer().getConfigurationManager().getPlayerForUsername(ist.getTagCompound().getString("ownerName"));
|
||||
// if(ownerEntity==null){return false;}
|
||||
// NBTTagCompound tag = ownerEntity.getEntityData();
|
||||
// int currentEssence = tag.getInteger("currentEssence");
|
||||
// if(currentEssence>=damageToBeDone)
|
||||
// {
|
||||
// tag.setInteger("currentEssence", currentEssence-damageToBeDone);
|
||||
// return true;
|
||||
// }
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@ -155,15 +135,6 @@ public class EnergyItems extends Item implements IBindable
|
|||
}
|
||||
|
||||
return data.currentEssence >= damageToBeDone;
|
||||
// EntityPlayer ownerEntity = MinecraftServer.getServer().getConfigurationManager().getPlayerForUsername(ist.getTagCompound().getString("ownerName"));
|
||||
// if(ownerEntity==null){return false;}
|
||||
// NBTTagCompound tag = ownerEntity.getEntityData();
|
||||
// int currentEssence = tag.getInteger("currentEssence");
|
||||
// if(currentEssence>=damageToBeDone)
|
||||
// {
|
||||
// tag.setInteger("currentEssence", currentEssence-damageToBeDone);
|
||||
// return true;
|
||||
// }
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@ -175,13 +146,12 @@ public class EnergyItems extends Item implements IBindable
|
|||
{
|
||||
if (!user.capabilities.isCreativeMode)
|
||||
{
|
||||
//player.setEntityHealth((player.getHealth()-1));
|
||||
user.setHealth((user.getHealth() - 1));
|
||||
|
||||
if (user.getHealth() <= 0.0005f)
|
||||
{
|
||||
user.onDeath(DamageSource.generic);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
} else if (energySyphoned >= 100)
|
||||
|
@ -190,7 +160,6 @@ public class EnergyItems extends Item implements IBindable
|
|||
{
|
||||
for (int i = 0; i < ((energySyphoned + 99) / 100); i++)
|
||||
{
|
||||
//player.setEntityHealth((player.getHealth()-1));
|
||||
user.setHealth((user.getHealth() - 1));
|
||||
|
||||
if (user.getHealth() <= 0.0005f)
|
||||
|
@ -228,15 +197,15 @@ public class EnergyItems extends Item implements IBindable
|
|||
|
||||
initializePlayer(player);
|
||||
}
|
||||
|
||||
|
||||
public static void setItemOwner(ItemStack item, String ownerName)
|
||||
{
|
||||
if (item.stackTagCompound == null)
|
||||
if (item.stackTagCompound == null)
|
||||
{
|
||||
item.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
item.stackTagCompound.setString("ownerName", ownerName);
|
||||
item.stackTagCompound.setString("ownerName", ownerName);
|
||||
}
|
||||
|
||||
public static void checkAndSetItemOwner(ItemStack item, String ownerName)
|
||||
|
@ -271,11 +240,11 @@ public class EnergyItems extends Item implements IBindable
|
|||
|
||||
return item.stackTagCompound.getString("ownerName");
|
||||
}
|
||||
|
||||
|
||||
public static void drainPlayerNetwork(EntityPlayer player, int damageToBeDone)
|
||||
{
|
||||
String ownerName = SpellHelper.getUsername(player);
|
||||
|
||||
String ownerName = SpellHelper.getUsername(player);
|
||||
|
||||
if (MinecraftServer.getServer() == null)
|
||||
{
|
||||
return;
|
||||
|
@ -294,15 +263,15 @@ public class EnergyItems extends Item implements IBindable
|
|||
{
|
||||
data.currentEssence -= damageToBeDone;
|
||||
data.markDirty();
|
||||
}else
|
||||
} else
|
||||
{
|
||||
hurtPlayer(player, damageToBeDone);
|
||||
hurtPlayer(player, damageToBeDone);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static int getCurrentEssence(String ownerName)
|
||||
{
|
||||
if (MinecraftServer.getServer() == null)
|
||||
if (MinecraftServer.getServer() == null)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -318,10 +287,10 @@ public class EnergyItems extends Item implements IBindable
|
|||
|
||||
return data.currentEssence;
|
||||
}
|
||||
|
||||
|
||||
public static void setCurrentEssence(String ownerName, int amount)
|
||||
{
|
||||
if (MinecraftServer.getServer() == null)
|
||||
if (MinecraftServer.getServer() == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -338,10 +307,10 @@ public class EnergyItems extends Item implements IBindable
|
|||
data.currentEssence = amount;
|
||||
data.markDirty();
|
||||
}
|
||||
|
||||
|
||||
public static void addEssenceToMaximum(String ownerName, int amount, int maximum)
|
||||
{
|
||||
if (MinecraftServer.getServer() == null)
|
||||
if (MinecraftServer.getServer() == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -355,11 +324,11 @@ public class EnergyItems extends Item implements IBindable
|
|||
world.setItemData(ownerName, data);
|
||||
}
|
||||
|
||||
if(data.currentEssence>=maximum)
|
||||
if (data.currentEssence >= maximum)
|
||||
{
|
||||
return;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
data.currentEssence = Math.min(maximum, data.currentEssence + amount);
|
||||
data.markDirty();
|
||||
}
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
package WayofTime.alchemicalWizardry.common.items;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import WayofTime.alchemicalWizardry.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.IIconRegister;
|
||||
|
@ -16,19 +17,14 @@ import net.minecraft.potion.Potion;
|
|||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class EnergySword extends ItemSword
|
||||
{
|
||||
//private float weaponDamaged;
|
||||
//private int maxMode = 3;
|
||||
private NBTTagCompound data;
|
||||
|
||||
private static IIcon activeIcon;
|
||||
private static IIcon passiveIcon;
|
||||
|
||||
private int energyUsed;
|
||||
|
||||
public EnergySword()
|
||||
|
@ -39,7 +35,6 @@ public class EnergySword extends ItemSword
|
|||
setEnergyUsed(50);
|
||||
setFull3D();
|
||||
setMaxDamage(100);
|
||||
//weaponDamaged = 12.0F;
|
||||
}
|
||||
|
||||
public void setEnergyUsed(int i)
|
||||
|
@ -95,7 +90,6 @@ public class EnergySword extends ItemSword
|
|||
|
||||
if (!EnergyItems.syphonBatteries(par1ItemStack, (EntityPlayer) par3EntityLivingBase, this.getEnergyUsed()))
|
||||
{
|
||||
//this.damagePlayer(null, (EntityPlayer)par3EntityLivingBase, (this.getEnergyUsed() + 99) / 100);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -144,11 +138,6 @@ public class EnergySword extends ItemSword
|
|||
par1ItemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
// if(par1ItemStack.stackTagCompound.getBoolean("isActive"))
|
||||
// {
|
||||
// EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, 1);
|
||||
// }
|
||||
|
||||
if (par2World.getWorldTime() % 100 == par1ItemStack.stackTagCompound.getInteger("worldTimeDelay") && par1ItemStack.stackTagCompound.getBoolean("isActive"))
|
||||
{
|
||||
if (!par3EntityPlayer.capabilities.isCreativeMode)
|
||||
|
@ -185,11 +174,6 @@ public class EnergySword extends ItemSword
|
|||
return itemTag.getBoolean("isActive");
|
||||
}
|
||||
|
||||
// public int getDamageVsEntity(Entity par1Entity)
|
||||
// {
|
||||
// return (int) this.weaponDamage;
|
||||
// }
|
||||
|
||||
public float func_82803_g()
|
||||
{
|
||||
return 4.0F;
|
||||
|
@ -230,9 +214,4 @@ public class EnergySword extends ItemSword
|
|||
return material != Material.plants && material != Material.vine && material != Material.coral && material != Material.leaves && material != Material.gourd ? 1.0F : 1.5F;
|
||||
}
|
||||
}
|
||||
|
||||
// public boolean getIsRepairable(ItemStack par1ItemStack, ItemStack par2ItemStack)
|
||||
// {
|
||||
// return false;
|
||||
// }
|
||||
}
|
||||
|
|
|
@ -1,27 +1,25 @@
|
|||
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.IIconRegister;
|
||||
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;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class EnhancedTelepositionFocus extends TelepositionFocus
|
||||
{
|
||||
public EnhancedTelepositionFocus()
|
||||
{
|
||||
super(2);
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister iconRegister)
|
||||
{
|
||||
//TODO
|
||||
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:EnhancedTeleposerFocus");
|
||||
}
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package WayofTime.alchemicalWizardry.common.items;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
|
||||
public class FireScribeTool extends ScribeTool
|
||||
{
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
package WayofTime.alchemicalWizardry.common.items;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
@ -11,17 +13,13 @@ import net.minecraft.util.EnumChatFormatting;
|
|||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import java.util.List;
|
||||
|
||||
public class ItemAlchemyBase extends Item
|
||||
{
|
||||
private static final String[] ITEM_NAMES = new String[]{"Offensa","Praesidium","OrbisTerrae","StrengthenedCatalyst","ConcentratedCatalyst","FracturedBone","Virtus","Reductus","Potentia"};
|
||||
private static final String[] ITEM_NAMES = new String[]{"Offensa", "Praesidium", "OrbisTerrae", "StrengthenedCatalyst", "ConcentratedCatalyst", "FracturedBone", "Virtus", "Reductus", "Potentia"};
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon[] icons;
|
||||
|
@ -45,7 +43,7 @@ public class ItemAlchemyBase extends Item
|
|||
icons[i] = iconRegister.registerIcon("AlchemicalWizardry:" + "baseAlchemyItem" + ITEM_NAMES[i]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4)
|
||||
{
|
||||
|
@ -82,7 +80,6 @@ public class ItemAlchemyBase extends Item
|
|||
@Override
|
||||
public String getUnlocalizedName(ItemStack itemStack)
|
||||
{
|
||||
//This is what will do all the localisation things on the alchemy components so you dont have to set it :D
|
||||
int meta = MathHelper.clamp_int(itemStack.getItemDamage(), 0, ITEM_NAMES.length - 1);
|
||||
return ("" + "item.bloodMagicAlchemyItem." + ITEM_NAMES[meta]);
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package WayofTime.alchemicalWizardry.common.items;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainer;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentStack;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
|
@ -10,16 +10,14 @@ import net.minecraft.nbt.NBTTagCompound;
|
|||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.Constants;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainer;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentStack;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ItemBlockCrystalBelljar extends ItemBlock
|
||||
{
|
||||
public ItemBlockCrystalBelljar(Block par1)
|
||||
{
|
||||
super(par1);
|
||||
// this.setUnlocalizedName("itemSpellEnhancementBlock");
|
||||
// setCreativeTab(AlchemicalWizardry.tabBloodMagic);
|
||||
this.setHasSubtypes(true);
|
||||
this.setMaxDamage(0);
|
||||
this.setMaxStackSize(16);
|
||||
|
@ -29,68 +27,68 @@ public class ItemBlockCrystalBelljar extends ItemBlock
|
|||
{
|
||||
return par1;
|
||||
}
|
||||
|
||||
|
||||
public ReagentContainer[] getReagentContainers(ItemStack stack)
|
||||
{
|
||||
if(stack != null && stack.hasTagCompound())
|
||||
{
|
||||
NBTTagCompound tag = stack.getTagCompound();
|
||||
|
||||
NBTTagList tagList = tag.getTagList("reagentTanks", Constants.NBT.TAG_COMPOUND);
|
||||
|
||||
if (stack != null && stack.hasTagCompound())
|
||||
{
|
||||
NBTTagCompound tag = stack.getTagCompound();
|
||||
|
||||
NBTTagList tagList = tag.getTagList("reagentTanks", Constants.NBT.TAG_COMPOUND);
|
||||
|
||||
int size = tagList.tagCount();
|
||||
ReagentContainer[] tanks = new ReagentContainer[size];
|
||||
|
||||
for(int i=0; i<size; i++)
|
||||
|
||||
for (int i = 0; i < size; i++)
|
||||
{
|
||||
NBTTagCompound savedTag = tagList.getCompoundTagAt(i);
|
||||
tanks[i] = ReagentContainer.readFromNBT(savedTag);
|
||||
NBTTagCompound savedTag = tagList.getCompoundTagAt(i);
|
||||
tanks[i] = ReagentContainer.readFromNBT(savedTag);
|
||||
}
|
||||
|
||||
|
||||
return tanks;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean par4)
|
||||
{
|
||||
ReagentContainer[] tanks = this.getReagentContainers(stack);
|
||||
|
||||
if(tanks == null)
|
||||
|
||||
if (tanks == null)
|
||||
{
|
||||
list.add("- Empty");
|
||||
}else
|
||||
list.add("- Empty");
|
||||
} else
|
||||
{
|
||||
list.add("Current Contents:");
|
||||
for(int i=0; i<tanks.length; i++)
|
||||
{
|
||||
if(tanks[i] == null || tanks[i].getReagent() == null || tanks[i].getReagent().reagent == null)
|
||||
{
|
||||
list.add("- Empty");
|
||||
}else
|
||||
{
|
||||
ReagentStack reagentStack = tanks[i].getReagent();
|
||||
list.add("- " + reagentStack.reagent.name + ": " + reagentStack.amount + "/" + tanks[i].getCapacity()/1000 + "k AR");
|
||||
}
|
||||
}
|
||||
list.add("Current Contents:");
|
||||
for (int i = 0; i < tanks.length; i++)
|
||||
{
|
||||
if (tanks[i] == null || tanks[i].getReagent() == null || tanks[i].getReagent().reagent == null)
|
||||
{
|
||||
list.add("- Empty");
|
||||
} else
|
||||
{
|
||||
ReagentStack reagentStack = tanks[i].getReagent();
|
||||
list.add("- " + reagentStack.reagent.name + ": " + reagentStack.amount + "/" + tanks[i].getCapacity() / 1000 + "k AR");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean placeBlockAt(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ, int metadata)
|
||||
{
|
||||
if (!world.setBlock(x, y, z, field_150939_a, metadata, 3))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (!world.setBlock(x, y, z, field_150939_a, metadata, 3))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (world.getBlock(x, y, z) == field_150939_a)
|
||||
{
|
||||
field_150939_a.onBlockPlacedBy(world, x, y, z, player, stack);
|
||||
field_150939_a.onPostBlockPlaced(world, x, y, z, metadata);
|
||||
}
|
||||
if (world.getBlock(x, y, z) == field_150939_a)
|
||||
{
|
||||
field_150939_a.onBlockPlacedBy(world, x, y, z, player, stack);
|
||||
field_150939_a.onPostBlockPlaced(world, x, y, z, metadata);
|
||||
}
|
||||
|
||||
return true;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package WayofTime.alchemicalWizardry.common.items;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
@ -12,8 +11,6 @@ public class ItemBloodRuneBlock extends ItemBlock
|
|||
{
|
||||
super(block);
|
||||
setHasSubtypes(true);
|
||||
// this.setUnlocalizedName("itemBloodRuneBlock");
|
||||
// setCreativeTab(AlchemicalWizardry.tabBloodMagic);
|
||||
|
||||
}
|
||||
|
||||
|
@ -47,9 +44,9 @@ public class ItemBloodRuneBlock extends ItemBlock
|
|||
case 4:
|
||||
name = "betterCapacity";
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
name = "broken";
|
||||
name = "broken";
|
||||
}
|
||||
|
||||
return getUnlocalizedName() + "." + name;
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
package WayofTime.alchemicalWizardry.common.items;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TESpellParadigmBlock;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
@ -9,10 +11,8 @@ import net.minecraft.nbt.NBTTagCompound;
|
|||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.DimensionManager;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TESpellParadigmBlock;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ItemComplexSpellCrystal extends EnergyItems
|
||||
{
|
||||
|
@ -61,7 +61,6 @@ public class ItemComplexSpellCrystal extends EnergyItems
|
|||
|
||||
if (!par2World.isRemote)
|
||||
{
|
||||
//World world = MinecraftServer.getServer().worldServers[getDimensionID(par1ItemStack)];
|
||||
World world = DimensionManager.getWorld(getDimensionID(par1ItemStack));
|
||||
|
||||
if (world != null)
|
||||
|
@ -86,13 +85,7 @@ public class ItemComplexSpellCrystal extends EnergyItems
|
|||
{
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
par2World.playSoundAtEntity(par3EntityPlayer, "random.fizz", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F));
|
||||
// if (!par2World.isRemote)
|
||||
// {
|
||||
// //par2World.spawnEntityInWorld(new EnergyBlastProjectile(par2World, par3EntityPlayer, damage));
|
||||
// par2World.spawnEntityInWorld(new FireProjectile(par2World, par3EntityPlayer, 10));
|
||||
// }
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,27 +1,22 @@
|
|||
package WayofTime.alchemicalWizardry.common.items;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import java.util.List;
|
||||
|
||||
public class ItemComponents extends Item
|
||||
{
|
||||
private static final String[] ITEM_NAMES = new String[]{"QuartzRod", "EmptyCore", "MagicalesCable", "WoodBrace", "StoneBrace", "ProjectileCore", "SelfCore","MeleeCore","ParadigmBackPlate","OutputCable","FlameCore","IcyCore","GustCore","EarthenCore","InputCable","CrackedRunicPlate","RunicPlate","ScribedRunicPlate","DefaultCore","OffensiveCore","DefensiveCore","EnvironmentalCore","PowerCore","CostCore","PotencyCore","ObsidianBrace","ToolCore"};
|
||||
private static final String[] ITEM_NAMES = new String[]{"QuartzRod", "EmptyCore", "MagicalesCable", "WoodBrace", "StoneBrace", "ProjectileCore", "SelfCore", "MeleeCore", "ParadigmBackPlate", "OutputCable", "FlameCore", "IcyCore", "GustCore", "EarthenCore", "InputCable", "CrackedRunicPlate", "RunicPlate", "ScribedRunicPlate", "DefaultCore", "OffensiveCore", "DefensiveCore", "EnvironmentalCore", "PowerCore", "CostCore", "PotencyCore", "ObsidianBrace", "ToolCore"};
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon[] icons;
|
||||
|
|
|
@ -1,7 +1,11 @@
|
|||
package WayofTime.alchemicalWizardry.common.items;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.ModItems;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
@ -12,13 +16,8 @@ import net.minecraft.nbt.NBTTagCompound;
|
|||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.FakePlayer;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.ModItems;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ItemDiabloKey extends EnergyItems
|
||||
{
|
||||
|
@ -27,7 +26,6 @@ public class ItemDiabloKey extends EnergyItems
|
|||
super();
|
||||
DamageSource damageSource = DamageSource.generic;
|
||||
setMaxStackSize(1);
|
||||
//setMaxDamage(damage);
|
||||
setCreativeTab(AlchemicalWizardry.tabBloodMagic);
|
||||
this.setEnergyUsed(1000);
|
||||
this.hasSubtypes = true;
|
||||
|
@ -44,14 +42,10 @@ public class ItemDiabloKey extends EnergyItems
|
|||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4)
|
||||
{
|
||||
par3List.add("Binds other items to the owner's network");
|
||||
|
||||
//par3List.add("LP: " + (this.getMaxDamage() - this.getDamage(par1ItemStack)));
|
||||
if (!(par1ItemStack.stackTagCompound == null))
|
||||
{
|
||||
par3List.add("Current owner: " + par1ItemStack.stackTagCompound.getString("ownerName"));
|
||||
}
|
||||
|
||||
//par3List.add("LP: " + par2EntityPlayer.getEntityData().getInteger("currentEssence"));
|
||||
}
|
||||
|
||||
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)
|
||||
|
|
|
@ -1,7 +1,13 @@
|
|||
package WayofTime.alchemicalWizardry.common.items;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.ModBlocks;
|
||||
import WayofTime.alchemicalWizardry.ModItems;
|
||||
import WayofTime.alchemicalWizardry.api.rituals.RitualComponent;
|
||||
import WayofTime.alchemicalWizardry.api.rituals.Rituals;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
|
@ -15,14 +21,8 @@ import net.minecraft.util.ChatComponentText;
|
|||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.IChatComponent;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.ModBlocks;
|
||||
import WayofTime.alchemicalWizardry.ModItems;
|
||||
import WayofTime.alchemicalWizardry.api.rituals.RitualComponent;
|
||||
import WayofTime.alchemicalWizardry.api.rituals.Rituals;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEMasterStone;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ItemRitualDiviner extends EnergyItems
|
||||
{
|
||||
|
@ -64,9 +64,9 @@ public class ItemRitualDiviner extends EnergyItems
|
|||
par3List.add("Current owner: " + par1ItemStack.stackTagCompound.getString("ownerName"));
|
||||
par3List.add("RitualID: " + ritualID);
|
||||
List<RitualComponent> ritualList = Rituals.getRitualList(this.getCurrentRitual(par1ItemStack));
|
||||
if(ritualList == null)
|
||||
if (ritualList == null)
|
||||
{
|
||||
return;
|
||||
return;
|
||||
}
|
||||
|
||||
int blankStones = 0;
|
||||
|
@ -112,7 +112,6 @@ public class ItemRitualDiviner extends EnergyItems
|
|||
par3List.add(EnumChatFormatting.RED + "Fire stones: " + fireStones);
|
||||
par3List.add(EnumChatFormatting.DARK_GREEN + "Earth stones: " + earthStones);
|
||||
par3List.add(EnumChatFormatting.BOLD + "Dusk stones: " + duskStones);
|
||||
//par3List.add("Ritual Name: " + Rituals.getNameOfRitual(ritualID));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -122,12 +121,11 @@ public class ItemRitualDiviner extends EnergyItems
|
|||
if (!(par1ItemStack.stackTagCompound == null))
|
||||
{
|
||||
String ritualID = this.getCurrentRitual(par1ItemStack);
|
||||
if(ritualID.equals(""))
|
||||
if (ritualID.equals(""))
|
||||
{
|
||||
return super.getItemStackDisplayName(par1ItemStack);
|
||||
return super.getItemStackDisplayName(par1ItemStack);
|
||||
}
|
||||
return "Ritual: " + Rituals.getNameOfRitual(ritualID);
|
||||
//par3List.add("Current owner: " + par1ItemStack.stackTagCompound.getString("ownerName"));
|
||||
} else
|
||||
{
|
||||
return super.getItemStackDisplayName(par1ItemStack);
|
||||
|
@ -145,11 +143,11 @@ public class ItemRitualDiviner extends EnergyItems
|
|||
{
|
||||
TEMasterStone masterStone = (TEMasterStone) tileEntity;
|
||||
List<RitualComponent> ritualList = Rituals.getRitualList(this.getCurrentRitual(par1ItemStack));
|
||||
if(ritualList == null)
|
||||
if (ritualList == null)
|
||||
{
|
||||
return false;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
int playerInvRitualStoneLocation = -1;
|
||||
|
||||
for (int i = 0; i < playerInventory.length; i++)
|
||||
|
@ -221,14 +219,6 @@ public class ItemRitualDiviner extends EnergyItems
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
// if (par3World.isRemote)
|
||||
// {
|
||||
// par3World.playAuxSFX(2005, par4, par5, par6, 0);
|
||||
// EnergyItems.syphonBatteries(par1ItemStack, par2EntityPlayer, getEnergyUsed());
|
||||
// return true;
|
||||
// }
|
||||
// return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@ -249,8 +239,6 @@ public class ItemRitualDiviner extends EnergyItems
|
|||
if (par2World.isRemote)
|
||||
{
|
||||
IChatComponent chatmessagecomponent = new ChatComponentText("Current Ritual: " + Rituals.getNameOfRitual(this.getCurrentRitual(par1ItemStack)));
|
||||
//chatmessagecomponent.func_111072_b("Current Essence: " + data.currentEssence + "LP");
|
||||
//chatmessagecomponent.addText("Current Ritual: " + Rituals.getNameOfRitual(this.getCurrentRitual(par1ItemStack)));
|
||||
par3EntityPlayer.addChatComponentMessage(chatmessagecomponent);
|
||||
}
|
||||
}
|
||||
|
@ -261,11 +249,11 @@ public class ItemRitualDiviner extends EnergyItems
|
|||
@Override
|
||||
public boolean onEntitySwing(EntityLivingBase entityLiving, ItemStack stack)
|
||||
{
|
||||
if(entityLiving instanceof EntityPlayer)
|
||||
if (entityLiving instanceof EntityPlayer)
|
||||
{
|
||||
EntityPlayer player = (EntityPlayer) entityLiving;
|
||||
|
||||
if(player.isSneaking() && !player.isSwingInProgress)
|
||||
if (player.isSneaking() && !player.isSwingInProgress)
|
||||
{
|
||||
int maxRitualID = Rituals.getNumberOfRituals();
|
||||
String currentRitualID = this.getCurrentRitual(stack);
|
||||
|
@ -275,8 +263,6 @@ public class ItemRitualDiviner extends EnergyItems
|
|||
if (entityLiving.worldObj.isRemote)
|
||||
{
|
||||
IChatComponent chatmessagecomponent = new ChatComponentText("Current Ritual: " + Rituals.getNameOfRitual(this.getCurrentRitual(stack)));
|
||||
//chatmessagecomponent.func_111072_b("Current Essence: " + data.currentEssence + "LP");
|
||||
//chatmessagecomponent.addText("Current Ritual: " + Rituals.getNameOfRitual(this.getCurrentRitual(par1ItemStack)));
|
||||
player.addChatComponentMessage(chatmessagecomponent);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package WayofTime.alchemicalWizardry.common.items;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
@ -12,9 +11,6 @@ public class ItemSpellEffectBlock extends ItemBlock
|
|||
{
|
||||
super(par1);
|
||||
setHasSubtypes(true);
|
||||
// this.setUnlocalizedName("itemSpellEffectBlock");
|
||||
// setCreativeTab(AlchemicalWizardry.tabBloodMagic);
|
||||
|
||||
}
|
||||
|
||||
public String getUnlocalizedName(ItemStack itemstack)
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package WayofTime.alchemicalWizardry.common.items;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
@ -12,8 +11,6 @@ public class ItemSpellEnhancementBlock extends ItemBlock
|
|||
{
|
||||
super(par1);
|
||||
setHasSubtypes(true);
|
||||
// this.setUnlocalizedName("itemSpellEnhancementBlock");
|
||||
// setCreativeTab(AlchemicalWizardry.tabBloodMagic);
|
||||
|
||||
}
|
||||
|
||||
|
@ -30,7 +27,7 @@ public class ItemSpellEnhancementBlock extends ItemBlock
|
|||
|
||||
case 1:
|
||||
name = "power2";
|
||||
break;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
name = "power3";
|
||||
|
@ -39,47 +36,47 @@ public class ItemSpellEnhancementBlock extends ItemBlock
|
|||
case 3:
|
||||
name = "power4";
|
||||
break;
|
||||
|
||||
|
||||
case 4:
|
||||
name = "power5";
|
||||
break;
|
||||
|
||||
|
||||
case 5:
|
||||
name = "cost1";
|
||||
break;
|
||||
|
||||
|
||||
case 6:
|
||||
name = "cost2";
|
||||
break;
|
||||
|
||||
|
||||
case 7:
|
||||
name = "cost3";
|
||||
break;
|
||||
|
||||
|
||||
case 8:
|
||||
name = "cost4";
|
||||
break;
|
||||
|
||||
|
||||
case 9:
|
||||
name = "cost5";
|
||||
break;
|
||||
|
||||
|
||||
case 10:
|
||||
name = "potency1";
|
||||
break;
|
||||
|
||||
|
||||
case 11:
|
||||
name = "potency2";
|
||||
break;
|
||||
|
||||
|
||||
case 12:
|
||||
name = "potency3";
|
||||
break;
|
||||
|
||||
|
||||
case 13:
|
||||
name = "potency4";
|
||||
break;
|
||||
|
||||
|
||||
case 14:
|
||||
name = "potency5";
|
||||
break;
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package WayofTime.alchemicalWizardry.common.items;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
@ -12,8 +11,6 @@ public class ItemSpellModifierBlock extends ItemBlock
|
|||
{
|
||||
super(par1);
|
||||
setHasSubtypes(true);
|
||||
// this.setUnlocalizedName("itemSpellModifierBlock");
|
||||
// setCreativeTab(AlchemicalWizardry.tabBloodMagic);
|
||||
|
||||
}
|
||||
|
||||
|
@ -39,7 +36,7 @@ public class ItemSpellModifierBlock extends ItemBlock
|
|||
case 2:
|
||||
name = "defensive";
|
||||
break;
|
||||
|
||||
|
||||
case 3:
|
||||
name = "environmental";
|
||||
break;
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package WayofTime.alchemicalWizardry.common.items;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
@ -12,7 +11,6 @@ public class ItemSpellParadigmBlock extends ItemBlock
|
|||
{
|
||||
super(par1);
|
||||
setHasSubtypes(true);
|
||||
//this.setUnlocalizedName("itemSpellParadigmBlock");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -38,10 +36,10 @@ public class ItemSpellParadigmBlock extends ItemBlock
|
|||
case 2:
|
||||
name = "melee";
|
||||
break;
|
||||
|
||||
|
||||
case 3:
|
||||
name = "tool";
|
||||
break;
|
||||
name = "tool";
|
||||
break;
|
||||
|
||||
default:
|
||||
name = "broken";
|
||||
|
|
|
@ -1,23 +1,22 @@
|
|||
package WayofTime.alchemicalWizardry.common.items;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.soulNetwork.LifeEssenceNetwork;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.soulNetwork.LifeEssenceNetwork;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class LavaCrystal extends EnergyItems
|
||||
{
|
||||
public LavaCrystal()
|
||||
{
|
||||
super();
|
||||
//setMaxDamage(1000);
|
||||
setMaxStackSize(1);
|
||||
setCreativeTab(AlchemicalWizardry.tabBloodMagic);
|
||||
setUnlocalizedName("lavaCrystal");
|
||||
|
@ -37,7 +36,6 @@ public class LavaCrystal extends EnergyItems
|
|||
@Override
|
||||
public ItemStack getContainerItem(ItemStack itemStack)
|
||||
{
|
||||
//if(!syphonBatteries(itemStack, null, 10))
|
||||
{
|
||||
syphonWhileInContainer(itemStack, this.getEnergyUsed());
|
||||
ItemStack copiedStack = itemStack.copy();
|
||||
|
@ -45,7 +43,6 @@ public class LavaCrystal extends EnergyItems
|
|||
copiedStack.stackSize = 1;
|
||||
return copiedStack;
|
||||
}
|
||||
//return itemStack;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -97,18 +94,7 @@ public class LavaCrystal extends EnergyItems
|
|||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
// EntityPlayer ownerEntity = MinecraftServer.getServer().getConfigurationManager().getPlayerForUsername(ist.getTagCompound().getString("ownerName"));
|
||||
// if(ownerEntity==null){return false;}
|
||||
// NBTTagCompound tag = ownerEntity.getEntityData();
|
||||
// int currentEssence = tag.getInteger("currentEssence");
|
||||
// if(currentEssence>=damageToBeDone)
|
||||
// {
|
||||
// tag.setInteger("currentEssence", currentEssence-damageToBeDone);
|
||||
// return true;
|
||||
// }
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,17 +1,16 @@
|
|||
package WayofTime.alchemicalWizardry.common.items;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.item.ItemBucket;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class LifeBucket extends ItemBucket
|
||||
{
|
||||
public LifeBucket(Block block)
|
||||
{
|
||||
super(block);
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package WayofTime.alchemicalWizardry.common.items;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
|
||||
public class MagicianBloodOrb extends EnergyBattery
|
||||
{
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package WayofTime.alchemicalWizardry.common.items;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
|
||||
public class MasterBloodOrb extends EnergyBattery
|
||||
{
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
package WayofTime.alchemicalWizardry.common.items;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class OrbOfTesting extends EnergyItems
|
||||
{
|
||||
|
@ -28,8 +28,6 @@ public class OrbOfTesting extends EnergyItems
|
|||
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:Untitled");
|
||||
}
|
||||
|
||||
//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.
|
||||
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)
|
||||
{
|
||||
if (!par3EntityPlayer.shouldHeal())
|
||||
|
|
|
@ -1,27 +1,25 @@
|
|||
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.IIconRegister;
|
||||
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;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ReinforcedTelepositionFocus extends TelepositionFocus
|
||||
{
|
||||
public ReinforcedTelepositionFocus()
|
||||
{
|
||||
super(3);
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister iconRegister)
|
||||
{
|
||||
//TODO
|
||||
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:ReinforcedTeleposerFocus");
|
||||
}
|
||||
|
||||
|
|
|
@ -1,21 +1,20 @@
|
|||
package WayofTime.alchemicalWizardry.common.items;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.FakePlayer;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEAltar;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class SacrificialDagger extends Item
|
||||
{
|
||||
|
@ -31,25 +30,25 @@ public class SacrificialDagger extends Item
|
|||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister iconRegister)
|
||||
{
|
||||
if(AlchemicalWizardry.wimpySettings)
|
||||
{
|
||||
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:SheathedItem");
|
||||
}else
|
||||
{
|
||||
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:SacrificialDagger");
|
||||
}
|
||||
if (AlchemicalWizardry.wimpySettings)
|
||||
{
|
||||
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:SheathedItem");
|
||||
} else
|
||||
{
|
||||
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:SacrificialDagger");
|
||||
}
|
||||
}
|
||||
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4)
|
||||
{
|
||||
if(AlchemicalWizardry.wimpySettings)
|
||||
{
|
||||
par3List.add("A slight draining feeling tickles your fingers");
|
||||
}else
|
||||
{
|
||||
par3List.add("Just a prick of the");
|
||||
if (AlchemicalWizardry.wimpySettings)
|
||||
{
|
||||
par3List.add("A slight draining feeling tickles your fingers");
|
||||
} else
|
||||
{
|
||||
par3List.add("Just a prick of the");
|
||||
par3List.add("finger will suffice...");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)
|
||||
|
@ -78,23 +77,21 @@ public class SacrificialDagger extends Item
|
|||
par2World.spawnParticle("reddust", posX + Math.random() - Math.random(), posY + Math.random() - Math.random(), posZ + Math.random() - Math.random(), f1, f2, f3);
|
||||
}
|
||||
|
||||
if(!par2World.isRemote && SpellHelper.isFakePlayer(par2World, par3EntityPlayer))
|
||||
//if (!(par3EntityPlayer.getClass().equals(EntityPlayerMP.class)))
|
||||
if (!par2World.isRemote && SpellHelper.isFakePlayer(par2World, par3EntityPlayer))
|
||||
{
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
if(par3EntityPlayer.isPotionActive(AlchemicalWizardry.customPotionSoulFray))
|
||||
if (par3EntityPlayer.isPotionActive(AlchemicalWizardry.customPotionSoulFray))
|
||||
{
|
||||
findAndFillAltar(par2World, par3EntityPlayer, 20);
|
||||
}else
|
||||
} else
|
||||
{
|
||||
findAndFillAltar(par2World, par3EntityPlayer, 200);
|
||||
}
|
||||
|
||||
if (par3EntityPlayer.getHealth() <= 0.001f)
|
||||
{
|
||||
//par3EntityPlayer.inventory.dropAllItems();
|
||||
par3EntityPlayer.onDeath(DamageSource.generic);
|
||||
}
|
||||
|
||||
|
@ -154,14 +151,14 @@ public class SacrificialDagger extends Item
|
|||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String getItemStackDisplayName(ItemStack par1ItemStack)
|
||||
{
|
||||
if(AlchemicalWizardry.wimpySettings)
|
||||
{
|
||||
return "Sacrificial Orb";
|
||||
}
|
||||
return super.getItemStackDisplayName(par1ItemStack);
|
||||
if (AlchemicalWizardry.wimpySettings)
|
||||
{
|
||||
return "Sacrificial Orb";
|
||||
}
|
||||
return super.getItemStackDisplayName(par1ItemStack);
|
||||
}
|
||||
}
|
|
@ -1,16 +1,16 @@
|
|||
package WayofTime.alchemicalWizardry.common.items;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
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.AlchemicalWizardry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class TelepositionFocus extends EnergyItems
|
||||
{
|
||||
|
@ -28,7 +28,6 @@ public class TelepositionFocus extends EnergyItems
|
|||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister iconRegister)
|
||||
{
|
||||
//TODO
|
||||
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:TeleposerFocus");
|
||||
}
|
||||
|
||||
|
@ -60,12 +59,6 @@ public class TelepositionFocus extends EnergyItems
|
|||
{
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
// if (!par2World.isRemote)
|
||||
// {
|
||||
// //par2World.spawnEntityInWorld(new EnergyBlastProjectile(par2World, par3EntityPlayer, damage));
|
||||
// par2World.spawnEntityInWorld(new FireProjectile(par2World, par3EntityPlayer, 10));
|
||||
// }
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package WayofTime.alchemicalWizardry.common.items;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
|
||||
public class WaterScribeTool extends ScribeTool
|
||||
{
|
||||
|
|
|
@ -1,8 +1,12 @@
|
|||
package WayofTime.alchemicalWizardry.common.items.energy;
|
||||
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.*;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IReagentManipulator;
|
||||
import WayofTime.alchemicalWizardry.common.Int3;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEReagentConduit;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
|
@ -14,49 +18,41 @@ import net.minecraft.util.IIcon;
|
|||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.IReagentHandler;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainerInfo;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentStack;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IReagentManipulator;
|
||||
import WayofTime.alchemicalWizardry.common.Int3;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEReagentConduit;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
public class ItemAttunedCrystal extends Item implements IReagentManipulator
|
||||
{
|
||||
public static final int maxDistance = 5;
|
||||
|
||||
public IIcon crystalBody;
|
||||
public IIcon crystalLabel;
|
||||
|
||||
public ItemAttunedCrystal()
|
||||
{
|
||||
super();
|
||||
this.setCreativeTab(AlchemicalWizardry.tabBloodMagic);
|
||||
this.hasSubtypes = true;
|
||||
this.maxStackSize = 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getItemStackDisplayName(ItemStack stack)
|
||||
{
|
||||
Reagent reagent = this.getReagent(stack);
|
||||
|
||||
String name = super.getItemStackDisplayName(stack);
|
||||
|
||||
if(reagent != null)
|
||||
{
|
||||
name = name + " (" + reagent.name + ")";
|
||||
}
|
||||
|
||||
return name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public static final int maxDistance = 5;
|
||||
|
||||
public IIcon crystalBody;
|
||||
public IIcon crystalLabel;
|
||||
|
||||
public ItemAttunedCrystal()
|
||||
{
|
||||
super();
|
||||
this.setCreativeTab(AlchemicalWizardry.tabBloodMagic);
|
||||
this.hasSubtypes = true;
|
||||
this.maxStackSize = 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getItemStackDisplayName(ItemStack stack)
|
||||
{
|
||||
Reagent reagent = this.getReagent(stack);
|
||||
|
||||
String name = super.getItemStackDisplayName(stack);
|
||||
|
||||
if (reagent != null)
|
||||
{
|
||||
name = name + " (" + reagent.name + ")";
|
||||
}
|
||||
|
||||
return name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4)
|
||||
{
|
||||
par3List.add("A tool to tune alchemy");
|
||||
|
@ -64,324 +60,324 @@ public class ItemAttunedCrystal extends Item implements IReagentManipulator
|
|||
|
||||
if (!(par1ItemStack.stackTagCompound == null))
|
||||
{
|
||||
Reagent reagent = this.getReagent(par1ItemStack);
|
||||
if(reagent != null)
|
||||
{
|
||||
par3List.add("Currently selected reagent: " + reagent.name);
|
||||
}
|
||||
|
||||
if(this.getHasSavedCoordinates(par1ItemStack))
|
||||
Reagent reagent = this.getReagent(par1ItemStack);
|
||||
if (reagent != null)
|
||||
{
|
||||
par3List.add("");
|
||||
Int3 coords = this.getCoordinates(par1ItemStack);
|
||||
par3List.add("Coords: " + coords.xCoord + ", " + coords.yCoord + ", " + coords.zCoord);
|
||||
par3List.add("Currently selected reagent: " + reagent.name);
|
||||
}
|
||||
|
||||
if (this.getHasSavedCoordinates(par1ItemStack))
|
||||
{
|
||||
par3List.add("");
|
||||
Int3 coords = this.getCoordinates(par1ItemStack);
|
||||
par3List.add("Coords: " + coords.xCoord + ", " + coords.yCoord + ", " + coords.zCoord);
|
||||
par3List.add("Bound Dimension: " + getDimension(par1ItemStack));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister iconRegister)
|
||||
{
|
||||
this.crystalBody = iconRegister.registerIcon("AlchemicalWizardry:AttunedCrystal1");
|
||||
this.crystalLabel = iconRegister.registerIcon("AlchemicalWizardry:AttunedCrystal2");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public int getColorFromItemStack(ItemStack stack, int pass)
|
||||
{
|
||||
switch(pass)
|
||||
{
|
||||
case 0:
|
||||
return 256*(256*255 + 255) + 255;
|
||||
case 1:
|
||||
Reagent reagent = this.getReagent(stack);
|
||||
if(reagent != null)
|
||||
{
|
||||
return (reagent.getColourRed()*256*256 + reagent.getColourGreen()*256 + reagent.getColourBlue());
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return 256*(256*255 + 255) + 255;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean requiresMultipleRenderPasses()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public int getRenderPasses(int meta)
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(ItemStack stack, int pass)
|
||||
{
|
||||
switch(pass)
|
||||
{
|
||||
case 0:
|
||||
return this.crystalBody;
|
||||
case 1:
|
||||
return this.crystalLabel;
|
||||
}
|
||||
return this.itemIcon;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public int getColorFromItemStack(ItemStack stack, int pass)
|
||||
{
|
||||
switch (pass)
|
||||
{
|
||||
case 0:
|
||||
return 256 * (256 * 255 + 255) + 255;
|
||||
case 1:
|
||||
Reagent reagent = this.getReagent(stack);
|
||||
if (reagent != null)
|
||||
{
|
||||
return (reagent.getColourRed() * 256 * 256 + reagent.getColourGreen() * 256 + reagent.getColourBlue());
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return 256 * (256 * 255 + 255) + 255;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean requiresMultipleRenderPasses()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public int getRenderPasses(int meta)
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(ItemStack stack, int pass)
|
||||
{
|
||||
switch (pass)
|
||||
{
|
||||
case 0:
|
||||
return this.crystalBody;
|
||||
case 1:
|
||||
return this.crystalLabel;
|
||||
}
|
||||
return this.itemIcon;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer player)
|
||||
{
|
||||
if(world.isRemote)
|
||||
{
|
||||
return itemStack;
|
||||
}
|
||||
|
||||
MovingObjectPosition movingobjectposition = this.getMovingObjectPositionFromPlayer(world, player, false);
|
||||
if (world.isRemote)
|
||||
{
|
||||
return itemStack;
|
||||
}
|
||||
|
||||
MovingObjectPosition movingobjectposition = this.getMovingObjectPositionFromPlayer(world, player, false);
|
||||
|
||||
if (movingobjectposition == null)
|
||||
{
|
||||
if(player.isSneaking())
|
||||
{
|
||||
this.setHasSavedCoordinates(itemStack, false);
|
||||
player.addChatComponentMessage(new ChatComponentText("Clearing saved container..."));
|
||||
}
|
||||
|
||||
if (player.isSneaking())
|
||||
{
|
||||
this.setHasSavedCoordinates(itemStack, false);
|
||||
player.addChatComponentMessage(new ChatComponentText("Clearing saved container..."));
|
||||
}
|
||||
|
||||
return itemStack;
|
||||
} else
|
||||
{
|
||||
if (movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK)
|
||||
if (movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK)
|
||||
{
|
||||
int x = movingobjectposition.blockX;
|
||||
int y = movingobjectposition.blockY;
|
||||
int z = movingobjectposition.blockZ;
|
||||
|
||||
TileEntity tile = world.getTileEntity(x, y, z);
|
||||
|
||||
if(!(tile instanceof IReagentHandler))
|
||||
{
|
||||
return itemStack;
|
||||
}
|
||||
|
||||
IReagentHandler relay = (IReagentHandler)tile;
|
||||
|
||||
if(player.isSneaking())
|
||||
TileEntity tile = world.getTileEntity(x, y, z);
|
||||
|
||||
if (!(tile instanceof IReagentHandler))
|
||||
{
|
||||
ReagentContainerInfo[] infos = relay.getContainerInfo(ForgeDirection.UNKNOWN);
|
||||
if(infos != null)
|
||||
{
|
||||
List<Reagent> reagentList = new LinkedList();
|
||||
for(ReagentContainerInfo info : infos)
|
||||
{
|
||||
if(info != null)
|
||||
{
|
||||
ReagentStack reagentStack = info.reagent;
|
||||
if(reagentStack != null)
|
||||
{
|
||||
Reagent reagent = reagentStack.reagent;
|
||||
if(reagent != null)
|
||||
{
|
||||
reagentList.add(reagent);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reagent pastReagent = this.getReagent(itemStack);
|
||||
|
||||
if(reagentList.size() <= 0)
|
||||
{
|
||||
return itemStack;
|
||||
}
|
||||
|
||||
int reagentLocation = -1;
|
||||
|
||||
reagentLocation = reagentList.indexOf(pastReagent);
|
||||
|
||||
if(reagentLocation == -1 || reagentLocation+1 >= reagentList.size())
|
||||
{
|
||||
this.setReagentWithNotification(itemStack, reagentList.get(0), player);
|
||||
}else
|
||||
{
|
||||
this.setReagentWithNotification(itemStack, reagentList.get(reagentLocation + 1), player);
|
||||
}
|
||||
}
|
||||
}else
|
||||
return itemStack;
|
||||
}
|
||||
|
||||
IReagentHandler relay = (IReagentHandler) tile;
|
||||
|
||||
if (player.isSneaking())
|
||||
{
|
||||
if(this.getHasSavedCoordinates(itemStack))
|
||||
ReagentContainerInfo[] infos = relay.getContainerInfo(ForgeDirection.UNKNOWN);
|
||||
if (infos != null)
|
||||
{
|
||||
Int3 coords = this.getCoordinates(itemStack);
|
||||
int dimension = this.getDimension(itemStack);
|
||||
|
||||
if(coords == null)
|
||||
{
|
||||
return itemStack;
|
||||
}
|
||||
|
||||
if(dimension != world.provider.dimensionId || Math.abs(coords.xCoord - x) > maxDistance || Math.abs(coords.yCoord - y) > maxDistance || Math.abs(coords.zCoord - z) > maxDistance)
|
||||
{
|
||||
player.addChatComponentMessage(new ChatComponentText("Linked container is either too far or is in a different dimension."));
|
||||
return itemStack;
|
||||
}
|
||||
|
||||
TileEntity pastTile = world.getTileEntity(coords.xCoord, coords.yCoord, coords.zCoord);
|
||||
if(!(pastTile instanceof TEReagentConduit))
|
||||
{
|
||||
player.addChatComponentMessage(new ChatComponentText("Can no longer find linked container."));
|
||||
return itemStack;
|
||||
}
|
||||
|
||||
Reagent reagent = this.getReagent(itemStack);
|
||||
|
||||
if(reagent == null)
|
||||
{
|
||||
return itemStack;
|
||||
}
|
||||
|
||||
TEReagentConduit pastRelay = (TEReagentConduit)pastTile;
|
||||
|
||||
if(player.isSneaking())
|
||||
{
|
||||
pastRelay.removeReagentDestinationViaActual(reagent, x, y, z);
|
||||
}else
|
||||
{
|
||||
if(pastRelay.addReagentDestinationViaActual(reagent, x, y, z))
|
||||
{
|
||||
player.addChatComponentMessage(new ChatComponentText("Container is now linked. Transmitting: " + reagent.name));
|
||||
}else
|
||||
{
|
||||
player.addChatComponentMessage(new ChatComponentText("Linked container has no connections remaining!"));
|
||||
}
|
||||
}
|
||||
world.markBlockForUpdate(coords.xCoord, coords.yCoord, coords.zCoord);
|
||||
}else
|
||||
{
|
||||
int dimension = world.provider.dimensionId;
|
||||
|
||||
this.setDimension(itemStack, dimension);
|
||||
this.setCoordinates(itemStack, new Int3(x, y, z));
|
||||
|
||||
player.addChatComponentMessage(new ChatComponentText("Linking to selected container."));
|
||||
List<Reagent> reagentList = new LinkedList();
|
||||
for (ReagentContainerInfo info : infos)
|
||||
{
|
||||
if (info != null)
|
||||
{
|
||||
ReagentStack reagentStack = info.reagent;
|
||||
if (reagentStack != null)
|
||||
{
|
||||
Reagent reagent = reagentStack.reagent;
|
||||
if (reagent != null)
|
||||
{
|
||||
reagentList.add(reagent);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reagent pastReagent = this.getReagent(itemStack);
|
||||
|
||||
if (reagentList.size() <= 0)
|
||||
{
|
||||
return itemStack;
|
||||
}
|
||||
|
||||
int reagentLocation = -1;
|
||||
|
||||
reagentLocation = reagentList.indexOf(pastReagent);
|
||||
|
||||
if (reagentLocation == -1 || reagentLocation + 1 >= reagentList.size())
|
||||
{
|
||||
this.setReagentWithNotification(itemStack, reagentList.get(0), player);
|
||||
} else
|
||||
{
|
||||
this.setReagentWithNotification(itemStack, reagentList.get(reagentLocation + 1), player);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else
|
||||
{
|
||||
if (this.getHasSavedCoordinates(itemStack))
|
||||
{
|
||||
Int3 coords = this.getCoordinates(itemStack);
|
||||
int dimension = this.getDimension(itemStack);
|
||||
|
||||
if (coords == null)
|
||||
{
|
||||
return itemStack;
|
||||
}
|
||||
|
||||
if (dimension != world.provider.dimensionId || Math.abs(coords.xCoord - x) > maxDistance || Math.abs(coords.yCoord - y) > maxDistance || Math.abs(coords.zCoord - z) > maxDistance)
|
||||
{
|
||||
player.addChatComponentMessage(new ChatComponentText("Linked container is either too far or is in a different dimension."));
|
||||
return itemStack;
|
||||
}
|
||||
|
||||
TileEntity pastTile = world.getTileEntity(coords.xCoord, coords.yCoord, coords.zCoord);
|
||||
if (!(pastTile instanceof TEReagentConduit))
|
||||
{
|
||||
player.addChatComponentMessage(new ChatComponentText("Can no longer find linked container."));
|
||||
return itemStack;
|
||||
}
|
||||
|
||||
Reagent reagent = this.getReagent(itemStack);
|
||||
|
||||
if (reagent == null)
|
||||
{
|
||||
return itemStack;
|
||||
}
|
||||
|
||||
TEReagentConduit pastRelay = (TEReagentConduit) pastTile;
|
||||
|
||||
if (player.isSneaking())
|
||||
{
|
||||
pastRelay.removeReagentDestinationViaActual(reagent, x, y, z);
|
||||
} else
|
||||
{
|
||||
if (pastRelay.addReagentDestinationViaActual(reagent, x, y, z))
|
||||
{
|
||||
player.addChatComponentMessage(new ChatComponentText("Container is now linked. Transmitting: " + reagent.name));
|
||||
} else
|
||||
{
|
||||
player.addChatComponentMessage(new ChatComponentText("Linked container has no connections remaining!"));
|
||||
}
|
||||
}
|
||||
world.markBlockForUpdate(coords.xCoord, coords.yCoord, coords.zCoord);
|
||||
} else
|
||||
{
|
||||
int dimension = world.provider.dimensionId;
|
||||
|
||||
this.setDimension(itemStack, dimension);
|
||||
this.setCoordinates(itemStack, new Int3(x, y, z));
|
||||
|
||||
player.addChatComponentMessage(new ChatComponentText("Linking to selected container."));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return itemStack;
|
||||
|
||||
return itemStack;
|
||||
}
|
||||
|
||||
public void setCoordinates(ItemStack stack, Int3 coords)
|
||||
{
|
||||
if (!stack.hasTagCompound())
|
||||
{
|
||||
stack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
NBTTagCompound tag = stack.getTagCompound();
|
||||
|
||||
coords.writeToNBT(tag);
|
||||
|
||||
this.setHasSavedCoordinates(stack, true);
|
||||
}
|
||||
|
||||
public void setDimension(ItemStack stack, int dimension)
|
||||
{
|
||||
if (!stack.hasTagCompound())
|
||||
{
|
||||
stack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
NBTTagCompound tag = stack.getTagCompound();
|
||||
|
||||
tag.setInteger("dimension", dimension);
|
||||
}
|
||||
|
||||
public Int3 getCoordinates(ItemStack stack)
|
||||
{
|
||||
if (!stack.hasTagCompound())
|
||||
{
|
||||
stack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
NBTTagCompound tag = stack.getTagCompound();
|
||||
|
||||
return Int3.readFromNBT(tag);
|
||||
}
|
||||
|
||||
public int getDimension(ItemStack stack)
|
||||
{
|
||||
if (!stack.hasTagCompound())
|
||||
{
|
||||
stack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
NBTTagCompound tag = stack.getTagCompound();
|
||||
|
||||
return tag.getInteger("dimension");
|
||||
}
|
||||
|
||||
public void setHasSavedCoordinates(ItemStack stack, boolean flag)
|
||||
{
|
||||
if (!stack.hasTagCompound())
|
||||
{
|
||||
stack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
NBTTagCompound tag = stack.getTagCompound();
|
||||
|
||||
tag.setBoolean("hasSavedCoordinates", flag);
|
||||
}
|
||||
|
||||
public boolean getHasSavedCoordinates(ItemStack stack)
|
||||
{
|
||||
if (!stack.hasTagCompound())
|
||||
{
|
||||
stack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
NBTTagCompound tag = stack.getTagCompound();
|
||||
|
||||
return tag.getBoolean("hasSavedCoordinates");
|
||||
}
|
||||
|
||||
public Reagent getReagent(ItemStack stack)
|
||||
{
|
||||
if (!stack.hasTagCompound())
|
||||
{
|
||||
stack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
NBTTagCompound tag = stack.getTagCompound();
|
||||
|
||||
return ReagentRegistry.getReagentForKey(tag.getString("reagent"));
|
||||
}
|
||||
|
||||
public void setReagent(ItemStack stack, Reagent reagent)
|
||||
{
|
||||
if (!stack.hasTagCompound())
|
||||
{
|
||||
stack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
NBTTagCompound tag = stack.getTagCompound();
|
||||
|
||||
tag.setString("reagent", ReagentRegistry.getKeyForReagent(reagent));
|
||||
}
|
||||
|
||||
public void setReagentWithNotification(ItemStack stack, Reagent reagent, EntityPlayer player)
|
||||
{
|
||||
this.setReagent(stack, reagent);
|
||||
|
||||
if (reagent != null)
|
||||
{
|
||||
player.addChatComponentMessage(new ChatComponentText("Attuned Crystal now set to: " + reagent.name));
|
||||
}
|
||||
}
|
||||
|
||||
public void setCoordinates(ItemStack stack, Int3 coords)
|
||||
{
|
||||
if(!stack.hasTagCompound())
|
||||
{
|
||||
stack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
NBTTagCompound tag = stack.getTagCompound();
|
||||
|
||||
coords.writeToNBT(tag);
|
||||
|
||||
this.setHasSavedCoordinates(stack, true);
|
||||
}
|
||||
|
||||
public void setDimension(ItemStack stack, int dimension)
|
||||
{
|
||||
if(!stack.hasTagCompound())
|
||||
{
|
||||
stack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
NBTTagCompound tag = stack.getTagCompound();
|
||||
|
||||
tag.setInteger("dimension", dimension);
|
||||
}
|
||||
|
||||
public Int3 getCoordinates(ItemStack stack)
|
||||
{
|
||||
if(!stack.hasTagCompound())
|
||||
{
|
||||
stack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
NBTTagCompound tag = stack.getTagCompound();
|
||||
|
||||
return Int3.readFromNBT(tag);
|
||||
}
|
||||
|
||||
public int getDimension(ItemStack stack)
|
||||
{
|
||||
if(!stack.hasTagCompound())
|
||||
{
|
||||
stack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
NBTTagCompound tag = stack.getTagCompound();
|
||||
|
||||
return tag.getInteger("dimension");
|
||||
}
|
||||
|
||||
public void setHasSavedCoordinates(ItemStack stack, boolean flag)
|
||||
{
|
||||
if(!stack.hasTagCompound())
|
||||
{
|
||||
stack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
NBTTagCompound tag = stack.getTagCompound();
|
||||
|
||||
tag.setBoolean("hasSavedCoordinates", flag);
|
||||
}
|
||||
|
||||
public boolean getHasSavedCoordinates(ItemStack stack)
|
||||
{
|
||||
if(!stack.hasTagCompound())
|
||||
{
|
||||
stack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
NBTTagCompound tag = stack.getTagCompound();
|
||||
|
||||
return tag.getBoolean("hasSavedCoordinates");
|
||||
}
|
||||
|
||||
public Reagent getReagent(ItemStack stack)
|
||||
{
|
||||
if(!stack.hasTagCompound())
|
||||
{
|
||||
stack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
NBTTagCompound tag = stack.getTagCompound();
|
||||
|
||||
return ReagentRegistry.getReagentForKey(tag.getString("reagent"));
|
||||
}
|
||||
|
||||
public void setReagent(ItemStack stack, Reagent reagent)
|
||||
{
|
||||
if(!stack.hasTagCompound())
|
||||
{
|
||||
stack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
NBTTagCompound tag = stack.getTagCompound();
|
||||
|
||||
tag.setString("reagent", ReagentRegistry.getKeyForReagent(reagent));
|
||||
}
|
||||
|
||||
public void setReagentWithNotification(ItemStack stack, Reagent reagent, EntityPlayer player)
|
||||
{
|
||||
this.setReagent(stack, reagent);
|
||||
|
||||
if(reagent != null)
|
||||
{
|
||||
player.addChatComponentMessage(new ChatComponentText("Attuned Crystal now set to: " + reagent.name));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
package WayofTime.alchemicalWizardry.common.items.energy;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IReagentManipulator;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEReagentConduit;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
|
@ -10,73 +13,68 @@ import net.minecraft.tileentity.TileEntity;
|
|||
import net.minecraft.util.ChatComponentText;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IReagentManipulator;
|
||||
import WayofTime.alchemicalWizardry.common.Int3;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TEReagentConduit;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ItemDestinationClearer extends Item implements IReagentManipulator
|
||||
{
|
||||
public ItemDestinationClearer()
|
||||
{
|
||||
super();
|
||||
this.setCreativeTab(AlchemicalWizardry.tabBloodMagic);
|
||||
this.maxStackSize = 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
{
|
||||
public ItemDestinationClearer()
|
||||
{
|
||||
super();
|
||||
this.setCreativeTab(AlchemicalWizardry.tabBloodMagic);
|
||||
this.maxStackSize = 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister iconRegister)
|
||||
{
|
||||
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:TankClearer");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4)
|
||||
{
|
||||
par3List.add("Used to clear the destination");
|
||||
par3List.add("list for an alchemy container");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer player)
|
||||
{
|
||||
if(world.isRemote)
|
||||
{
|
||||
return itemStack;
|
||||
}
|
||||
|
||||
MovingObjectPosition movingobjectposition = this.getMovingObjectPositionFromPlayer(world, player, false);
|
||||
if (world.isRemote)
|
||||
{
|
||||
return itemStack;
|
||||
}
|
||||
|
||||
MovingObjectPosition movingobjectposition = this.getMovingObjectPositionFromPlayer(world, player, false);
|
||||
|
||||
if (movingobjectposition == null)
|
||||
{
|
||||
{
|
||||
return itemStack;
|
||||
} else
|
||||
{
|
||||
if (movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK)
|
||||
if (movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK)
|
||||
{
|
||||
int x = movingobjectposition.blockX;
|
||||
int y = movingobjectposition.blockY;
|
||||
int z = movingobjectposition.blockZ;
|
||||
|
||||
|
||||
TileEntity tile = world.getTileEntity(x, y, z);
|
||||
|
||||
if(!(tile instanceof TEReagentConduit))
|
||||
|
||||
if (!(tile instanceof TEReagentConduit))
|
||||
{
|
||||
return itemStack;
|
||||
return itemStack;
|
||||
}
|
||||
|
||||
TEReagentConduit relay = (TEReagentConduit)tile;
|
||||
|
||||
TEReagentConduit relay = (TEReagentConduit) tile;
|
||||
|
||||
relay.reagentTargetList.clear();
|
||||
|
||||
|
||||
player.addChatComponentMessage(new ChatComponentText("Destination list now cleared."));
|
||||
}
|
||||
}
|
||||
|
||||
return itemStack;
|
||||
|
||||
return itemStack;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
package WayofTime.alchemicalWizardry.common.items.energy;
|
||||
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.*;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IReagentManipulator;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
|
@ -14,47 +16,36 @@ import net.minecraft.util.IIcon;
|
|||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.IReagentHandler;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.ISegmentedReagentHandler;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.Reagent;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainerInfo;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentStack;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IReagentManipulator;
|
||||
import WayofTime.alchemicalWizardry.common.Int3;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
public class ItemTankSegmenter extends Item implements IReagentManipulator
|
||||
{
|
||||
public IIcon crystalBody;
|
||||
public IIcon crystalLabel;
|
||||
|
||||
public ItemTankSegmenter()
|
||||
{
|
||||
super();
|
||||
this.setCreativeTab(AlchemicalWizardry.tabBloodMagic);
|
||||
this.hasSubtypes = true;
|
||||
this.maxStackSize = 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getItemStackDisplayName(ItemStack stack)
|
||||
{
|
||||
Reagent reagent = this.getReagent(stack);
|
||||
|
||||
String name = super.getItemStackDisplayName(stack);
|
||||
|
||||
if(reagent != null)
|
||||
{
|
||||
name = name + " (" + reagent.name + ")";
|
||||
}
|
||||
|
||||
return name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon crystalBody;
|
||||
public IIcon crystalLabel;
|
||||
|
||||
public ItemTankSegmenter()
|
||||
{
|
||||
super();
|
||||
this.setCreativeTab(AlchemicalWizardry.tabBloodMagic);
|
||||
this.hasSubtypes = true;
|
||||
this.maxStackSize = 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getItemStackDisplayName(ItemStack stack)
|
||||
{
|
||||
Reagent reagent = this.getReagent(stack);
|
||||
String name = super.getItemStackDisplayName(stack);
|
||||
if (reagent != null)
|
||||
{
|
||||
name = name + " (" + reagent.name + ")";
|
||||
}
|
||||
return name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4)
|
||||
{
|
||||
par3List.add("Used to designate which");
|
||||
|
@ -62,217 +53,209 @@ public class ItemTankSegmenter extends Item implements IReagentManipulator
|
|||
|
||||
if (!(par1ItemStack.stackTagCompound == null))
|
||||
{
|
||||
Reagent reagent = this.getReagent(par1ItemStack);
|
||||
if(reagent != null)
|
||||
{
|
||||
par3List.add("Currently selected reagent: " + reagent.name);
|
||||
}
|
||||
Reagent reagent = this.getReagent(par1ItemStack);
|
||||
if (reagent != null)
|
||||
{
|
||||
par3List.add("Currently selected reagent: " + reagent.name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister iconRegister)
|
||||
{
|
||||
this.crystalBody = iconRegister.registerIcon("AlchemicalWizardry:TankSegmenter1");
|
||||
this.crystalLabel = iconRegister.registerIcon("AlchemicalWizardry:TankSegmenter2");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public int getColorFromItemStack(ItemStack stack, int pass)
|
||||
{
|
||||
switch(pass)
|
||||
{
|
||||
case 0:
|
||||
return 256*(256*255 + 255) + 255;
|
||||
case 1:
|
||||
Reagent reagent = this.getReagent(stack);
|
||||
if(reagent != null)
|
||||
{
|
||||
return (reagent.getColourRed()*256*256 + reagent.getColourGreen()*256 + reagent.getColourBlue());
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return 256*(256*255 + 255) + 255;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean requiresMultipleRenderPasses()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public int getRenderPasses(int meta)
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(ItemStack stack, int pass)
|
||||
{
|
||||
switch(pass)
|
||||
{
|
||||
case 0:
|
||||
return this.crystalBody;
|
||||
case 1:
|
||||
return this.crystalLabel;
|
||||
}
|
||||
return this.itemIcon;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public int getColorFromItemStack(ItemStack stack, int pass)
|
||||
{
|
||||
switch (pass)
|
||||
{
|
||||
case 0:
|
||||
return 256 * (256 * 255 + 255) + 255;
|
||||
case 1:
|
||||
Reagent reagent = this.getReagent(stack);
|
||||
if (reagent != null)
|
||||
{
|
||||
return (reagent.getColourRed() * 256 * 256 + reagent.getColourGreen() * 256 + reagent.getColourBlue());
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return 256 * (256 * 255 + 255) + 255;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean requiresMultipleRenderPasses()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public int getRenderPasses(int meta)
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(ItemStack stack, int pass)
|
||||
{
|
||||
switch (pass)
|
||||
{
|
||||
case 0:
|
||||
return this.crystalBody;
|
||||
case 1:
|
||||
return this.crystalLabel;
|
||||
}
|
||||
return this.itemIcon;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer player)
|
||||
{
|
||||
if(world.isRemote)
|
||||
{
|
||||
return itemStack;
|
||||
}
|
||||
|
||||
MovingObjectPosition movingobjectposition = this.getMovingObjectPositionFromPlayer(world, player, false);
|
||||
if (world.isRemote)
|
||||
{
|
||||
return itemStack;
|
||||
}
|
||||
MovingObjectPosition movingobjectposition = this.getMovingObjectPositionFromPlayer(world, player, false);
|
||||
|
||||
if (movingobjectposition == null)
|
||||
{
|
||||
return itemStack;
|
||||
} else
|
||||
{
|
||||
if (movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK)
|
||||
if (movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK)
|
||||
{
|
||||
int x = movingobjectposition.blockX;
|
||||
int y = movingobjectposition.blockY;
|
||||
int z = movingobjectposition.blockZ;
|
||||
|
||||
TileEntity tile = world.getTileEntity(x, y, z);
|
||||
|
||||
if(!(tile instanceof ISegmentedReagentHandler))
|
||||
if (!(tile instanceof ISegmentedReagentHandler))
|
||||
{
|
||||
return itemStack;
|
||||
return itemStack;
|
||||
}
|
||||
|
||||
ISegmentedReagentHandler reagentHandler = (ISegmentedReagentHandler)tile;
|
||||
|
||||
if(player.isSneaking())
|
||||
ISegmentedReagentHandler reagentHandler = (ISegmentedReagentHandler) tile;
|
||||
|
||||
if (player.isSneaking())
|
||||
{
|
||||
ReagentContainerInfo[] infos = reagentHandler.getContainerInfo(ForgeDirection.UNKNOWN);
|
||||
if(infos != null)
|
||||
{
|
||||
List<Reagent> reagentList = new LinkedList();
|
||||
for(ReagentContainerInfo info : infos)
|
||||
{
|
||||
if(info != null)
|
||||
{
|
||||
ReagentStack reagentStack = info.reagent;
|
||||
if(reagentStack != null)
|
||||
{
|
||||
Reagent reagent = reagentStack.reagent;
|
||||
if(reagent != null)
|
||||
{
|
||||
reagentList.add(reagent);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reagent pastReagent = this.getReagent(itemStack);
|
||||
|
||||
boolean goForNext = false;
|
||||
boolean hasFound = false;
|
||||
for(Reagent reagent : reagentList)
|
||||
{
|
||||
if(goForNext)
|
||||
{
|
||||
goForNext = false;
|
||||
break;
|
||||
}
|
||||
|
||||
if(reagent == pastReagent)
|
||||
{
|
||||
goForNext = true;
|
||||
hasFound = true;
|
||||
}
|
||||
}
|
||||
|
||||
if(hasFound)
|
||||
{
|
||||
if(goForNext)
|
||||
{
|
||||
this.setReagentWithNotification(itemStack, reagentList.get(0), player);
|
||||
}
|
||||
}else
|
||||
{
|
||||
if(reagentList.size() >= 1)
|
||||
{
|
||||
this.setReagentWithNotification(itemStack, reagentList.get(0), player);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}else
|
||||
{
|
||||
Reagent reagent = this.getReagent(itemStack);
|
||||
if(reagent == null)
|
||||
ReagentContainerInfo[] infos = reagentHandler.getContainerInfo(ForgeDirection.UNKNOWN);
|
||||
if (infos != null)
|
||||
{
|
||||
//TODO: Send message that "All are wiped"
|
||||
reagentHandler.getAttunedTankMap().clear();
|
||||
return itemStack;
|
||||
List<Reagent> reagentList = new LinkedList();
|
||||
for (ReagentContainerInfo info : infos)
|
||||
{
|
||||
if (info != null)
|
||||
{
|
||||
ReagentStack reagentStack = info.reagent;
|
||||
if (reagentStack != null)
|
||||
{
|
||||
Reagent reagent = reagentStack.reagent;
|
||||
if (reagent != null)
|
||||
{
|
||||
reagentList.add(reagent);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reagent pastReagent = this.getReagent(itemStack);
|
||||
boolean goForNext = false;
|
||||
boolean hasFound = false;
|
||||
for (Reagent reagent : reagentList)
|
||||
{
|
||||
if (goForNext)
|
||||
{
|
||||
goForNext = false;
|
||||
break;
|
||||
}
|
||||
|
||||
if (reagent == pastReagent)
|
||||
{
|
||||
goForNext = true;
|
||||
hasFound = true;
|
||||
}
|
||||
}
|
||||
if (hasFound)
|
||||
{
|
||||
if (goForNext)
|
||||
{
|
||||
this.setReagentWithNotification(itemStack, reagentList.get(0), player);
|
||||
}
|
||||
} else
|
||||
{
|
||||
if (reagentList.size() >= 1)
|
||||
{
|
||||
this.setReagentWithNotification(itemStack, reagentList.get(0), player);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else
|
||||
{
|
||||
Reagent reagent = this.getReagent(itemStack);
|
||||
if (reagent == null)
|
||||
{
|
||||
//TODO: Send message that "All are wiped"
|
||||
reagentHandler.getAttunedTankMap().clear();
|
||||
return itemStack;
|
||||
}
|
||||
int totalTankSize = reagentHandler.getNumberOfTanks();
|
||||
int numberAssigned = reagentHandler.getTanksTunedToReagent(reagent) + 1;
|
||||
|
||||
if(numberAssigned > totalTankSize)
|
||||
|
||||
if (numberAssigned > totalTankSize)
|
||||
{
|
||||
numberAssigned = 0;
|
||||
numberAssigned = 0;
|
||||
}
|
||||
|
||||
player.addChatComponentMessage(new ChatComponentText("Tank now has " + numberAssigned + " tank(s) set to: " + reagent.name));
|
||||
|
||||
|
||||
player.addChatComponentMessage(new ChatComponentText("Tank now has " + numberAssigned + " tank(s) set to: " + reagent.name));
|
||||
|
||||
reagentHandler.setTanksTunedToReagent(reagent, numberAssigned);
|
||||
}
|
||||
}else if(movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.MISS)
|
||||
}
|
||||
} else if (movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.MISS)
|
||||
{
|
||||
this.setReagent(itemStack, null);
|
||||
this.setReagent(itemStack, null);
|
||||
}
|
||||
}
|
||||
|
||||
return itemStack;
|
||||
|
||||
return itemStack;
|
||||
}
|
||||
|
||||
public Reagent getReagent(ItemStack stack)
|
||||
{
|
||||
if (!stack.hasTagCompound())
|
||||
{
|
||||
stack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
NBTTagCompound tag = stack.getTagCompound();
|
||||
|
||||
return ReagentRegistry.getReagentForKey(tag.getString("reagent"));
|
||||
}
|
||||
|
||||
public void setReagent(ItemStack stack, Reagent reagent)
|
||||
{
|
||||
if (!stack.hasTagCompound())
|
||||
{
|
||||
stack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
NBTTagCompound tag = stack.getTagCompound();
|
||||
|
||||
tag.setString("reagent", ReagentRegistry.getKeyForReagent(reagent));
|
||||
}
|
||||
|
||||
public void setReagentWithNotification(ItemStack stack, Reagent reagent, EntityPlayer player)
|
||||
{
|
||||
this.setReagent(stack, reagent);
|
||||
|
||||
if (reagent != null)
|
||||
{
|
||||
player.addChatComponentMessage(new ChatComponentText("Tank Segmenter now set to: " + reagent.name));
|
||||
}
|
||||
}
|
||||
|
||||
public Reagent getReagent(ItemStack stack)
|
||||
{
|
||||
if(!stack.hasTagCompound())
|
||||
{
|
||||
stack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
NBTTagCompound tag = stack.getTagCompound();
|
||||
|
||||
return ReagentRegistry.getReagentForKey(tag.getString("reagent"));
|
||||
}
|
||||
|
||||
public void setReagent(ItemStack stack, Reagent reagent)
|
||||
{
|
||||
if(!stack.hasTagCompound())
|
||||
{
|
||||
stack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
NBTTagCompound tag = stack.getTagCompound();
|
||||
|
||||
tag.setString("reagent", ReagentRegistry.getKeyForReagent(reagent));
|
||||
}
|
||||
|
||||
public void setReagentWithNotification(ItemStack stack, Reagent reagent, EntityPlayer player)
|
||||
{
|
||||
this.setReagent(stack, reagent);
|
||||
|
||||
if(reagent != null)
|
||||
{
|
||||
player.addChatComponentMessage(new ChatComponentText("Tank Segmenter now set to: " + reagent.name));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
package WayofTime.alchemicalWizardry.common.items.forestry;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.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.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ItemBloodFrame extends EnergyItems //implements IHiveFrame
|
||||
{
|
||||
|
@ -18,7 +18,6 @@ public class ItemBloodFrame extends EnergyItems //implements IHiveFrame
|
|||
super();
|
||||
this.maxStackSize = 1;
|
||||
this.setMaxDamage(10);
|
||||
//setMaxDamage(1000);
|
||||
setEnergyUsed(3000);
|
||||
setCreativeTab(AlchemicalWizardry.tabBloodMagic);
|
||||
}
|
||||
|
@ -45,107 +44,96 @@ public class ItemBloodFrame extends EnergyItems //implements IHiveFrame
|
|||
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)
|
||||
{
|
||||
EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer);
|
||||
|
||||
if(par1ItemStack.getItemDamage()>0)
|
||||
|
||||
if (par1ItemStack.getItemDamage() > 0)
|
||||
{
|
||||
EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed());
|
||||
par1ItemStack.setItemDamage(par1ItemStack.getItemDamage()-1);
|
||||
EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed());
|
||||
par1ItemStack.setItemDamage(par1ItemStack.getItemDamage() - 1);
|
||||
}
|
||||
|
||||
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
/**TODO Bee Stuff
|
||||
@Override
|
||||
public float getTerritoryModifier(IBeeGenome genome, float currentModifier)
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return 1;
|
||||
}
|
||||
@Override public float getTerritoryModifier(IBeeGenome genome, float currentModifier)
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getMutationModifier(IBeeGenome genome, IBeeGenome mate, float currentModifier)
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return 1;
|
||||
}
|
||||
@Override public float getMutationModifier(IBeeGenome genome, IBeeGenome mate, float currentModifier)
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getLifespanModifier(IBeeGenome genome, IBeeGenome mate, float currentModifier)
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return 0.0001f;
|
||||
}
|
||||
@Override public float getLifespanModifier(IBeeGenome genome, IBeeGenome mate, float currentModifier)
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return 0.0001f;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getProductionModifier(IBeeGenome genome, float currentModifier)
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return 0;
|
||||
}
|
||||
@Override public float getProductionModifier(IBeeGenome genome, float currentModifier)
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getFloweringModifier(IBeeGenome genome, float currentModifier)
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return 1;
|
||||
}
|
||||
@Override public float getFloweringModifier(IBeeGenome genome, float currentModifier)
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getGeneticDecay(IBeeGenome genome, float currentModifier)
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return 1;
|
||||
}
|
||||
@Override public float getGeneticDecay(IBeeGenome genome, float currentModifier)
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSealed()
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
@Override public boolean isSealed()
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSelfLighted()
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
@Override public boolean isSelfLighted()
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSunlightSimulated()
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
@Override public boolean isSunlightSimulated()
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isHellish()
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
@Override public boolean isHellish()
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack frameUsed(IBeeHousing housing, ItemStack frame, IBee queen, int wear)
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
if(EnergyItems.canSyphonInContainer(frame, getEnergyUsed()*wear))
|
||||
{
|
||||
EnergyItems.syphonWhileInContainer(frame, getEnergyUsed()*wear);
|
||||
return frame;
|
||||
}else
|
||||
{
|
||||
frame.setItemDamage(frame.getItemDamage() + wear);
|
||||
if(frame.getItemDamage()>=frame.getMaxDamage())
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return frame;
|
||||
}
|
||||
@Override public ItemStack frameUsed(IBeeHousing housing, ItemStack frame, IBee queen, int wear)
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
if(EnergyItems.canSyphonInContainer(frame, getEnergyUsed()*wear))
|
||||
{
|
||||
EnergyItems.syphonWhileInContainer(frame, getEnergyUsed()*wear);
|
||||
return frame;
|
||||
}else
|
||||
{
|
||||
frame.setItemDamage(frame.getItemDamage() + wear);
|
||||
if(frame.getItemDamage()>=frame.getMaxDamage())
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return frame;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
*/
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
}
|
||||
|
|
|
@ -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.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.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.IIconRegister;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.ai.attributes.AttributeModifier;
|
||||
|
@ -24,13 +23,12 @@ import net.minecraft.util.EnumChatFormatting;
|
|||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.Constants;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.AlchemyPotionHelper;
|
||||
|
||||
import com.google.common.collect.HashMultimap;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
public class AlchemyFlask extends Item
|
||||
{
|
||||
|
@ -42,7 +40,6 @@ public class AlchemyFlask extends Item
|
|||
this.setMaxDamage(8);
|
||||
this.setMaxStackSize(1);
|
||||
setCreativeTab(AlchemicalWizardry.tabBloodMagic);
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -64,7 +61,6 @@ public class AlchemyFlask extends Item
|
|||
NBTTagCompound nbttagcompound = (NBTTagCompound) nbttaglist.getCompoundTagAt(i);
|
||||
arraylist.add(AlchemyPotionHelper.readEffectFromNBT(nbttagcompound));
|
||||
}
|
||||
|
||||
return arraylist;
|
||||
} else
|
||||
{
|
||||
|
@ -166,11 +162,6 @@ public class AlchemyFlask extends Item
|
|||
*/
|
||||
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)
|
||||
{
|
||||
// if(par3EntityPlayer.isSneaking())
|
||||
// {
|
||||
// this.setIsPotionThrowable(true, par1ItemStack);
|
||||
// return par1ItemStack;
|
||||
// }
|
||||
if (par1ItemStack.getItemDamage() < par1ItemStack.getMaxDamage())
|
||||
{
|
||||
if (this.isPotionThrowable(par1ItemStack))
|
||||
|
@ -195,14 +186,12 @@ public class AlchemyFlask extends Item
|
|||
|
||||
par3EntityPlayer.setItemInUse(par1ItemStack, this.getMaxItemUseDuration(par1ItemStack));
|
||||
}
|
||||
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
public void setConcentrationOfPotion(ItemStack par1ItemStack, int potionID, int concentration)
|
||||
{
|
||||
ArrayList<AlchemyPotionHelper> list = this.getEffects(par1ItemStack);
|
||||
|
||||
if (list != null)
|
||||
{
|
||||
for (AlchemyPotionHelper aph : list)
|
||||
|
@ -213,7 +202,6 @@ public class AlchemyFlask extends Item
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
this.setEffects(par1ItemStack, list);
|
||||
}
|
||||
}
|
||||
|
@ -221,7 +209,6 @@ public class AlchemyFlask extends Item
|
|||
public void setDurationFactorOfPotion(ItemStack par1ItemStack, int potionID, int durationFactor)
|
||||
{
|
||||
ArrayList<AlchemyPotionHelper> list = this.getEffects(par1ItemStack);
|
||||
|
||||
if (list != null)
|
||||
{
|
||||
for (AlchemyPotionHelper aph : list)
|
||||
|
@ -232,7 +219,6 @@ public class AlchemyFlask extends Item
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
this.setEffects(par1ItemStack, list);
|
||||
}
|
||||
}
|
||||
|
@ -257,7 +243,6 @@ public class AlchemyFlask extends Item
|
|||
{
|
||||
int i = 0;
|
||||
ArrayList<AlchemyPotionHelper> list = this.getEffects(par1ItemStack);
|
||||
|
||||
if (list != null)
|
||||
{
|
||||
for (AlchemyPotionHelper aph : list)
|
||||
|
@ -269,13 +254,9 @@ public class AlchemyFlask extends Item
|
|||
|
||||
i++;
|
||||
}
|
||||
|
||||
//if(i<this.maxPotionAmount)
|
||||
{
|
||||
list.add(new AlchemyPotionHelper(potionID, tickDuration, 0, 0));
|
||||
this.setEffects(par1ItemStack, list);
|
||||
return true;
|
||||
}
|
||||
list.add(new AlchemyPotionHelper(potionID, tickDuration, 0, 0));
|
||||
this.setEffects(par1ItemStack, list);
|
||||
return true;
|
||||
} else
|
||||
{
|
||||
list = new ArrayList();
|
||||
|
@ -318,7 +299,7 @@ public class AlchemyFlask extends Item
|
|||
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(((IAttribute)entry.getKey()).getAttributeUnlocalizedName(), attributemodifier1);
|
||||
hashmultimap.put(((IAttribute) entry.getKey()).getAttributeUnlocalizedName(), attributemodifier1);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -388,8 +369,6 @@ public class AlchemyFlask extends Item
|
|||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
//return false;
|
||||
}
|
||||
|
||||
public void setIsPotionThrowable(boolean flag, ItemStack par1ItemStack)
|
||||
|
@ -412,22 +391,16 @@ public class AlchemyFlask extends Item
|
|||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
NBTTagList nbttaglist = new NBTTagList();
|
||||
|
||||
for (PotionEffect pe : potionList)
|
||||
{
|
||||
NBTTagCompound d = new NBTTagCompound();
|
||||
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");
|
||||
d.setBoolean("Ambient", pe.getIsAmbient());
|
||||
// boolean flag = par0NBTTagCompound.getBoolean("Ambient");
|
||||
nbttaglist.appendTag(d);
|
||||
}
|
||||
|
||||
potionStack.stackTagCompound.setTag("CustomPotionEffects", nbttaglist);
|
||||
EntityPotion entityPotion = new EntityPotion(worldObj, entityLivingBase, potionStack);
|
||||
return entityPotion;
|
||||
|
|
|
@ -1,20 +1,18 @@
|
|||
package WayofTime.alchemicalWizardry.common.items.potion;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
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.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.ModItems;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
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 java.util.List;
|
||||
|
||||
public class AlchemyReagent extends Item
|
||||
{
|
||||
|
@ -23,7 +21,6 @@ public class AlchemyReagent extends Item
|
|||
super();
|
||||
setCreativeTab(AlchemicalWizardry.tabBloodMagic);
|
||||
this.setMaxStackSize(64);
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -35,55 +32,46 @@ public class AlchemyReagent extends Item
|
|||
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:Incendium");
|
||||
return;
|
||||
}
|
||||
|
||||
if (this == ModItems.magicales)
|
||||
{
|
||||
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:Magicales");
|
||||
return;
|
||||
}
|
||||
|
||||
if (this == ModItems.sanctus)
|
||||
{
|
||||
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:Sanctus");
|
||||
return;
|
||||
}
|
||||
|
||||
if (this == ModItems.aether)
|
||||
{
|
||||
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:Aether");
|
||||
return;
|
||||
}
|
||||
|
||||
if (this == ModItems.simpleCatalyst)
|
||||
{
|
||||
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:SimpleCatalyst");
|
||||
return;
|
||||
}
|
||||
|
||||
if (this == ModItems.crepitous)
|
||||
{
|
||||
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:Crepitous");
|
||||
return;
|
||||
}
|
||||
|
||||
if (this == ModItems.crystallos)
|
||||
{
|
||||
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:Crystallos");
|
||||
return;
|
||||
}
|
||||
|
||||
if (this == ModItems.terrae)
|
||||
{
|
||||
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:Terrae");
|
||||
return;
|
||||
}
|
||||
|
||||
if (this == ModItems.aquasalus)
|
||||
{
|
||||
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:Aquasalus");
|
||||
return;
|
||||
}
|
||||
|
||||
if (this == ModItems.tennebrae)
|
||||
{
|
||||
this.itemIcon = iconRegister.registerIcon("AlchemicalWizardry:Tennebrae");
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package WayofTime.alchemicalWizardry.common.items.potion;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
|
||||
public class AverageLengtheningCatalyst extends LengtheningCatalyst
|
||||
{
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package WayofTime.alchemicalWizardry.common.items.potion;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
|
||||
public class AveragePowerCatalyst extends PowerCatalyst
|
||||
{
|
||||
|
|
|
@ -1,21 +1,21 @@
|
|||
package WayofTime.alchemicalWizardry.common.items.potion;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.alchemy.ICombinationalCatalyst;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.item.Item;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.alchemy.ICombinationalCatalyst;
|
||||
|
||||
public class CombinationalCatalyst extends Item implements ICombinationalCatalyst
|
||||
{
|
||||
public CombinationalCatalyst()
|
||||
{
|
||||
super();
|
||||
this.setCreativeTab(AlchemicalWizardry.tabBloodMagic);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CombinationalCatalyst()
|
||||
{
|
||||
super();
|
||||
this.setCreativeTab(AlchemicalWizardry.tabBloodMagic);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister iconRegister)
|
||||
{
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
package WayofTime.alchemicalWizardry.common.items.potion;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
public class EnhancedFillingAgent extends WeakFillingAgent
|
||||
{
|
||||
|
@ -19,13 +19,10 @@ public class EnhancedFillingAgent extends WeakFillingAgent
|
|||
public int getFilledAmountForPotionNumber(int potionEffects)
|
||||
{
|
||||
Random rand = new Random();
|
||||
|
||||
if (potionEffects == 0)
|
||||
{
|
||||
return 8;
|
||||
}
|
||||
|
||||
//if(potionEffects >=1 && potionEffects<=5)
|
||||
{
|
||||
switch (potionEffects)
|
||||
{
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package WayofTime.alchemicalWizardry.common.items.potion;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
|
||||
public class GreaterLengtheningCatalyst extends LengtheningCatalyst
|
||||
{
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package WayofTime.alchemicalWizardry.common.items.potion;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
|
||||
public class GreaterPowerCatalyst extends PowerCatalyst
|
||||
{
|
||||
|
|
|
@ -7,7 +7,6 @@ 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 java.util.List;
|
||||
|
@ -18,7 +17,6 @@ public class LengtheningCatalyst extends Item implements ICatalyst
|
|||
|
||||
public LengtheningCatalyst(int catalystStrength)
|
||||
{
|
||||
super();
|
||||
this.catalystStrength = catalystStrength;
|
||||
setCreativeTab(AlchemicalWizardry.tabBloodMagic);
|
||||
}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package WayofTime.alchemicalWizardry.common.items.potion;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
|
||||
public class MundaneLengtheningCatalyst extends LengtheningCatalyst
|
||||
{
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package WayofTime.alchemicalWizardry.common.items.potion;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
|
||||
public class MundanePowerCatalyst extends PowerCatalyst
|
||||
{
|
||||
|
|
|
@ -7,7 +7,6 @@ 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 java.util.List;
|
||||
|
|
|
@ -1,20 +1,18 @@
|
|||
package WayofTime.alchemicalWizardry.common.items.potion;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
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.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry;
|
||||
import WayofTime.alchemicalWizardry.common.IBindingAgent;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
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 java.util.List;
|
||||
|
||||
public class StandardBindingAgent extends Item implements IBindingAgent
|
||||
{
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package WayofTime.alchemicalWizardry.common.items.potion;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
|
||||
public class StandardFillingAgent extends WeakFillingAgent
|
||||
{
|
||||
|
@ -16,7 +16,6 @@ public class StandardFillingAgent extends WeakFillingAgent
|
|||
@Override
|
||||
public int getFilledAmountForPotionNumber(int potionEffects)
|
||||
{
|
||||
//Random rand = new Random();
|
||||
if (potionEffects == 0)
|
||||
{
|
||||
return 8;
|
||||
|
|
|
@ -1,15 +1,14 @@
|
|||
package WayofTime.alchemicalWizardry.common.items.potion;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
|
||||
public class WeakBindingAgent extends StandardBindingAgent
|
||||
{
|
||||
public WeakBindingAgent()
|
||||
{
|
||||
super();
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,21 +1,19 @@
|
|||
package WayofTime.alchemicalWizardry.common.items.potion;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
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.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.AlchemyRecipeRegistry;
|
||||
import WayofTime.alchemicalWizardry.common.IFillingAgent;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
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 java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
public class WeakFillingAgent extends Item implements IFillingAgent
|
||||
{
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
package WayofTime.alchemicalWizardry.common.items.sigil;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.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.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class AirSigil extends EnergyItems implements ArmourUpgrade
|
||||
{
|
||||
|
|
|
@ -1,7 +1,15 @@
|
|||
package WayofTime.alchemicalWizardry.common.items.sigil;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.IReagentHandler;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainerInfo;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IReagentManipulator;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
|
@ -14,16 +22,8 @@ import net.minecraft.util.ChatComponentText;
|
|||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.IReagentHandler;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentContainerInfo;
|
||||
import WayofTime.alchemicalWizardry.api.alchemy.energy.ReagentRegistry;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IBindable;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IReagentManipulator;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class DivinationSigil extends Item implements ArmourUpgrade, IReagentManipulator, IBindable
|
||||
{
|
||||
|
@ -31,7 +31,6 @@ public class DivinationSigil extends Item implements ArmourUpgrade, IReagentMani
|
|||
{
|
||||
super();
|
||||
this.maxStackSize = 1;
|
||||
//setMaxDamage(1000);
|
||||
setCreativeTab(AlchemicalWizardry.tabBloodMagic);
|
||||
}
|
||||
|
||||
|
@ -72,9 +71,8 @@ public class DivinationSigil extends Item implements ArmourUpgrade, IReagentMani
|
|||
}
|
||||
|
||||
String ownerName = itemTag.getString("ownerName");
|
||||
//PacketDispatcher.sendPacketToServer(PacketHandler.getPacket(ownerName));
|
||||
int currentEssence = EnergyItems.getCurrentEssence(ownerName);
|
||||
|
||||
|
||||
MovingObjectPosition movingobjectposition = this.getMovingObjectPositionFromPlayer(par2World, par3EntityPlayer, false);
|
||||
|
||||
if (movingobjectposition == null)
|
||||
|
@ -84,58 +82,55 @@ public class DivinationSigil extends Item implements ArmourUpgrade, IReagentMani
|
|||
return par1ItemStack;
|
||||
} else
|
||||
{
|
||||
if (movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK)
|
||||
if (movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK)
|
||||
{
|
||||
int x = movingobjectposition.blockX;
|
||||
int y = movingobjectposition.blockY;
|
||||
int z = movingobjectposition.blockZ;
|
||||
|
||||
|
||||
TileEntity tile = par2World.getTileEntity(x, y, z);
|
||||
|
||||
if(!(tile instanceof IReagentHandler))
|
||||
|
||||
if (!(tile instanceof IReagentHandler))
|
||||
{
|
||||
par3EntityPlayer.addChatMessage(new ChatComponentText("Current Essence: " + EnergyItems.getCurrentEssence(ownerName) + "LP"));
|
||||
|
||||
return par1ItemStack;
|
||||
par3EntityPlayer.addChatMessage(new ChatComponentText("Current Essence: " + EnergyItems.getCurrentEssence(ownerName) + "LP"));
|
||||
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
IReagentHandler relay = (IReagentHandler)tile;
|
||||
|
||||
IReagentHandler relay = (IReagentHandler) tile;
|
||||
|
||||
ReagentContainerInfo[] infoList = relay.getContainerInfo(ForgeDirection.UNKNOWN);
|
||||
if(infoList != null)
|
||||
if (infoList != null)
|
||||
{
|
||||
for(ReagentContainerInfo info : infoList)
|
||||
{
|
||||
if(info != null && info.reagent != null && info.reagent.reagent != null)
|
||||
{
|
||||
par3EntityPlayer.addChatComponentMessage(new ChatComponentText("Reagent: " + ReagentRegistry.getKeyForReagent(info.reagent.reagent) + ", Amount: " + info.reagent.amount));
|
||||
}
|
||||
}
|
||||
for (ReagentContainerInfo info : infoList)
|
||||
{
|
||||
if (info != null && info.reagent != null && info.reagent.reagent != null)
|
||||
{
|
||||
par3EntityPlayer.addChatComponentMessage(new ChatComponentText("Reagent: " + ReagentRegistry.getKeyForReagent(info.reagent.reagent) + ", Amount: " + info.reagent.amount));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onArmourUpdate(World world, EntityPlayer player, ItemStack thisItemStack)
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
player.addPotionEffect(new PotionEffect(Potion.nightVision.id, 400, 9, true));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isUpgrade()
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getEnergyForTenSeconds()
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return 25;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,13 +1,5 @@
|
|||
package WayofTime.alchemicalWizardry.common.items.sigil;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
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.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.ModBlocks;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IHolding;
|
||||
|
@ -15,6 +7,14 @@ import WayofTime.alchemicalWizardry.common.entity.projectile.EntityBloodLightPro
|
|||
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
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 java.util.List;
|
||||
|
||||
public class ItemBloodLightSigil extends EnergyItems implements IHolding
|
||||
{
|
||||
|
@ -24,10 +24,8 @@ public class ItemBloodLightSigil extends EnergyItems implements IHolding
|
|||
{
|
||||
super();
|
||||
this.maxStackSize = 1;
|
||||
//setMaxDamage(1000);
|
||||
setEnergyUsed(10);
|
||||
setCreativeTab(AlchemicalWizardry.tabBloodMagic);
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,19 +1,19 @@
|
|||
package WayofTime.alchemicalWizardry.common.items.sigil;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IHolding;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ItemSeerSigil extends Item implements IHolding, ArmourUpgrade
|
||||
{
|
||||
|
@ -60,29 +60,24 @@ public class ItemSeerSigil extends Item implements IHolding, ArmourUpgrade
|
|||
}
|
||||
|
||||
String ownerName = itemTag.getString("ownerName");
|
||||
|
||||
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onArmourUpdate(World world, EntityPlayer player,
|
||||
ItemStack thisItemStack)
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
@Override
|
||||
public void onArmourUpdate(World world, EntityPlayer player, ItemStack thisItemStack)
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isUpgrade()
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public boolean isUpgrade()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getEnergyForTenSeconds()
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return 0;
|
||||
}
|
||||
@Override
|
||||
public int getEnergyForTenSeconds()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,11 @@
|
|||
package WayofTime.alchemicalWizardry.common.items.sigil;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IHolding;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLiving;
|
||||
|
@ -11,12 +15,8 @@ import net.minecraft.nbt.NBTTagCompound;
|
|||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IHolding;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ItemSigilOfEnderSeverance extends EnergyItems implements IHolding
|
||||
{
|
||||
|
@ -148,18 +148,16 @@ public class ItemSigilOfEnderSeverance extends EnergyItems implements IHolding
|
|||
if (par1ItemStack.stackTagCompound.getBoolean("isActive"))
|
||||
{
|
||||
List<Entity> list = SpellHelper.getEntitiesInRange(par2World, par3Entity.posX, par3Entity.posY, par3Entity.posZ, 4.5, 4.5);
|
||||
for(Entity entity : list)
|
||||
for (Entity entity : list)
|
||||
{
|
||||
if(!entity.equals(par3Entity)&&entity instanceof EntityLiving)
|
||||
{
|
||||
((EntityLiving)entity).addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionPlanarBinding.id,5,0));
|
||||
}
|
||||
if (!entity.equals(par3Entity) && entity instanceof EntityLiving)
|
||||
{
|
||||
((EntityLiving) entity).addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionPlanarBinding.id, 5, 0));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (par2World.getWorldTime() % 200 == par1ItemStack.stackTagCompound.getInteger("worldTimeDelay") && par1ItemStack.stackTagCompound.getBoolean("isActive"))
|
||||
{
|
||||
//par3EntityPlayer.addPotionEffect(new PotionEffect(Potion.field_76444_x.id, 2400,99));
|
||||
if (!par3EntityPlayer.capabilities.isCreativeMode)
|
||||
{
|
||||
EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed());
|
||||
|
|
|
@ -1,9 +1,12 @@
|
|||
package WayofTime.alchemicalWizardry.common.items.sigil;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.swing.Icon;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TESpectralContainer;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
@ -14,13 +17,8 @@ import net.minecraft.tileentity.TileEntity;
|
|||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
|
||||
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TESpectralContainer;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ItemSigilOfSupression extends EnergyItems implements ArmourUpgrade
|
||||
{
|
||||
|
@ -103,11 +101,11 @@ public class ItemSigilOfSupression extends EnergyItems implements ArmourUpgrade
|
|||
{
|
||||
EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer);
|
||||
|
||||
if(SpellHelper.isFakePlayer(par2World, par3EntityPlayer))
|
||||
if (SpellHelper.isFakePlayer(par2World, par3EntityPlayer))
|
||||
{
|
||||
return par1ItemStack;
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
|
||||
if (par3EntityPlayer.isSneaking())
|
||||
{
|
||||
return par1ItemStack;
|
||||
|
@ -145,10 +143,10 @@ public class ItemSigilOfSupression extends EnergyItems implements ArmourUpgrade
|
|||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if(SpellHelper.isFakePlayer(par2World, (EntityPlayer)par3Entity))
|
||||
|
||||
if (SpellHelper.isFakePlayer(par2World, (EntityPlayer) par3Entity))
|
||||
{
|
||||
return;
|
||||
return;
|
||||
}
|
||||
|
||||
EntityPlayer par3EntityPlayer = (EntityPlayer) par3Entity;
|
||||
|
@ -158,55 +156,53 @@ public class ItemSigilOfSupression extends EnergyItems implements ArmourUpgrade
|
|||
par1ItemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
if (par1ItemStack.stackTagCompound.getBoolean("isActive")&&(!par2World.isRemote))
|
||||
if (par1ItemStack.stackTagCompound.getBoolean("isActive") && (!par2World.isRemote))
|
||||
{
|
||||
Vec3 blockVec = SpellHelper.getEntityBlockVector(par3EntityPlayer);
|
||||
int x = (int)blockVec.xCoord;
|
||||
int y = (int)blockVec.yCoord;
|
||||
int z = (int)blockVec.zCoord;
|
||||
Vec3 blockVec = SpellHelper.getEntityBlockVector(par3EntityPlayer);
|
||||
int x = (int) blockVec.xCoord;
|
||||
int y = (int) blockVec.yCoord;
|
||||
int z = (int) blockVec.zCoord;
|
||||
|
||||
for (int i = -radius; i <= radius; i++)
|
||||
{
|
||||
for (int j = -radius; j <= radius; j++)
|
||||
{
|
||||
for(int k = -radius; k <= radius; k++)
|
||||
for (int k = -radius; k <= radius; k++)
|
||||
{
|
||||
if (i * i + j * j + k * k >= (radius + 0.50f) * (radius + 0.50f))
|
||||
if (i * i + j * j + k * k >= (radius + 0.50f) * (radius + 0.50f))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
Block block = par2World.getBlock(x+i, y+j, z+k);
|
||||
|
||||
|
||||
if(SpellHelper.isBlockFluid(block))
|
||||
{
|
||||
if(par2World.getTileEntity(x+i, y+j, z+k)!=null)
|
||||
{
|
||||
par2World.setBlockToAir(x+i, y+j, z+k);
|
||||
}
|
||||
TESpectralContainer.createSpectralBlockAtLocation(par2World, x+i, y+j, z+k, refresh);
|
||||
}
|
||||
else
|
||||
{
|
||||
TileEntity tile = par2World.getTileEntity(x+i, y+j, z+k);
|
||||
if(tile instanceof TESpectralContainer)
|
||||
{
|
||||
((TESpectralContainer) tile).resetDuration(refresh);
|
||||
}
|
||||
}
|
||||
|
||||
Block block = par2World.getBlock(x + i, y + j, z + k);
|
||||
|
||||
|
||||
if (SpellHelper.isBlockFluid(block))
|
||||
{
|
||||
if (par2World.getTileEntity(x + i, y + j, z + k) != null)
|
||||
{
|
||||
par2World.setBlockToAir(x + i, y + j, z + k);
|
||||
}
|
||||
TESpectralContainer.createSpectralBlockAtLocation(par2World, x + i, y + j, z + k, refresh);
|
||||
} else
|
||||
{
|
||||
TileEntity tile = par2World.getTileEntity(x + i, y + j, z + k);
|
||||
if (tile instanceof TESpectralContainer)
|
||||
{
|
||||
((TESpectralContainer) tile).resetDuration(refresh);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (par2World.getWorldTime() % 200 == par1ItemStack.stackTagCompound.getInteger("worldTimeDelay") && par1ItemStack.stackTagCompound.getBoolean("isActive"))
|
||||
{
|
||||
//par3EntityPlayer.addPotionEffect(new PotionEffect(Potion.field_76444_x.id, 2400,99));
|
||||
if (!par3EntityPlayer.capabilities.isCreativeMode)
|
||||
{
|
||||
EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed());
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -216,41 +212,40 @@ public class ItemSigilOfSupression extends EnergyItems implements ArmourUpgrade
|
|||
@Override
|
||||
public void onArmourUpdate(World world, EntityPlayer player, ItemStack thisItemStack)
|
||||
{
|
||||
Vec3 blockVec = SpellHelper.getEntityBlockVector(player);
|
||||
int x = (int)blockVec.xCoord;
|
||||
int y = (int)blockVec.yCoord;
|
||||
int z = (int)blockVec.zCoord;
|
||||
Vec3 blockVec = SpellHelper.getEntityBlockVector(player);
|
||||
int x = (int) blockVec.xCoord;
|
||||
int y = (int) blockVec.yCoord;
|
||||
int z = (int) blockVec.zCoord;
|
||||
|
||||
for (int i = -radius; i <= radius; i++)
|
||||
{
|
||||
for (int j = -radius; j <= radius; j++)
|
||||
{
|
||||
for(int k = -radius; k <= radius; k++)
|
||||
for (int k = -radius; k <= radius; k++)
|
||||
{
|
||||
if (i * i + j * j + k * k >= (radius + 0.50f) * (radius + 0.50f))
|
||||
if (i * i + j * j + k * k >= (radius + 0.50f) * (radius + 0.50f))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
Block block = world.getBlock(x+i, y+j, z+k);
|
||||
|
||||
|
||||
if(SpellHelper.isBlockFluid(block))
|
||||
{
|
||||
if(world.getTileEntity(x+i, y+j, z+k)!=null)
|
||||
{
|
||||
world.setBlockToAir(x+i, y+j, z+k);
|
||||
}
|
||||
TESpectralContainer.createSpectralBlockAtLocation(world, x+i, y+j, z+k, refresh);
|
||||
}
|
||||
else
|
||||
{
|
||||
TileEntity tile = world.getTileEntity(x+i, y+j, z+k);
|
||||
if(tile instanceof TESpectralContainer)
|
||||
{
|
||||
((TESpectralContainer) tile).resetDuration(refresh);
|
||||
}
|
||||
}
|
||||
|
||||
Block block = world.getBlock(x + i, y + j, z + k);
|
||||
|
||||
|
||||
if (SpellHelper.isBlockFluid(block))
|
||||
{
|
||||
if (world.getTileEntity(x + i, y + j, z + k) != null)
|
||||
{
|
||||
world.setBlockToAir(x + i, y + j, z + k);
|
||||
}
|
||||
TESpectralContainer.createSpectralBlockAtLocation(world, x + i, y + j, z + k, refresh);
|
||||
} else
|
||||
{
|
||||
TileEntity tile = world.getTileEntity(x + i, y + j, z + k);
|
||||
if (tile instanceof TESpectralContainer)
|
||||
{
|
||||
((TESpectralContainer) tile).resetDuration(refresh);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,11 @@
|
|||
package WayofTime.alchemicalWizardry.common.items.sigil;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.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.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
@ -18,12 +22,8 @@ import net.minecraftforge.common.util.ForgeDirection;
|
|||
import net.minecraftforge.fluids.FluidRegistry;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.fluids.IFluidHandler;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.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 java.util.List;
|
||||
|
||||
public class LavaSigil extends ItemBucket implements ArmourUpgrade
|
||||
{
|
||||
|
@ -37,7 +37,6 @@ public class LavaSigil extends ItemBucket implements ArmourUpgrade
|
|||
{
|
||||
super(Blocks.lava);
|
||||
this.maxStackSize = 1;
|
||||
//setMaxDamage(2000);
|
||||
setEnergyUsed(1000);
|
||||
setCreativeTab(AlchemicalWizardry.tabBloodMagic);
|
||||
}
|
||||
|
@ -86,7 +85,7 @@ public class LavaSigil extends ItemBucket implements ArmourUpgrade
|
|||
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;
|
||||
|
||||
|
||||
MovingObjectPosition movingobjectposition = this.getMovingObjectPositionFromPlayer(par2World, par3EntityPlayer, false);
|
||||
|
||||
if (movingobjectposition == null)
|
||||
|
@ -104,79 +103,72 @@ public class LavaSigil extends ItemBucket implements ArmourUpgrade
|
|||
{
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
|
||||
TileEntity tile = par2World.getTileEntity(i, j, k);
|
||||
if(tile instanceof IFluidHandler)
|
||||
if (tile instanceof IFluidHandler)
|
||||
{
|
||||
FluidStack fluid = new FluidStack(FluidRegistry.LAVA,1000);
|
||||
int amount = ((IFluidHandler) tile).fill(ForgeDirection.getOrientation(movingobjectposition.sideHit), fluid, false);
|
||||
|
||||
if(amount>0)
|
||||
{
|
||||
((IFluidHandler) tile).fill(ForgeDirection.getOrientation(movingobjectposition.sideHit), fluid, true);
|
||||
if (!par3EntityPlayer.capabilities.isCreativeMode)
|
||||
{
|
||||
if (!EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed()))
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return par1ItemStack;
|
||||
}
|
||||
FluidStack fluid = new FluidStack(FluidRegistry.LAVA, 1000);
|
||||
int amount = ((IFluidHandler) tile).fill(ForgeDirection.getOrientation(movingobjectposition.sideHit), fluid, false);
|
||||
|
||||
//if (this.isFull == 0)
|
||||
{
|
||||
//Empty
|
||||
} //else
|
||||
{
|
||||
if (movingobjectposition.sideHit == 0)
|
||||
{
|
||||
--j;
|
||||
}
|
||||
|
||||
if (movingobjectposition.sideHit == 1)
|
||||
{
|
||||
++j;
|
||||
}
|
||||
|
||||
if (movingobjectposition.sideHit == 2)
|
||||
{
|
||||
--k;
|
||||
}
|
||||
|
||||
if (movingobjectposition.sideHit == 3)
|
||||
{
|
||||
++k;
|
||||
}
|
||||
|
||||
if (movingobjectposition.sideHit == 4)
|
||||
{
|
||||
--i;
|
||||
}
|
||||
|
||||
if (movingobjectposition.sideHit == 5)
|
||||
{
|
||||
++i;
|
||||
}
|
||||
|
||||
if (!par3EntityPlayer.canPlayerEdit(i, j, k, movingobjectposition.sideHit, par1ItemStack))
|
||||
{
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
if (this.tryPlaceContainedLiquid(par2World, d0, d1, d2, i, j, k) && !par3EntityPlayer.capabilities.isCreativeMode)
|
||||
if (amount > 0)
|
||||
{
|
||||
((IFluidHandler) tile).fill(ForgeDirection.getOrientation(movingobjectposition.sideHit), fluid, true);
|
||||
if (!par3EntityPlayer.capabilities.isCreativeMode)
|
||||
{
|
||||
if (!EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed()))
|
||||
{
|
||||
}
|
||||
} else
|
||||
{
|
||||
return par1ItemStack;
|
||||
}
|
||||
}
|
||||
|
||||
return par1ItemStack;
|
||||
}
|
||||
if (movingobjectposition.sideHit == 0)
|
||||
{
|
||||
--j;
|
||||
}
|
||||
|
||||
if (movingobjectposition.sideHit == 1)
|
||||
{
|
||||
++j;
|
||||
}
|
||||
|
||||
if (movingobjectposition.sideHit == 2)
|
||||
{
|
||||
--k;
|
||||
}
|
||||
|
||||
if (movingobjectposition.sideHit == 3)
|
||||
{
|
||||
++k;
|
||||
}
|
||||
|
||||
if (movingobjectposition.sideHit == 4)
|
||||
{
|
||||
--i;
|
||||
}
|
||||
|
||||
if (movingobjectposition.sideHit == 5)
|
||||
{
|
||||
++i;
|
||||
}
|
||||
|
||||
if (!par3EntityPlayer.canPlayerEdit(i, j, k, movingobjectposition.sideHit, par1ItemStack))
|
||||
{
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
if (this.tryPlaceContainedLiquid(par2World, d0, d1, d2, i, j, k) && !par3EntityPlayer.capabilities.isCreativeMode)
|
||||
{
|
||||
if (!par3EntityPlayer.capabilities.isCreativeMode)
|
||||
{
|
||||
if (!EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed()))
|
||||
{
|
||||
}
|
||||
} else
|
||||
{
|
||||
return par1ItemStack;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -189,10 +181,7 @@ public class LavaSigil extends ItemBucket implements ArmourUpgrade
|
|||
*/
|
||||
public boolean tryPlaceContainedLiquid(World par1World, double par2, double par4, double par6, int par8, int par9, int par10)
|
||||
{
|
||||
//if (this.isFull <= 0)
|
||||
{
|
||||
//return false;
|
||||
} if (!par1World.isAirBlock(par8, par9, par10) && par1World.getBlock(par8, par9, par10).getMaterial().isSolid())
|
||||
if (!par1World.isAirBlock(par8, par9, par10) && par1World.getBlock(par8, par9, par10).getMaterial().isSolid())
|
||||
{
|
||||
return false;
|
||||
} else if ((par1World.getBlock(par8, par9, par10) == Blocks.lava || par1World.getBlock(par8, par9, par10) == Blocks.flowing_lava) && par1World.getBlockMetadata(par8, par9, par10) == 0)
|
||||
|
@ -214,39 +203,7 @@ public class LavaSigil extends ItemBucket implements ArmourUpgrade
|
|||
{
|
||||
return this.energyUsed;
|
||||
}
|
||||
//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)
|
||||
// {
|
||||
// if (world != null)
|
||||
// {
|
||||
// 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;
|
||||
// float f1 = f * 0.6F + 0.4F;
|
||||
// float f2 = f * f * 0.7F - 0.5F;
|
||||
// float f3 = f * f * 0.6F - 0.7F;
|
||||
//
|
||||
// for (int l = 0; l < 8; ++l)
|
||||
// {
|
||||
// world.spawnParticle("reddust", posX + Math.random() - Math.random(), posY + Math.random() - Math.random(), posZ + Math.random() - Math.random(), f1, f2, f3);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// for (int i = 0; i < damage; i++)
|
||||
// {
|
||||
// //player.setEntityHealth((player.getHealth()-1));
|
||||
// player.setEntityHealth(player.func_110143_aJ() - 1);
|
||||
//
|
||||
// if (player.func_110143_aJ() <= 0)
|
||||
// {
|
||||
// player.inventory.dropAllItems();
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
protected boolean syphonBatteries(ItemStack ist, EntityPlayer player, int damageToBeDone)
|
||||
{
|
||||
if (!player.capabilities.isCreativeMode)
|
||||
|
@ -262,7 +219,6 @@ public class LavaSigil extends ItemBucket implements ArmourUpgrade
|
|||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (stack.getItem() instanceof EnergyBattery && !usedBattery)
|
||||
{
|
||||
if (stack.getItemDamage() <= stack.getMaxDamage() - damageToBeDone)
|
||||
|
@ -286,25 +242,21 @@ public class LavaSigil extends ItemBucket implements ArmourUpgrade
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onArmourUpdate(World world, EntityPlayer player,
|
||||
ItemStack thisItemStack)
|
||||
public void onArmourUpdate(World world, EntityPlayer player, ItemStack thisItemStack)
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
player.addPotionEffect(new PotionEffect(Potion.fireResistance.id, 2, 9,true));
|
||||
player.addPotionEffect(new PotionEffect(Potion.fireResistance.id, 2, 9, true));
|
||||
player.extinguish();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isUpgrade()
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getEnergyForTenSeconds()
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return 100;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
package WayofTime.alchemicalWizardry.common.items.sigil;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import WayofTime.alchemicalWizardry.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.IIconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
@ -11,10 +13,8 @@ import net.minecraft.potion.Potion;
|
|||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class SigilOfElementalAffinity extends EnergyItems
|
||||
{
|
||||
|
@ -116,9 +116,6 @@ public class SigilOfElementalAffinity extends EnergyItems
|
|||
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));
|
||||
|
||||
//Test with added health boost
|
||||
//par3EntityPlayer.addPotionEffect(new PotionEffect(Potion.field_76444_x.id, 2400,99));
|
||||
if (!par3EntityPlayer.capabilities.isCreativeMode)
|
||||
{
|
||||
if (!EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed()))
|
||||
|
@ -157,7 +154,6 @@ public class SigilOfElementalAffinity extends EnergyItems
|
|||
|
||||
if (par2World.getWorldTime() % 200 == par1ItemStack.stackTagCompound.getInteger("worldTimeDelay") && par1ItemStack.stackTagCompound.getBoolean("isActive"))
|
||||
{
|
||||
//par3EntityPlayer.addPotionEffect(new PotionEffect(Potion.field_76444_x.id, 2400,99));
|
||||
if (!par3EntityPlayer.capabilities.isCreativeMode)
|
||||
{
|
||||
if (!EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed()))
|
||||
|
|
|
@ -1,7 +1,11 @@
|
|||
package WayofTime.alchemicalWizardry.common.items.sigil;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
|
||||
import cpw.mods.fml.common.eventhandler.Event.Result;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.IGrowable;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
|
@ -14,13 +18,8 @@ import net.minecraft.world.World;
|
|||
import net.minecraftforge.common.IPlantable;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.event.entity.player.BonemealEvent;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade;
|
||||
import WayofTime.alchemicalWizardry.common.alchemy.ICombinationalCatalyst;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
|
||||
import cpw.mods.fml.common.eventhandler.Event.Result;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class SigilOfGrowth extends EnergyItems implements ArmourUpgrade
|
||||
{
|
||||
|
@ -32,10 +31,8 @@ public class SigilOfGrowth extends EnergyItems implements ArmourUpgrade
|
|||
{
|
||||
super();
|
||||
this.maxStackSize = 1;
|
||||
//setMaxDamage(1000);
|
||||
setEnergyUsed(150);
|
||||
setCreativeTab(AlchemicalWizardry.tabBloodMagic);
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -124,10 +121,10 @@ public class SigilOfGrowth extends EnergyItems implements ArmourUpgrade
|
|||
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)
|
||||
{
|
||||
EnergyItems.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer);
|
||||
|
||||
if(par2World.isRemote)
|
||||
|
||||
if (par2World.isRemote)
|
||||
{
|
||||
return par1ItemStack;
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
if (par3EntityPlayer.isSneaking())
|
||||
|
@ -169,7 +166,6 @@ public class SigilOfGrowth extends EnergyItems implements ArmourUpgrade
|
|||
}
|
||||
|
||||
EntityPlayer par3EntityPlayer = (EntityPlayer) par3Entity;
|
||||
|
||||
if (par1ItemStack.stackTagCompound == null)
|
||||
{
|
||||
par1ItemStack.setTagCompound(new NBTTagCompound());
|
||||
|
@ -181,7 +177,6 @@ public class SigilOfGrowth extends EnergyItems implements ArmourUpgrade
|
|||
{
|
||||
EnergyItems.syphonBatteries(par1ItemStack, (EntityPlayer) par3Entity, getEnergyUsed());
|
||||
}
|
||||
|
||||
int range = 5;
|
||||
int verticalRange = 2;
|
||||
int posX = (int) Math.round(par3Entity.posX - 0.5f);
|
||||
|
@ -195,7 +190,7 @@ public class SigilOfGrowth extends EnergyItems implements ArmourUpgrade
|
|||
for (int iy = posY - verticalRange; iy <= posY + verticalRange; iy++)
|
||||
{
|
||||
Block block = par2World.getBlock(ix, iy, iz);
|
||||
|
||||
|
||||
|
||||
if (block instanceof IPlantable)
|
||||
{
|
||||
|
@ -226,14 +221,14 @@ public class SigilOfGrowth extends EnergyItems implements ArmourUpgrade
|
|||
{
|
||||
if (!p_150919_1_.isRemote)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
if (block instanceof IGrowable)
|
||||
{
|
||||
IGrowable igrowable = (IGrowable)block;
|
||||
IGrowable igrowable = (IGrowable) block;
|
||||
|
||||
if (igrowable.func_149851_a(p_150919_1_, p_150919_2_, p_150919_3_, p_150919_4_, p_150919_1_.isRemote))
|
||||
{
|
||||
|
@ -244,7 +239,7 @@ public class SigilOfGrowth extends EnergyItems implements ArmourUpgrade
|
|||
igrowable.func_149853_b(p_150919_1_, p_150919_1_.rand, p_150919_2_, p_150919_3_, p_150919_4_);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
return true;
|
||||
|
@ -257,11 +252,11 @@ public class SigilOfGrowth extends EnergyItems implements ArmourUpgrade
|
|||
@Override
|
||||
public void onArmourUpdate(World world, EntityPlayer player, ItemStack thisItemStack)
|
||||
{
|
||||
if(world.isRemote)
|
||||
if (world.isRemote)
|
||||
{
|
||||
return;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
int range = 5;
|
||||
int verticalRange = 2;
|
||||
int posX = (int) Math.round(player.posX - 0.5f);
|
||||
|
@ -274,8 +269,8 @@ public class SigilOfGrowth extends EnergyItems implements ArmourUpgrade
|
|||
{
|
||||
for (int iy = posY - verticalRange; iy <= posY + verticalRange; iy++)
|
||||
{
|
||||
Block block = world.getBlock(ix, iy, iz);
|
||||
|
||||
Block block = world.getBlock(ix, iy, iz);
|
||||
|
||||
|
||||
if (block instanceof IPlantable)
|
||||
{
|
||||
|
@ -292,14 +287,12 @@ public class SigilOfGrowth extends EnergyItems implements ArmourUpgrade
|
|||
@Override
|
||||
public boolean isUpgrade()
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getEnergyForTenSeconds()
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return 50;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
package WayofTime.alchemicalWizardry.common.items.sigil;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.swing.Icon;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.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.IIconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
@ -12,11 +13,8 @@ import net.minecraft.nbt.NBTTagCompound;
|
|||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class SigilOfHaste extends EnergyItems implements ArmourUpgrade
|
||||
{
|
||||
|
@ -29,7 +27,6 @@ public class SigilOfHaste extends EnergyItems implements ArmourUpgrade
|
|||
{
|
||||
super();
|
||||
this.maxStackSize = 1;
|
||||
//setMaxDamage(100);
|
||||
setEnergyUsed(250);
|
||||
setCreativeTab(AlchemicalWizardry.tabBloodMagic);
|
||||
}
|
||||
|
@ -117,10 +114,6 @@ public class SigilOfHaste extends EnergyItems implements ArmourUpgrade
|
|||
par1ItemStack.setItemDamage(1);
|
||||
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));
|
||||
|
||||
//Test with added health boost
|
||||
//par3EntityPlayer.addPotionEffect(new PotionEffect(Potion.field_76444_x.id, 2400,99));
|
||||
if (!par3EntityPlayer.capabilities.isCreativeMode)
|
||||
{
|
||||
if (!EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed()))
|
||||
|
@ -157,9 +150,6 @@ public class SigilOfHaste extends EnergyItems implements ArmourUpgrade
|
|||
|
||||
if (par2World.getWorldTime() % 200 == par1ItemStack.stackTagCompound.getInteger("worldTimeDelay") && par1ItemStack.stackTagCompound.getBoolean("isActive"))
|
||||
{
|
||||
//par3EntityPlayer.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionBoost.id, 205, 1));
|
||||
|
||||
//par3EntityPlayer.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionProjProt.id, 205, 2));
|
||||
if (!par3EntityPlayer.capabilities.isCreativeMode)
|
||||
{
|
||||
if (!EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed()))
|
||||
|
@ -179,20 +169,18 @@ public class SigilOfHaste extends EnergyItems implements ArmourUpgrade
|
|||
itemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
player.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionBoost.id, 3, 1,true));
|
||||
player.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionBoost.id, 3, 1, true));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isUpgrade()
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getEnergyForTenSeconds()
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return 150;
|
||||
}
|
||||
}
|
|
@ -1,8 +1,11 @@
|
|||
package WayofTime.alchemicalWizardry.common.items.sigil;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.ModItems;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IHolding;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
@ -13,12 +16,9 @@ import net.minecraft.nbt.NBTTagList;
|
|||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.Constants;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.ModItems;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.IHolding;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class SigilOfHolding extends EnergyItems
|
||||
{
|
||||
|
@ -30,7 +30,6 @@ public class SigilOfHolding extends EnergyItems
|
|||
{
|
||||
super();
|
||||
this.maxStackSize = 1;
|
||||
//setEnergyUsed(100);
|
||||
setCreativeTab(AlchemicalWizardry.tabBloodMagic);
|
||||
}
|
||||
|
||||
|
@ -72,7 +71,6 @@ public class SigilOfHolding extends EnergyItems
|
|||
if (!(par1ItemStack.stackTagCompound == null))
|
||||
{
|
||||
par3List.add("Current owner: " + par1ItemStack.stackTagCompound.getString("ownerName"));
|
||||
// par3List.add("Current slot: " + par1ItemStack.stackTagCompound.getInteger("selectedSlot"));
|
||||
ItemStack[] inv = getInternalInventory(par1ItemStack);
|
||||
|
||||
if (inv == null)
|
||||
|
@ -101,8 +99,6 @@ public class SigilOfHolding extends EnergyItems
|
|||
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)
|
||||
{
|
||||
//TODO Might be a good idea to have this item need to be in the player's first slot
|
||||
//for it to search and consume sigils on right click. Might avoid confusion? At least
|
||||
//will avoid the need to add a button just for it...
|
||||
this.checkAndSetItemOwner(par1ItemStack, par3EntityPlayer);
|
||||
|
||||
if (par3EntityPlayer.isSneaking())
|
||||
|
@ -306,13 +302,13 @@ public class SigilOfHolding extends EnergyItems
|
|||
return false;
|
||||
}
|
||||
|
||||
if(addedItemStack.getItem() instanceof IHolding)
|
||||
if (addedItemStack.getItem() instanceof IHolding)
|
||||
{
|
||||
inv[candidateSlot] = addedItemStack;
|
||||
inv[candidateSlot] = addedItemStack;
|
||||
saveInternalInventory(sigilItemStack, inv);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
for (ItemStack i : allowedSigils)
|
||||
{
|
||||
if (i != null && i.getItem() == item)
|
||||
|
@ -335,7 +331,6 @@ public class SigilOfHolding extends EnergyItems
|
|||
if (this.hasAddedToInventory(sigilItemStack, playerInventory[i]))
|
||||
{
|
||||
player.inventory.consumeInventoryItem(playerInventory[i].getItem());
|
||||
//playerInventory[i].stackSize--;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
package WayofTime.alchemicalWizardry.common.items.sigil;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.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.IIconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
|
@ -11,11 +14,8 @@ import net.minecraft.nbt.NBTTagCompound;
|
|||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class SigilOfMagnetism extends EnergyItems implements ArmourUpgrade
|
||||
{
|
||||
|
@ -27,17 +27,14 @@ public class SigilOfMagnetism extends EnergyItems implements ArmourUpgrade
|
|||
{
|
||||
super();
|
||||
this.maxStackSize = 1;
|
||||
//setMaxDamage(1000);
|
||||
setEnergyUsed(50);
|
||||
setCreativeTab(AlchemicalWizardry.tabBloodMagic);
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4)
|
||||
{
|
||||
par3List.add("I have a very magnetic personality!");
|
||||
// par3List.add("you have a green slate?");
|
||||
|
||||
if (!(par1ItemStack.stackTagCompound == null))
|
||||
{
|
||||
|
@ -94,23 +91,6 @@ public class SigilOfMagnetism extends EnergyItems implements ArmourUpgrade
|
|||
}
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, int par5, int par6, int par7, float par8, float par9, float par10)
|
||||
// {
|
||||
// EnergyItems.checkAndSetItemOwner(par1ItemStack, par2EntityPlayer);
|
||||
// if(applyBonemeal(par1ItemStack,par3World,par4,par5,par6,par2EntityPlayer))
|
||||
// {
|
||||
// if (par3World.isRemote)
|
||||
// {
|
||||
// par3World.playAuxSFX(2005, par4, par5, par6, 0);
|
||||
// EnergyItems.syphonBatteries(par1ItemStack, par2EntityPlayer, getEnergyUsed());
|
||||
// return true;
|
||||
// }
|
||||
// return true;
|
||||
// }
|
||||
// return false;
|
||||
// }
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)
|
||||
{
|
||||
|
@ -209,14 +189,12 @@ public class SigilOfMagnetism extends EnergyItems implements ArmourUpgrade
|
|||
@Override
|
||||
public boolean isUpgrade()
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getEnergyForTenSeconds()
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return 25;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,12 @@
|
|||
package WayofTime.alchemicalWizardry.common.items.sigil;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.ModBlocks;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TESpectralBlock;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
@ -11,13 +16,8 @@ import net.minecraft.nbt.NBTTagCompound;
|
|||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.ModBlocks;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
|
||||
import WayofTime.alchemicalWizardry.common.tileEntity.TESpectralBlock;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class SigilOfTheBridge extends EnergyItems implements ArmourUpgrade
|
||||
{
|
||||
|
@ -29,10 +29,8 @@ public class SigilOfTheBridge extends EnergyItems implements ArmourUpgrade
|
|||
{
|
||||
super();
|
||||
this.maxStackSize = 1;
|
||||
//setMaxDamage(1000);
|
||||
setEnergyUsed(100);
|
||||
setCreativeTab(AlchemicalWizardry.tabBloodMagic);
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -96,23 +94,6 @@ public class SigilOfTheBridge extends EnergyItems implements ArmourUpgrade
|
|||
}
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, int par5, int par6, int par7, float par8, float par9, float par10)
|
||||
// {
|
||||
//
|
||||
// if(applyBonemeal(par1ItemStack,par3World,par4,par5,par6,par2EntityPlayer))
|
||||
// {
|
||||
// if (par3World.isRemote)
|
||||
// {
|
||||
// par3World.playAuxSFX(2005, par4, par5, par6, 0);
|
||||
// EnergyItems.syphonBatteries(par1ItemStack, par2EntityPlayer, getEnergyUsed());
|
||||
// return true;
|
||||
// }
|
||||
// return true;
|
||||
// }
|
||||
// return false;
|
||||
// }
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)
|
||||
{
|
||||
|
@ -170,11 +151,6 @@ public class SigilOfTheBridge extends EnergyItems implements ArmourUpgrade
|
|||
EnergyItems.syphonBatteries(par1ItemStack, (EntityPlayer) par3Entity, this.getLPUsed(par1ItemStack));
|
||||
this.setLPUsed(par1ItemStack, 0);
|
||||
}
|
||||
|
||||
// if(par2World.isRemote)
|
||||
// {
|
||||
// return;
|
||||
// }
|
||||
if (!par3EntityPlayer.onGround && !par3EntityPlayer.isSneaking())
|
||||
{
|
||||
return;
|
||||
|
@ -202,31 +178,30 @@ public class SigilOfTheBridge extends EnergyItems implements ArmourUpgrade
|
|||
{
|
||||
for (int iz = posZ - range; iz <= posZ + range; iz++)
|
||||
{
|
||||
//for(int iy=posY-verticalRange;iy<=posY+verticalRange;iy++)
|
||||
{
|
||||
Block block = par2World.getBlock(ix, posY + verticalOffset, iz);
|
||||
|
||||
|
||||
if (par2World.isAirBlock(ix, posY + verticalOffset, iz))
|
||||
{
|
||||
par2World.setBlock(ix, posY + verticalOffset, iz, ModBlocks.spectralBlock, 0, 3);
|
||||
|
||||
|
||||
TileEntity tile = par2World.getTileEntity(ix, posY + verticalOffset, iz);
|
||||
if(tile instanceof TESpectralBlock)
|
||||
{
|
||||
((TESpectralBlock) tile).setDuration(100);
|
||||
}
|
||||
if (tile instanceof TESpectralBlock)
|
||||
{
|
||||
((TESpectralBlock) tile).setDuration(100);
|
||||
}
|
||||
|
||||
if (par2World.rand.nextInt(2) == 0)
|
||||
{
|
||||
incremented++;
|
||||
}
|
||||
}else if(block == ModBlocks.spectralBlock)
|
||||
} else if (block == ModBlocks.spectralBlock)
|
||||
{
|
||||
TileEntity tile = par2World.getTileEntity(ix, posY + verticalOffset, iz);
|
||||
if(tile instanceof TESpectralBlock)
|
||||
{
|
||||
((TESpectralBlock) tile).setDuration(100);
|
||||
}
|
||||
TileEntity tile = par2World.getTileEntity(ix, posY + verticalOffset, iz);
|
||||
if (tile instanceof TESpectralBlock)
|
||||
{
|
||||
((TESpectralBlock) tile).setDuration(100);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -287,33 +262,27 @@ public class SigilOfTheBridge extends EnergyItems implements ArmourUpgrade
|
|||
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;
|
||||
|
||||
for (int ix = posX - range; ix <= posX + range; ix++)
|
||||
{
|
||||
for (int iz = posZ - range; iz <= posZ + range; iz++)
|
||||
{
|
||||
//for(int iy=posY-verticalRange;iy<=posY+verticalRange;iy++)
|
||||
Block block = world.getBlock(ix, posY + verticalOffset, iz);
|
||||
|
||||
if (world.isAirBlock(ix, posY + verticalOffset, iz))
|
||||
{
|
||||
Block block = world.getBlock(ix, posY + verticalOffset, iz);
|
||||
|
||||
if (world.isAirBlock(ix, posY + verticalOffset, iz))
|
||||
world.setBlock(ix, posY + verticalOffset, iz, ModBlocks.spectralBlock, 0, 3);
|
||||
|
||||
TileEntity tile = world.getTileEntity(ix, posY + verticalOffset, iz);
|
||||
if (tile instanceof TESpectralBlock)
|
||||
{
|
||||
world.setBlock(ix, posY + verticalOffset, iz, ModBlocks.spectralBlock, 0, 3);
|
||||
|
||||
TileEntity tile = world.getTileEntity(ix, posY + verticalOffset, iz);
|
||||
if(tile instanceof TESpectralBlock)
|
||||
{
|
||||
((TESpectralBlock) tile).setDuration(100);
|
||||
}
|
||||
}else if(block == ModBlocks.spectralBlock)
|
||||
((TESpectralBlock) tile).setDuration(100);
|
||||
}
|
||||
} else if (block == ModBlocks.spectralBlock)
|
||||
{
|
||||
TileEntity tile = world.getTileEntity(ix, posY + verticalOffset, iz);
|
||||
if (tile instanceof TESpectralBlock)
|
||||
{
|
||||
TileEntity tile = world.getTileEntity(ix, posY + verticalOffset, iz);
|
||||
if(tile instanceof TESpectralBlock)
|
||||
{
|
||||
((TESpectralBlock) tile).setDuration(100);
|
||||
}
|
||||
((TESpectralBlock) tile).setDuration(100);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -323,14 +292,12 @@ public class SigilOfTheBridge extends EnergyItems implements ArmourUpgrade
|
|||
@Override
|
||||
public boolean isUpgrade()
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getEnergyForTenSeconds()
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return 100;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
package WayofTime.alchemicalWizardry.common.items.sigil;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.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.IIconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
@ -11,11 +14,8 @@ import net.minecraft.potion.Potion;
|
|||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class SigilOfTheFastMiner extends EnergyItems implements ArmourUpgrade
|
||||
{
|
||||
|
@ -28,7 +28,6 @@ public class SigilOfTheFastMiner extends EnergyItems implements ArmourUpgrade
|
|||
{
|
||||
super();
|
||||
this.maxStackSize = 1;
|
||||
//setMaxDamage(100);
|
||||
setEnergyUsed(100);
|
||||
setCreativeTab(AlchemicalWizardry.tabBloodMagic);
|
||||
}
|
||||
|
@ -116,9 +115,6 @@ public class SigilOfTheFastMiner extends EnergyItems implements ArmourUpgrade
|
|||
par1ItemStack.setItemDamage(1);
|
||||
tag.setInteger("worldTimeDelay", (int) (par2World.getWorldTime() - 1) % 200);
|
||||
par3EntityPlayer.addPotionEffect(new PotionEffect(Potion.digSpeed.id, 2, 1, true));
|
||||
|
||||
//Test with added health boost
|
||||
//par3EntityPlayer.addPotionEffect(new PotionEffect(Potion.field_76444_x.id, 2400,99));
|
||||
if (!par3EntityPlayer.capabilities.isCreativeMode)
|
||||
{
|
||||
if (!EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed()))
|
||||
|
@ -155,7 +151,6 @@ public class SigilOfTheFastMiner extends EnergyItems implements ArmourUpgrade
|
|||
|
||||
if (par2World.getWorldTime() % 200 == par1ItemStack.stackTagCompound.getInteger("worldTimeDelay") && par1ItemStack.stackTagCompound.getBoolean("isActive"))
|
||||
{
|
||||
//par3EntityPlayer.addPotionEffect(new PotionEffect(Potion.field_76444_x.id, 2400,99));
|
||||
if (!par3EntityPlayer.capabilities.isCreativeMode)
|
||||
{
|
||||
if (!EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed()))
|
||||
|
@ -181,14 +176,12 @@ public class SigilOfTheFastMiner extends EnergyItems implements ArmourUpgrade
|
|||
@Override
|
||||
public boolean isUpgrade()
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getEnergyForTenSeconds()
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return 50;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
package WayofTime.alchemicalWizardry.common.items.sigil;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.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.IIconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
@ -10,11 +13,8 @@ import net.minecraft.nbt.NBTTagCompound;
|
|||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class SigilOfWind extends EnergyItems implements ArmourUpgrade
|
||||
{
|
||||
|
@ -27,7 +27,6 @@ public class SigilOfWind extends EnergyItems implements ArmourUpgrade
|
|||
{
|
||||
super();
|
||||
this.maxStackSize = 1;
|
||||
//setMaxDamage(100);
|
||||
setEnergyUsed(250);
|
||||
setCreativeTab(AlchemicalWizardry.tabBloodMagic);
|
||||
}
|
||||
|
@ -115,10 +114,6 @@ public class SigilOfWind extends EnergyItems implements ArmourUpgrade
|
|||
par1ItemStack.setItemDamage(1);
|
||||
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));
|
||||
|
||||
//Test with added health boost
|
||||
//par3EntityPlayer.addPotionEffect(new PotionEffect(Potion.field_76444_x.id, 2400,99));
|
||||
if (!par3EntityPlayer.capabilities.isCreativeMode)
|
||||
{
|
||||
if (!EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed()))
|
||||
|
@ -155,9 +150,6 @@ public class SigilOfWind extends EnergyItems implements ArmourUpgrade
|
|||
|
||||
if (par2World.getWorldTime() % 200 == par1ItemStack.stackTagCompound.getInteger("worldTimeDelay") && par1ItemStack.stackTagCompound.getBoolean("isActive"))
|
||||
{
|
||||
//par3EntityPlayer.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionBoost.id, 205, 1));
|
||||
|
||||
//par3EntityPlayer.addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionProjProt.id, 205, 2));
|
||||
if (!par3EntityPlayer.capabilities.isCreativeMode)
|
||||
{
|
||||
if (!EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed()))
|
||||
|
@ -183,14 +175,12 @@ public class SigilOfWind extends EnergyItems implements ArmourUpgrade
|
|||
@Override
|
||||
public boolean isUpgrade()
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getEnergyForTenSeconds()
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return 150;
|
||||
}
|
||||
}
|
|
@ -1,12 +1,13 @@
|
|||
package WayofTime.alchemicalWizardry.common.items.sigil;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade;
|
||||
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.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemBucket;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
@ -15,15 +16,10 @@ import net.minecraft.world.World;
|
|||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraftforge.event.entity.player.FillBucketEvent;
|
||||
import net.minecraftforge.fluids.FluidRegistry;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.fluids.IFluidHandler;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.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 java.util.List;
|
||||
|
||||
public class VoidSigil extends ItemBucket implements ArmourUpgrade
|
||||
{
|
||||
|
@ -34,7 +30,6 @@ public class VoidSigil extends ItemBucket implements ArmourUpgrade
|
|||
{
|
||||
super(null);
|
||||
this.maxStackSize = 1;
|
||||
//setMaxDamage(1000);
|
||||
setEnergyUsed(50);
|
||||
isFull = 0;
|
||||
setCreativeTab(AlchemicalWizardry.tabBloodMagic);
|
||||
|
@ -116,24 +111,24 @@ public class VoidSigil extends ItemBucket implements ArmourUpgrade
|
|||
{
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
|
||||
TileEntity tile = par2World.getTileEntity(i, j, k);
|
||||
if(tile instanceof IFluidHandler)
|
||||
if (tile instanceof IFluidHandler)
|
||||
{
|
||||
FluidStack amount = ((IFluidHandler) tile).drain(ForgeDirection.getOrientation(movingobjectposition.sideHit), 1000, false);
|
||||
|
||||
if(amount != null && amount.amount > 0)
|
||||
{
|
||||
((IFluidHandler) tile).drain(ForgeDirection.getOrientation(movingobjectposition.sideHit), 1000, true);
|
||||
if (!par3EntityPlayer.capabilities.isCreativeMode)
|
||||
FluidStack amount = ((IFluidHandler) tile).drain(ForgeDirection.getOrientation(movingobjectposition.sideHit), 1000, false);
|
||||
|
||||
if (amount != null && amount.amount > 0)
|
||||
{
|
||||
((IFluidHandler) tile).drain(ForgeDirection.getOrientation(movingobjectposition.sideHit), 1000, true);
|
||||
if (!par3EntityPlayer.capabilities.isCreativeMode)
|
||||
{
|
||||
if (!EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed()))
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
if (this.isFull == 0)
|
||||
|
@ -173,23 +168,19 @@ public class VoidSigil extends ItemBucket implements ArmourUpgrade
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onArmourUpdate(World world, EntityPlayer player,
|
||||
ItemStack thisItemStack)
|
||||
public void onArmourUpdate(World world, EntityPlayer player, ItemStack thisItemStack)
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isUpgrade()
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getEnergyForTenSeconds()
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return 25;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
package WayofTime.alchemicalWizardry.common.items.sigil;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.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.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
@ -18,17 +21,11 @@ import net.minecraftforge.common.util.ForgeDirection;
|
|||
import net.minecraftforge.fluids.FluidRegistry;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.fluids.IFluidHandler;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade;
|
||||
import WayofTime.alchemicalWizardry.common.items.EnergyItems;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class WaterSigil extends ItemBucket implements ArmourUpgrade
|
||||
{
|
||||
/**
|
||||
* field for checking if the bucket has been filled.
|
||||
*/
|
||||
private Block isFull = Blocks.water;
|
||||
private int energyUsed;
|
||||
|
||||
|
@ -36,7 +33,6 @@ public class WaterSigil extends ItemBucket implements ArmourUpgrade
|
|||
{
|
||||
super(Blocks.water);
|
||||
this.maxStackSize = 1;
|
||||
//setMaxDamage(1000);
|
||||
setEnergyUsed(100);
|
||||
setCreativeTab(AlchemicalWizardry.tabBloodMagic);
|
||||
}
|
||||
|
@ -93,7 +89,6 @@ public class WaterSigil extends ItemBucket implements ArmourUpgrade
|
|||
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, false);
|
||||
|
||||
if (movingobjectposition == null)
|
||||
|
@ -111,27 +106,27 @@ public class WaterSigil extends ItemBucket implements ArmourUpgrade
|
|||
{
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
|
||||
TileEntity tile = par2World.getTileEntity(i, j, k);
|
||||
if(tile instanceof IFluidHandler)
|
||||
if (tile instanceof IFluidHandler)
|
||||
{
|
||||
FluidStack fluid = new FluidStack(FluidRegistry.WATER,1000);
|
||||
int amount = ((IFluidHandler) tile).fill(ForgeDirection.getOrientation(movingobjectposition.sideHit), fluid, false);
|
||||
|
||||
if(amount>0)
|
||||
{
|
||||
((IFluidHandler) tile).fill(ForgeDirection.getOrientation(movingobjectposition.sideHit), fluid, true);
|
||||
if (!par3EntityPlayer.capabilities.isCreativeMode)
|
||||
FluidStack fluid = new FluidStack(FluidRegistry.WATER, 1000);
|
||||
int amount = ((IFluidHandler) tile).fill(ForgeDirection.getOrientation(movingobjectposition.sideHit), fluid, false);
|
||||
|
||||
if (amount > 0)
|
||||
{
|
||||
((IFluidHandler) tile).fill(ForgeDirection.getOrientation(movingobjectposition.sideHit), fluid, true);
|
||||
if (!par3EntityPlayer.capabilities.isCreativeMode)
|
||||
{
|
||||
if (!EnergyItems.syphonBatteries(par1ItemStack, par3EntityPlayer, getEnergyUsed()))
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
|
||||
{
|
||||
if (movingobjectposition.sideHit == 0)
|
||||
{
|
||||
|
@ -226,60 +221,22 @@ public class WaterSigil extends ItemBucket implements ArmourUpgrade
|
|||
{
|
||||
return this.energyUsed;
|
||||
}
|
||||
//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)
|
||||
// {
|
||||
// if (world != null)
|
||||
// {
|
||||
// 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;
|
||||
// float f1 = f * 0.6F + 0.4F;
|
||||
// float f2 = f * f * 0.7F - 0.5F;
|
||||
// float f3 = f * f * 0.6F - 0.7F;
|
||||
//
|
||||
// for (int l = 0; l < 8; ++l)
|
||||
// {
|
||||
// world.spawnParticle("reddust", posX + Math.random() - Math.random(), posY + Math.random() - Math.random(), posZ + Math.random() - Math.random(), f1, f2, f3);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// for (int i = 0; i < damage; i++)
|
||||
// {
|
||||
// //player.setEntityHealth((player.getHealth()-1));
|
||||
// player.setEntityHealth(player.func_110143_aJ() - 1);
|
||||
// }
|
||||
//
|
||||
// if (player.func_110143_aJ() <= 0)
|
||||
// {
|
||||
// player.inventory.dropAllItems();
|
||||
// }
|
||||
// }
|
||||
|
||||
@Override
|
||||
public void onArmourUpdate(World world, EntityPlayer player,
|
||||
ItemStack thisItemStack)
|
||||
public void onArmourUpdate(World world, EntityPlayer player, ItemStack thisItemStack)
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
//PotionEffect effect = new PotionEffect(Potion.waterBreathing.id, 2,9);
|
||||
player.addPotionEffect(new PotionEffect(Potion.waterBreathing.id, 2, 9,true));
|
||||
player.addPotionEffect(new PotionEffect(Potion.waterBreathing.id, 2, 9, true));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isUpgrade()
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getEnergyForTenSeconds()
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return 50;
|
||||
}
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,33 +1,30 @@
|
|||
package WayofTime.alchemicalWizardry.common.items.thaumcraft;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.ModItems;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemArmor;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ISpecialArmor;
|
||||
import thaumcraft.api.IGoggles;
|
||||
import thaumcraft.api.IRepairable;
|
||||
import thaumcraft.api.IRunicArmor;
|
||||
import thaumcraft.api.IVisDiscountGear;
|
||||
import thaumcraft.api.ThaumcraftApi;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.nodes.IRevealer;
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import WayofTime.alchemicalWizardry.ModItems;
|
||||
import WayofTime.alchemicalWizardry.api.items.interfaces.ArmourUpgrade;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ItemSanguineArmour extends ItemArmor implements ArmourUpgrade, IGoggles, IVisDiscountGear, IRevealer, IRunicArmor, IRepairable
|
||||
{
|
||||
private static IIcon helmetIcon;
|
||||
private static IIcon helmetIcon;
|
||||
private static IIcon plateIcon;
|
||||
private static IIcon leggingsIcon;
|
||||
private static IIcon bootsIcon;
|
||||
|
@ -49,7 +46,7 @@ public class ItemSanguineArmour extends ItemArmor implements ArmourUpgrade, IGog
|
|||
this.leggingsIcon = iconRegister.registerIcon("AlchemicalWizardry:BoundLeggings");
|
||||
this.bootsIcon = iconRegister.registerIcon("AlchemicalWizardry:BoundBoots");
|
||||
}
|
||||
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIconFromDamage(int par1)
|
||||
{
|
||||
|
@ -83,7 +80,7 @@ public class ItemSanguineArmour extends ItemArmor implements ArmourUpgrade, IGog
|
|||
{
|
||||
return "alchemicalwizardry:models/armor/sanguineArmour_layer_1.png";
|
||||
}
|
||||
|
||||
|
||||
if (this == ModItems.sanguineRobe || this == ModItems.sanguineBoots)
|
||||
{
|
||||
return "alchemicalwizardry:models/armor/sanguineArmour_layer_1.png";
|
||||
|
@ -101,37 +98,37 @@ public class ItemSanguineArmour extends ItemArmor implements ArmourUpgrade, IGog
|
|||
@Override
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4)
|
||||
{
|
||||
int discount = 0;
|
||||
|
||||
switch(this.armorType)
|
||||
{
|
||||
case 0:
|
||||
discount = 6;
|
||||
break;
|
||||
case 1:
|
||||
discount = 3;
|
||||
break;
|
||||
case 2:
|
||||
discount = 3;
|
||||
break;
|
||||
case 3:
|
||||
discount = 2;
|
||||
break;
|
||||
}
|
||||
|
||||
switch(this.armorType)
|
||||
{
|
||||
case 0:
|
||||
par3List.add("A pair of goggles imbued with power");
|
||||
break;
|
||||
case 1:
|
||||
int discount = 0;
|
||||
|
||||
case 2:
|
||||
switch (this.armorType)
|
||||
{
|
||||
case 0:
|
||||
discount = 6;
|
||||
break;
|
||||
case 1:
|
||||
discount = 3;
|
||||
break;
|
||||
case 2:
|
||||
discount = 3;
|
||||
break;
|
||||
case 3:
|
||||
discount = 2;
|
||||
break;
|
||||
}
|
||||
|
||||
switch (this.armorType)
|
||||
{
|
||||
case 0:
|
||||
par3List.add("A pair of goggles imbued with power");
|
||||
break;
|
||||
case 1:
|
||||
|
||||
case 2:
|
||||
|
||||
case 3:
|
||||
par3List.add("Robes imbued with forbidden power");
|
||||
}
|
||||
|
||||
case 3:
|
||||
par3List.add("Robes imbued with forbidden power");
|
||||
}
|
||||
|
||||
par3List.add("Vis discount: " + discount + "%");
|
||||
}
|
||||
|
||||
|
@ -153,34 +150,38 @@ public class ItemSanguineArmour extends ItemArmor implements ArmourUpgrade, IGog
|
|||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean showNodes(ItemStack itemstack, EntityLivingBase player)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
public boolean showNodes(ItemStack itemstack, EntityLivingBase player)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getVisDiscount(ItemStack stack, EntityPlayer player, Aspect aspect)
|
||||
{
|
||||
switch(this.armorType)
|
||||
{
|
||||
case 0: return 7;
|
||||
case 1: return 3;
|
||||
case 2: return 2;
|
||||
case 3: return 2;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@Override
|
||||
public int getVisDiscount(ItemStack stack, EntityPlayer player, Aspect aspect)
|
||||
{
|
||||
switch (this.armorType)
|
||||
{
|
||||
case 0:
|
||||
return 7;
|
||||
case 1:
|
||||
return 3;
|
||||
case 2:
|
||||
return 2;
|
||||
case 3:
|
||||
return 2;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean showIngamePopups(ItemStack itemstack, EntityLivingBase player)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
public boolean showIngamePopups(ItemStack itemstack, EntityLivingBase player)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRunicCharge(ItemStack itemstack) {
|
||||
// TODO Auto-generated method stub
|
||||
return 0;
|
||||
}
|
||||
@Override
|
||||
public int getRunicCharge(ItemStack itemstack)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue