Changed shooting entity from EntityLiving to EntityPlayer

This commit is contained in:
allstar69 2013-07-07 01:25:26 -07:00
commit 891b4e2623
5 changed files with 20 additions and 20 deletions

View file

@ -27,7 +27,7 @@ import net.minecraft.world.World;
public class EntityChargeWater extends Entity {
public EntityLiving shootingEntity;
public EntityPlayer shootingEntity;
private boolean inGround = false;
private int xTile = -1;
private int yTile = -1;
@ -41,16 +41,16 @@ public class EntityChargeWater extends Entity {
super(par1World);
}
public EntityChargeWater(World par1World, EntityLiving par2EntityLiving)
public EntityChargeWater(World par1World, EntityPlayer par2EntityPlayer)
{
super(par1World);
this.setSize(0.25F, 0.25F);
this.setLocationAndAngles(par2EntityLiving.posX, par2EntityLiving.posY + (double)par2EntityLiving.getEyeHeight(), par2EntityLiving.posZ, par2EntityLiving.rotationYaw, par2EntityLiving.rotationPitch);
this.setLocationAndAngles(par2EntityPlayer.posX, par2EntityPlayer.posY + (double)par2EntityPlayer.getEyeHeight(), par2EntityPlayer.posZ, par2EntityPlayer.rotationYaw, par2EntityPlayer.rotationPitch);
this.setPosition(this.posX, this.posY, this.posZ);
this.motionX = (double)(-MathHelper.sin(this.rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float)Math.PI));
this.motionY = (double)(-MathHelper.sin((this.rotationPitch) / 180.0F * (float)Math.PI));
this.motionZ = (double)(MathHelper.cos(this.rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float)Math.PI));
this.shootingEntity = par2EntityLiving;
this.shootingEntity = par2EntityPlayer;
}
public void onUpdate()