Anti-comments sweep!
This commit is contained in:
parent
e6a10f3f06
commit
dea1f87078
454 changed files with 23594 additions and 26739 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue