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,8 +1,8 @@
package WayofTime.alchemicalWizardry.common.entity.projectile;
import java.util.Iterator;
import java.util.List;
import cpw.mods.fml.common.registry.IThrowableEntity;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
@ -11,15 +11,11 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.DamageSource;
import net.minecraft.util.MathHelper;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.util.Vec3;
import net.minecraft.util.*;
import net.minecraft.world.World;
import cpw.mods.fml.common.registry.IThrowableEntity;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import java.util.Iterator;
import java.util.List;
//Shamelessly ripped off from x3n0ph0b3
public class EnergyBlastProjectile extends Entity implements IProjectile, IThrowableEntity
@ -252,8 +248,6 @@ public class EnergyBlastProjectile extends Entity implements IProjectile, IThrow
if (var18.equals(Block.getBlockById(inTile)) && var19 == inData)
{
// this.groundImpact();
// this.setDead();
}
} else
{
@ -261,7 +255,6 @@ public class EnergyBlastProjectile extends Entity implements IProjectile, IThrow
if (ticksInAir > 1 && ticksInAir < 3)
{
//worldObj.spawnParticle("flame", posX + smallGauss(0.1D), posY + smallGauss(0.1D), posZ + smallGauss(0.1D), 0D, 0D, 0D);
for (int particles = 0; particles < 3; particles++)
{
this.doFiringParticles();
@ -328,7 +321,6 @@ public class EnergyBlastProjectile extends Entity implements IProjectile, IThrow
posZ += motionZ;
MathHelper.sqrt_double(motionX * motionX + motionZ * motionZ);
this.setPosition(posX, posY, posZ);
//this.doBlockCollisions();
}
}
@ -457,12 +449,10 @@ public class EnergyBlastProjectile extends Entity implements IProjectile, IThrow
this.setDead();
} else
{
//doDamage(8 + d6(), mop);
if (mop instanceof EntityLivingBase)
{
((EntityLivingBase) mop).addPotionEffect(new PotionEffect(Potion.weakness.id, 60, 2));
}
doDamage(projectileDamage, mop);
worldObj.createExplosion(shootingEntity, this.posX, this.posY, this.posZ, (float) (0.1), true);
}
@ -509,18 +499,18 @@ public class EnergyBlastProjectile extends Entity implements IProjectile, IThrow
return 0;
}
@Override
public Entity getThrower()
{
// TODO Auto-generated method stub
return this.shootingEntity;
}
@Override
public Entity getThrower()
{
// TODO Auto-generated method stub
return this.shootingEntity;
}
@Override
public void setThrower(Entity entity)
{
if(entity instanceof EntityLivingBase)
this.shootingEntity = (EntityLivingBase)entity;
}
@Override
public void setThrower(Entity entity)
{
if (entity instanceof EntityLivingBase)
this.shootingEntity = (EntityLivingBase) entity;
}
}

View file

@ -6,11 +6,11 @@ import net.minecraft.world.World;
public class EntityBeamParticle extends EntityFX
{
protected EntityBeamParticle(World p_i1218_1_, double p_i1218_2_,
double p_i1218_4_, double p_i1218_6_)
{
super(p_i1218_1_, p_i1218_2_, p_i1218_4_, p_i1218_6_);
// TODO Auto-generated constructor stub
}
protected EntityBeamParticle(World p_i1218_1_, double p_i1218_2_,
double p_i1218_4_, double p_i1218_6_)
{
super(p_i1218_1_, p_i1218_2_, p_i1218_4_, p_i1218_6_);
// TODO Auto-generated constructor stub
}
}

View file

@ -1,13 +1,12 @@
package WayofTime.alchemicalWizardry.common.entity.projectile;
import WayofTime.alchemicalWizardry.ModBlocks;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.init.Blocks;
import net.minecraft.potion.Potion;
import net.minecraft.util.DamageSource;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.world.World;
import WayofTime.alchemicalWizardry.ModBlocks;
public class EntityBloodLightProjectile extends EnergyBlastProjectile
@ -90,8 +89,6 @@ public class EntityBloodLightProjectile extends EnergyBlastProjectile
{
this.worldObj.setBlock(blockX + 1, blockY, blockZ, ModBlocks.blockBloodLight);
}
//worldObj.createExplosion(this, this.posX, this.posY, this.posZ, (float)(0.1), true);
}
this.setDead();
@ -106,18 +103,11 @@ public class EntityBloodLightProjectile extends EnergyBlastProjectile
this.setDead();
} else
{
//doDamage(8 + d6(), mop);
if (mop instanceof EntityLivingBase)
{
//((EntityLivingBase)mop).addPotionEffect(new PotionEffect(Potion.weakness.id, 60,2));
((EntityLivingBase) mop).setRevengeTarget(shootingEntity);
doDamage(1, mop);
}
//worldObj.createExplosion(this, this.posX, this.posY, this.posZ, (float)(0.1), true);
}
if (worldObj.isAirBlock((int) this.posX, (int) this.posY, (int) this.posZ))

View file

@ -68,7 +68,6 @@ public class EntityEnergyBazookaMainProjectile extends EnergyBlastProjectile
this.setDead();
} else
{
//doDamage(8 + d6(), mop);
if (mop instanceof EntityLivingBase)
{
spawnSecondaryProjectiles();

View file

@ -195,8 +195,6 @@ public class EntityEnergyBazookaSecondaryProjectile extends EnergyBlastProjectil
if (var18.equals(Block.getBlockById(inTile)) && var19 == inData)
{
// this.groundImpact();
// this.setDead();
}
} else
{
@ -204,7 +202,6 @@ public class EntityEnergyBazookaSecondaryProjectile extends EnergyBlastProjectil
if (ticksInAir > 1 && ticksInAir < 3)
{
//worldObj.spawnParticle("flame", posX + smallGauss(0.1D), posY + smallGauss(0.1D), posZ + smallGauss(0.1D), 0D, 0D, 0D);
for (int particles = 0; particles < 3; particles++)
{
this.doFiringParticles();
@ -271,7 +268,6 @@ public class EntityEnergyBazookaSecondaryProjectile extends EnergyBlastProjectil
posZ += motionZ;
MathHelper.sqrt_double(motionX * motionX + motionZ * motionZ);
this.setPosition(posX, posY, posZ);
//this.doBlockCollisions();
}
}

View file

@ -1,16 +1,16 @@
package WayofTime.alchemicalWizardry.common.entity.projectile;
import WayofTime.alchemicalWizardry.common.summoning.meteor.MeteorRegistry;
import net.minecraft.entity.Entity;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.DamageSource;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.world.World;
import WayofTime.alchemicalWizardry.common.summoning.meteor.MeteorRegistry;
public class EntityMeteor extends EnergyBlastProjectile
{
private int meteorID;
public boolean hasTerrae;
public boolean hasOrbisTerrae;
public boolean hasCrystallos;
@ -28,12 +28,12 @@ public class EntityMeteor extends EnergyBlastProjectile
super(par1World, par2, par4, par6);
this.meteorID = meteorID;
}
@Override
public void writeEntityToNBT(NBTTagCompound par1NBTTagCompound)
{
super.writeEntityToNBT(par1NBTTagCompound);
par1NBTTagCompound.setInteger("meteorID", meteorID);
par1NBTTagCompound.setBoolean("hasTerrae", hasTerrae);
par1NBTTagCompound.setBoolean("hasOrbisTerrae", hasOrbisTerrae);
@ -46,7 +46,7 @@ public class EntityMeteor extends EnergyBlastProjectile
public void readEntityFromNBT(NBTTagCompound par1NBTTagCompound)
{
super.readEntityFromNBT(par1NBTTagCompound);
meteorID = par1NBTTagCompound.getInteger("meteorID");
hasTerrae = par1NBTTagCompound.getBoolean("hasTerrae");
hasOrbisTerrae = par1NBTTagCompound.getBoolean("hasOrbisTerrae");
@ -83,7 +83,7 @@ public class EntityMeteor extends EnergyBlastProjectile
@Override
public void onImpact(Entity mop)
{
MeteorRegistry.createMeteorImpact(worldObj, (int) this.posX, (int) this.posY, (int) this.posZ, meteorID, new boolean[]{hasTerrae, hasOrbisTerrae, hasCrystallos, hasIncendium, hasTennebrae});
MeteorRegistry.createMeteorImpact(worldObj, (int) this.posX, (int) this.posY, (int) this.posZ, meteorID, new boolean[]{hasTerrae, hasOrbisTerrae, hasCrystallos, hasIncendium, hasTennebrae});
this.setDead();
}

View file

@ -1,5 +1,9 @@
package WayofTime.alchemicalWizardry.common.entity.projectile;
import cpw.mods.fml.client.FMLClientHandler;
import cpw.mods.fml.common.registry.IThrowableEntity;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.particle.EntityCloudFX;
import net.minecraft.client.particle.EntityFX;
import net.minecraft.entity.Entity;
@ -9,10 +13,6 @@ import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.DamageSource;
import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
import cpw.mods.fml.client.FMLClientHandler;
import cpw.mods.fml.common.registry.IThrowableEntity;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
//Shamelessly ripped off from x3n0ph0b3
public class EntityParticleBeam extends Entity implements IProjectile, IThrowableEntity
@ -205,31 +205,29 @@ public class EntityParticleBeam extends Entity implements IProjectile, IThrowabl
posZ += motionZ;
MathHelper.sqrt_double(motionX * motionX + motionZ * motionZ);
this.setPosition(posX, posY, posZ);
this.doFiringParticles();
if(Math.pow(posX - xDest, 2) + Math.pow(posY - yDest, 2) + Math.pow(posZ - zDest, 2) <= 1)
if (Math.pow(posX - xDest, 2) + Math.pow(posY - yDest, 2) + Math.pow(posZ - zDest, 2) <= 1)
{
this.scheduledForDeath = true;
this.scheduledForDeath = true;
}
if(this.scheduledForDeath)
if (this.scheduledForDeath)
{
this.setDead();
this.setDead();
}
}
public void doFiringParticles()
{
if(!worldObj.isRemote)
{
return;
}
//worldObj.spawnParticle("mobSpellAmbient", posX + smallGauss(0.1D), posY + smallGauss(0.1D), posZ + smallGauss(0.1D), 0.5D, 0.5D, 0.5D);
EntityFX particle = new EntityCloudFX(worldObj, posX, posY, posZ, 0, 0, 0);
particle.setRBGColorF(colourRed + 0.15f * (worldObj.rand.nextFloat() - worldObj.rand.nextFloat()), colourGreen + 0.15f * (worldObj.rand.nextFloat() - worldObj.rand.nextFloat()), colourBlue + 0.15f * (worldObj.rand.nextFloat() - worldObj.rand.nextFloat()));
FMLClientHandler.instance().getClient().effectRenderer.addEffect(particle);
//worldObj.spawnParticle("happyVillager", posX, posY, posZ, 0, 0, 0);
if (!worldObj.isRemote)
{
return;
}
EntityFX particle = new EntityCloudFX(worldObj, posX, posY, posZ, 0, 0, 0);
particle.setRBGColorF(colourRed + 0.15f * (worldObj.rand.nextFloat() - worldObj.rand.nextFloat()), colourGreen + 0.15f * (worldObj.rand.nextFloat() - worldObj.rand.nextFloat()), colourBlue + 0.15f * (worldObj.rand.nextFloat() - worldObj.rand.nextFloat()));
FMLClientHandler.instance().getClient().effectRenderer.addEffect(particle);
}
/**
@ -319,32 +317,32 @@ public class EntityParticleBeam extends Entity implements IProjectile, IThrowabl
return 0;
}
@Override
public Entity getThrower()
{
// TODO Auto-generated method stub
return this.shootingEntity;
}
@Override
public Entity getThrower()
{
// TODO Auto-generated method stub
return this.shootingEntity;
}
@Override
public void setThrower(Entity entity)
{
if(entity instanceof EntityLivingBase)
this.shootingEntity = (EntityLivingBase)entity;
}
public void setColour(float red, float green, float blue)
{
this.colourRed = red;
this.colourGreen = green;
this.colourBlue = blue;
}
public void setDestination(int xDest, int yDest, int zDest)
{
this.xDest = xDest;
this.yDest = yDest;
this.zDest = zDest;
}
@Override
public void setThrower(Entity entity)
{
if (entity instanceof EntityLivingBase)
this.shootingEntity = (EntityLivingBase) entity;
}
public void setColour(float red, float green, float blue)
{
this.colourRed = red;
this.colourGreen = green;
this.colourBlue = blue;
}
public void setDestination(int xDest, int yDest, int zDest)
{
this.xDest = xDest;
this.yDest = yDest;
this.zDest = zDest;
}
}

View file

@ -50,22 +50,8 @@ public class ExplosionProjectile extends EnergyBlastProjectile
}
worldObj.createExplosion(this, this.posX, this.posY, this.posZ, (float) (2), causesEnvDamage);
//this.onImpact(mop.entityHit);
} else if (mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK)
{
// for(int i=-1;i<=1;i++)
// {
// for(int j=-1;j<=1;j++)
// {
// for(int k=-1;k<=1;k++)
// {
// if(worldObj.isAirBlock((int)this.posX+i, (int)this.posY+j, (int)this.posZ+k))
// {
// worldObj.setBlock( (int)this.posX+i, (int)this.posY+j, (int)this.posZ+k,Block.fire.blockID);
// }
// }
// }
// }
worldObj.createExplosion(this, this.posX, this.posY, this.posZ, (float) (2), causesEnvDamage);
}
@ -81,12 +67,8 @@ public class ExplosionProjectile extends EnergyBlastProjectile
this.setDead();
} else
{
//doDamage(8 + d6(), mop);
if (mop instanceof EntityLivingBase)
{
//((EntityLivingBase)mop).addPotionEffect(new PotionEffect(Potion.weakness.id, 60,2));
//((EntityLivingBase)mop).setFire(50);
//((EntityLivingBase)mop).setRevengeTarget(shootingEntity);
if (((EntityLivingBase) mop).isImmuneToFire())
{
doDamage((int) (projectileDamage), mop);
@ -95,13 +77,10 @@ public class ExplosionProjectile extends EnergyBlastProjectile
doDamage(projectileDamage, mop);
}
}
//worldObj.createExplosion(this, this.posX, this.posY, this.posZ, (float)(0.1), true);
}
if (worldObj.isAirBlock((int) this.posX, (int) this.posY, (int) this.posZ))
{
//worldObj.setBlock((int)this.posX, (int)this.posY, (int)this.posZ,Block.fire.blockID);
}
spawnHitParticles("magicCrit", 8);

View file

@ -1,6 +1,5 @@
package WayofTime.alchemicalWizardry.common.entity.projectile;
import net.minecraft.block.Block;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.init.Blocks;
@ -68,8 +67,6 @@ public class FireProjectile extends EnergyBlastProjectile
}
}
}
//worldObj.createExplosion(this, this.posX, this.posY, this.posZ, (float)(0.1), true);
}
this.setDead();
@ -84,10 +81,8 @@ public class FireProjectile extends EnergyBlastProjectile
this.setDead();
} else
{
//doDamage(8 + d6(), mop);
if (mop instanceof EntityLivingBase)
{
//((EntityLivingBase)mop).addPotionEffect(new PotionEffect(Potion.weakness.id, 60,2));
((EntityLivingBase) mop).setFire(50);
((EntityLivingBase) mop).setRevengeTarget(shootingEntity);
@ -100,8 +95,6 @@ public class FireProjectile extends EnergyBlastProjectile
((EntityLivingBase) mop).hurtResistantTime = 0;
}
}
//worldObj.createExplosion(this, this.posX, this.posY, this.posZ, (float)(0.1), true);
}
if (worldObj.isAirBlock((int) this.posX, (int) this.posY, (int) this.posZ))

View file

@ -1,12 +1,11 @@
package WayofTime.alchemicalWizardry.common.entity.projectile;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.util.DamageSource;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.world.World;
import WayofTime.alchemicalWizardry.common.PacketHandler;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
public class HolyProjectile extends EnergyBlastProjectile
{
@ -54,19 +53,6 @@ public class HolyProjectile extends EnergyBlastProjectile
this.onImpact(mop.entityHit);
} else if (mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK)
{
// for(int i=-1;i<=1;i++)
// {
// for(int j=-1;j<=1;j++)
// {
// for(int k=-1;k<=1;k++)
// {
// if(worldObj.isAirBlock((int)this.posX+i, (int)this.posY+j, (int)this.posZ+k))
// {
// worldObj.setBlock( (int)this.posX+i, (int)this.posY+j, (int)this.posZ+k,Block.fire.blockID);
// }
// }
// }
// }
}
this.setDead();
@ -81,12 +67,8 @@ public class HolyProjectile extends EnergyBlastProjectile
this.setDead();
} else
{
//doDamage(8 + d6(), mop);
if (mop instanceof EntityLivingBase)
{
//((EntityLivingBase)mop).addPotionEffect(new PotionEffect(Potion.weakness.id, 60,2));
//((EntityLivingBase)mop).setFire(50);
//((EntityLivingBase)mop).setRevengeTarget(shootingEntity);
if (((EntityLivingBase) mop).isEntityUndead())
{
doDamage((int) (projectileDamage * 2), mop);
@ -95,13 +77,10 @@ public class HolyProjectile extends EnergyBlastProjectile
doDamage(projectileDamage, mop);
}
}
//worldObj.createExplosion(this, this.posX, this.posY, this.posZ, (float)(0.1), true);
}
if (worldObj.isAirBlock((int) this.posX, (int) this.posY, (int) this.posZ))
{
//worldObj.setBlock((int)this.posX, (int)this.posY, (int)this.posZ,Block.fire.blockID);
}
spawnHitParticles("magicCrit", 8);

View file

@ -1,5 +1,7 @@
package WayofTime.alchemicalWizardry.common.entity.projectile;
import WayofTime.alchemicalWizardry.common.entity.mob.EntityIceDemon;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.potion.Potion;
@ -7,9 +9,6 @@ import net.minecraft.potion.PotionEffect;
import net.minecraft.util.DamageSource;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.world.World;
import WayofTime.alchemicalWizardry.common.PacketHandler;
import WayofTime.alchemicalWizardry.common.entity.mob.EntityIceDemon;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
public class IceProjectile extends EnergyBlastProjectile
{
@ -57,22 +56,7 @@ public class IceProjectile extends EnergyBlastProjectile
this.onImpact(mop.entityHit);
} else if (mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK)
{
// for(int i=-1;i<=1;i++)
// {
// for(int j=-1;j<=1;j++)
// {
// for(int k=-1;k<=1;k++)
// {
// if(worldObj.isAirBlock((int)this.posX+i, (int)this.posY+j, (int)this.posZ+k))
// {
// worldObj.setBlock( (int)this.posX+i, (int)this.posY+j, (int)this.posZ+k,Block.fire.blockID);
// }
// }
// }
// }
//worldObj.createExplosion(this, this.posX, this.posY, this.posZ, (float)(0.1), true);
}
this.setDead();
}
@ -85,12 +69,8 @@ public class IceProjectile extends EnergyBlastProjectile
this.setDead();
} else
{
//doDamage(8 + d6(), mop);
if (mop instanceof EntityLivingBase)
{
//((EntityLivingBase)mop).addPotionEffect(new PotionEffect(Potion.weakness.id, 60,2));
//((EntityLivingBase)mop).setFire(50);
//((EntityLivingBase)mop).setRevengeTarget(shootingEntity);
if (((EntityLivingBase) mop).isImmuneToFire())
{
doDamage((int) (projectileDamage * 2), mop);
@ -101,8 +81,6 @@ public class IceProjectile extends EnergyBlastProjectile
((EntityLivingBase) mop).addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 100, 1));
}
}
//worldObj.createExplosion(this, this.posX, this.posY, this.posZ, (float)(0.1), true);
}
if (worldObj.isAirBlock((int) this.posX, (int) this.posY, (int) this.posZ))

View file

@ -1,5 +1,6 @@
package WayofTime.alchemicalWizardry.common.entity.projectile;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.effect.EntityLightningBolt;
@ -7,7 +8,6 @@ import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.DamageSource;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.world.World;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
public class LightningBoltProjectile extends EnergyBlastProjectile
{
@ -68,23 +68,11 @@ public class LightningBoltProjectile extends EnergyBlastProjectile
{
if (mop == shootingEntity && ticksInAir > 3)
{
//shootingEntity.attackEntityFrom(DamageSource.causePlayerDamage(shootingEntity), 1);
this.setDead();
} else
{
//doDamage(8 + d6(), mop);
if (mop instanceof EntityLivingBase)
{
//((EntityLivingBase)mop).addPotionEffect(new PotionEffect(Potion.weakness.id, 60,2));
//((EntityLivingBase)mop).setFire(50);
//((EntityLivingBase)mop).setRevengeTarget(shootingEntity);
// if(((EntityLivingBase)mop).isEntityUndead())
// {
// doDamage((int)(projectileDamage*2),mop);
// }else
// {
// doDamage(projectileDamage, mop);
// }
if (causeLightning)
{
this.worldObj.addWeatherEffect(new EntityLightningBolt(this.worldObj, ((EntityLivingBase) mop).posX, ((EntityLivingBase) mop).posY, ((EntityLivingBase) mop).posZ));
@ -92,11 +80,7 @@ public class LightningBoltProjectile extends EnergyBlastProjectile
{
doDamage(projectileDamage, mop);
}
//((EntityLivingBase)mop).setVelocity(this.motionX*2, ((EntityLivingBase)mop).motionY+1.5, this.motionZ*2);
}
//worldObj.createExplosion(this, this.posX, this.posY, this.posZ, (float)(0.1), true);
}
spawnHitParticles("magicCrit", 8);

View file

@ -1,5 +1,6 @@
package WayofTime.alchemicalWizardry.common.entity.projectile;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.nbt.NBTTagCompound;
@ -8,8 +9,6 @@ import net.minecraft.potion.PotionEffect;
import net.minecraft.util.DamageSource;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.world.World;
import WayofTime.alchemicalWizardry.common.PacketHandler;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
public class MudProjectile extends EnergyBlastProjectile
{
@ -72,23 +71,11 @@ public class MudProjectile extends EnergyBlastProjectile
{
if (mop == shootingEntity && ticksInAir > 3)
{
//shootingEntity.attackEntityFrom(DamageSource.causePlayerDamage(shootingEntity), 1);
this.setDead();
} else
{
//doDamage(8 + d6(), mop);
if (mop instanceof EntityLivingBase)
{
//((EntityLivingBase)mop).addPotionEffect(new PotionEffect(Potion.weakness.id, 60,2));
//((EntityLivingBase)mop).setFire(50);
//((EntityLivingBase)mop).setRevengeTarget(shootingEntity);
// if(((EntityLivingBase)mop).isEntityUndead())
// {
// doDamage((int)(projectileDamage*2),mop);
// }else
// {
// doDamage(projectileDamage, mop);
// }
if (doesBlindness)
{
((EntityLivingBase) mop).addPotionEffect(new PotionEffect(Potion.blindness.id, 100, 0));
@ -96,12 +83,8 @@ public class MudProjectile extends EnergyBlastProjectile
{
((EntityLivingBase) mop).addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 100, 2));
}
doDamage(projectileDamage, mop);
//((EntityLivingBase)mop).setVelocity(this.motionX*2, ((EntityLivingBase)mop).motionY+1.5, this.motionZ*2);
}
//worldObj.createExplosion(this, this.posX, this.posY, this.posZ, (float)(0.1), true);
}
spawnHitParticles("magicCrit", 8);

View file

@ -1,5 +1,7 @@
package WayofTime.alchemicalWizardry.common.entity.projectile;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
import WayofTime.alchemicalWizardry.common.spell.simple.SpellTeleport;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayerMP;
@ -9,12 +11,10 @@ import net.minecraft.util.MovingObjectPosition;
import net.minecraft.world.World;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.entity.living.EnderTeleportEvent;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
import WayofTime.alchemicalWizardry.common.spell.simple.SpellTeleport;
public class TeleportProjectile extends EnergyBlastProjectile
{
private boolean isEntityTeleport; //True if the entity firing teleports on hit
private boolean isEntityTeleport;
public TeleportProjectile(World par1World)
{
@ -75,8 +75,7 @@ public class TeleportProjectile extends EnergyBlastProjectile
{
EntityPlayerMP entityplayermp = (EntityPlayerMP) shootingEntity;
if(entityplayermp.worldObj == this.worldObj)
//if (!entityplayermp.playerNetServerHandler.connectionClosed && entityplayermp.worldObj == this.worldObj)
if (entityplayermp.worldObj == this.worldObj)
{
EnderTeleportEvent event = new EnderTeleportEvent(entityplayermp, this.posX, this.posY, this.posZ, 5.0F);
@ -86,10 +85,7 @@ public class TeleportProjectile extends EnergyBlastProjectile
{
shootingEntity.mountEntity((Entity) null);
}
shootingEntity.setPositionAndUpdate(event.targetX, event.targetY, event.targetZ);
// this.getThrower().fallDistance = 0.0F;
// this.getThrower().attackEntityFrom(DamageSource.fall, event.attackDamage);
}
}
}
@ -104,34 +100,19 @@ public class TeleportProjectile extends EnergyBlastProjectile
{
if (mop == shootingEntity && ticksInAir > 3)
{
//shootingEntity.attackEntityFrom(DamageSource.causePlayerDamage(shootingEntity), 1);
this.setDead();
} else
{
//doDamage(8 + d6(), mop);
if (mop instanceof EntityLivingBase)
{
//((EntityLivingBase)mop).addPotionEffect(new PotionEffect(Potion.weakness.id, 60,2));
//((EntityLivingBase)mop).setFire(50);
//((EntityLivingBase)mop).setRevengeTarget(shootingEntity);
// if(((EntityLivingBase)mop).isEntityUndead())
// {
// doDamage((int)(projectileDamage*2),mop);
// }else
// {
// doDamage(projectileDamage, mop);
// }
if (isEntityTeleport)
{
if (shootingEntity != null && shootingEntity instanceof EntityPlayerMP)
{
EntityPlayerMP entityplayermp = (EntityPlayerMP) shootingEntity;
if(entityplayermp.worldObj == this.worldObj)
//if (!entityplayermp.playerNetServerHandler.connectionClosed && entityplayermp.worldObj == this.worldObj)
if (entityplayermp.worldObj == this.worldObj)
{
EnderTeleportEvent event = new EnderTeleportEvent(entityplayermp, this.posX, this.posY, this.posZ, 5.0F);
if (!MinecraftForge.EVENT_BUS.post(event))
{
if (shootingEntity.isRiding())
@ -140,42 +121,14 @@ public class TeleportProjectile extends EnergyBlastProjectile
}
shootingEntity.setPositionAndUpdate(event.targetX, event.targetY, event.targetZ);
// this.getThrower().fallDistance = 0.0F;
// this.getThrower().attackEntityFrom(DamageSource.fall, event.attackDamage);
}
}
}
} else
{
// int x = (int)this.posX + mop.worldObj.rand.nextInt(100) - mop.worldObj.rand.nextInt(100);
// int y = (int)this.posY + mop.worldObj.rand.nextInt(10) - mop.worldObj.rand.nextInt(10);
// int z = (int)this.posZ + mop.worldObj.rand.nextInt(100) - mop.worldObj.rand.nextInt(100);
//
// boolean bool = false;
// int i = 0;
//
// while(!bool&&i<100)
// {
// if(worldObj.isAirBlock(x, y, z)||worldObj.isAirBlock(x, y+1, z))
// {
// ((EntityLivingBase) mop).setPositionAndUpdate(x, y, z);
// bool=true;
// }else
// {
// x = (int)this.posX + mop.worldObj.rand.nextInt(100) - mop.worldObj.rand.nextInt(100);
// y = (int)this.posY + mop.worldObj.rand.nextInt(10) - mop.worldObj.rand.nextInt(10);
// z = (int)this.posZ + mop.worldObj.rand.nextInt(100) - mop.worldObj.rand.nextInt(100);
// i++;
// }
// }
SpellTeleport.teleportRandomly((EntityLivingBase) mop, 64);
}
//doDamage(projectileDamage, mop);
//((EntityLivingBase)mop).setVelocity(this.motionX*2, ((EntityLivingBase)mop).motionY+1.5, this.motionZ*2);
}
//worldObj.createExplosion(this, this.posX, this.posY, this.posZ, (float)(0.1), true);
}
spawnHitParticles("magicCrit", 8);

View file

@ -1,14 +1,13 @@
package WayofTime.alchemicalWizardry.common.entity.projectile;
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.potion.PotionEffect;
import net.minecraft.util.DamageSource;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.world.World;
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
import WayofTime.alchemicalWizardry.common.PacketHandler;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
public class WaterProjectile extends EnergyBlastProjectile
{
@ -61,23 +60,11 @@ public class WaterProjectile extends EnergyBlastProjectile
{
if (mop == shootingEntity && ticksInAir > 3)
{
//shootingEntity.attackEntityFrom(DamageSource.causePlayerDamage(shootingEntity), 1);
this.setDead();
} else
{
//doDamage(8 + d6(), mop);
if (mop instanceof EntityLivingBase)
{
//((EntityLivingBase)mop).addPotionEffect(new PotionEffect(Potion.weakness.id, 60,2));
//((EntityLivingBase)mop).setFire(50);
//((EntityLivingBase)mop).setRevengeTarget(shootingEntity);
// if(((EntityLivingBase)mop).isEntityUndead())
// {
// doDamage((int)(projectileDamage*2),mop);
// }else
// {
// doDamage(projectileDamage, mop);
// }
if (((EntityLivingBase) mop).isImmuneToFire())
{
doDamage(projectileDamage * 2, mop);
@ -87,11 +74,7 @@ public class WaterProjectile extends EnergyBlastProjectile
doDamage(projectileDamage, mop);
((EntityLivingBase) mop).addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionDrowning.id, 80, 0));
}
//((EntityLivingBase)mop).setVelocity(this.motionX*2, ((EntityLivingBase)mop).motionY+1.5, this.motionZ*2);
}
//worldObj.createExplosion(this, this.posX, this.posY, this.posZ, (float)(0.1), true);
}
spawnHitParticles("magicCrit", 8);

View file

@ -1,11 +1,11 @@
package WayofTime.alchemicalWizardry.common.entity.projectile;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.util.DamageSource;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.world.World;
import WayofTime.alchemicalWizardry.common.spell.complex.effect.SpellHelper;
public class WindGustProjectile extends EnergyBlastProjectile
{
@ -48,19 +48,6 @@ public class WindGustProjectile extends EnergyBlastProjectile
this.onImpact(mop.entityHit);
} else if (mop.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK)
{
// for(int i=-1;i<=1;i++)
// {
// for(int j=-1;j<=1;j++)
// {
// for(int k=-1;k<=1;k++)
// {
// if(worldObj.isAirBlock((int)this.posX+i, (int)this.posY+j, (int)this.posZ+k))
// {
// worldObj.setBlock( (int)this.posX+i, (int)this.posY+j, (int)this.posZ+k,Block.fire.blockID);
// }
// }
// }
// }
}
this.setDead();
@ -71,30 +58,15 @@ public class WindGustProjectile extends EnergyBlastProjectile
{
if (mop == shootingEntity && ticksInAir > 3)
{
//shootingEntity.attackEntityFrom(DamageSource.causePlayerDamage(shootingEntity), 1);
this.setDead();
} else
{
//doDamage(8 + d6(), mop);
if (mop instanceof EntityLivingBase)
{
//((EntityLivingBase)mop).addPotionEffect(new PotionEffect(Potion.weakness.id, 60,2));
//((EntityLivingBase)mop).setFire(50);
//((EntityLivingBase)mop).setRevengeTarget(shootingEntity);
// if(((EntityLivingBase)mop).isEntityUndead())
// {
// doDamage((int)(projectileDamage*2),mop);
// }else
// {
// doDamage(projectileDamage, mop);
// }
((EntityLivingBase) mop).motionX = this.motionX * 2;
((EntityLivingBase) mop).motionY = 1.5;
((EntityLivingBase) mop).motionZ = this.motionZ * 2;
//((EntityLivingBase)mop).setVelocity(this.motionX*2, ((EntityLivingBase)mop).motionY+1.5, this.motionZ*2);
}
//worldObj.createExplosion(this, this.posX, this.posY, this.posZ, (float)(0.1), true);
}
spawnHitParticles("magicCrit", 8);