Changed shooting entity from EntityLiving to EntityPlayer
This commit is contained in:
parent
1860655e8b
commit
891b4e2623
5 changed files with 20 additions and 20 deletions
|
|
@ -27,7 +27,7 @@ import net.minecraft.world.World;
|
|||
|
||||
public class EntityChargeFire 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 EntityChargeFire extends Entity {
|
|||
super(par1World);
|
||||
}
|
||||
|
||||
public EntityChargeFire(World par1World, EntityLiving par2EntityLiving)
|
||||
public EntityChargeFire(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()
|
||||
|
|
|
|||
Loading…
Reference in a new issue