Anti-comments sweep!

This commit is contained in:
Tombenpotter 2014-10-13 22:33:20 +02:00
parent e6a10f3f06
commit dea1f87078
454 changed files with 23594 additions and 26739 deletions

View file

@ -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;
}
}