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
|
|
@ -35,7 +35,7 @@ import MysticWorld.MysticWorld;
|
||||||
|
|
||||||
public class EntityChargeAir extends Entity {
|
public class EntityChargeAir extends Entity {
|
||||||
|
|
||||||
public EntityLiving shootingEntity;
|
public EntityPlayer shootingEntity;
|
||||||
public EntityPlayer entityPlayer;
|
public EntityPlayer entityPlayer;
|
||||||
public EntityDragon entityDragon;
|
public EntityDragon entityDragon;
|
||||||
public EntityWither entityWither;
|
public EntityWither entityWither;
|
||||||
|
|
@ -52,16 +52,16 @@ public class EntityChargeAir extends Entity {
|
||||||
super(par1World);
|
super(par1World);
|
||||||
}
|
}
|
||||||
|
|
||||||
public EntityChargeAir(World par1World, EntityLiving par2EntityLiving)
|
public EntityChargeAir(World par1World, EntityPlayer par2EntityPlayer)
|
||||||
{
|
{
|
||||||
super(par1World);
|
super(par1World);
|
||||||
this.setSize(0.25F, 0.25F);
|
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.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.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.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.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()
|
public void onUpdate()
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ import net.minecraftforge.common.ForgeHooks;
|
||||||
|
|
||||||
public class EntityChargeEarth extends Entity {
|
public class EntityChargeEarth extends Entity {
|
||||||
|
|
||||||
public EntityLiving shootingEntity;
|
public EntityPlayer shootingEntity;
|
||||||
public EntityPlayer entityPlayer;
|
public EntityPlayer entityPlayer;
|
||||||
public EntityDragon entityDragon;
|
public EntityDragon entityDragon;
|
||||||
public EntityWither entityWither;
|
public EntityWither entityWither;
|
||||||
|
|
@ -52,16 +52,16 @@ public class EntityChargeEarth extends Entity {
|
||||||
super(par1World);
|
super(par1World);
|
||||||
}
|
}
|
||||||
|
|
||||||
public EntityChargeEarth(World par1World, EntityLiving par2EntityLiving)
|
public EntityChargeEarth(World par1World, EntityPlayer par2EntityPlayer)
|
||||||
{
|
{
|
||||||
super(par1World);
|
super(par1World);
|
||||||
this.setSize(0.25F, 0.25F);
|
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.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.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.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.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()
|
public void onUpdate()
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ import net.minecraft.world.World;
|
||||||
|
|
||||||
public class EntityChargeEnergy extends Entity {
|
public class EntityChargeEnergy extends Entity {
|
||||||
|
|
||||||
public EntityLiving shootingEntity;
|
public EntityPlayer shootingEntity;
|
||||||
private boolean inGround = false;
|
private boolean inGround = false;
|
||||||
private int xTile = -1;
|
private int xTile = -1;
|
||||||
private int yTile = -1;
|
private int yTile = -1;
|
||||||
|
|
@ -42,16 +42,16 @@ public class EntityChargeEnergy extends Entity {
|
||||||
super(par1World);
|
super(par1World);
|
||||||
}
|
}
|
||||||
|
|
||||||
public EntityChargeEnergy(World par1World, EntityLiving par2EntityLiving)
|
public EntityChargeEnergy(World par1World, EntityPlayer par2EntityPlayer)
|
||||||
{
|
{
|
||||||
super(par1World);
|
super(par1World);
|
||||||
this.setSize(0.25F, 0.25F);
|
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.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.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.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.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()
|
public void onUpdate()
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ import net.minecraft.world.World;
|
||||||
|
|
||||||
public class EntityChargeFire extends Entity {
|
public class EntityChargeFire extends Entity {
|
||||||
|
|
||||||
public EntityLiving shootingEntity;
|
public EntityPlayer shootingEntity;
|
||||||
private boolean inGround = false;
|
private boolean inGround = false;
|
||||||
private int xTile = -1;
|
private int xTile = -1;
|
||||||
private int yTile = -1;
|
private int yTile = -1;
|
||||||
|
|
@ -41,16 +41,16 @@ public class EntityChargeFire extends Entity {
|
||||||
super(par1World);
|
super(par1World);
|
||||||
}
|
}
|
||||||
|
|
||||||
public EntityChargeFire(World par1World, EntityLiving par2EntityLiving)
|
public EntityChargeFire(World par1World, EntityPlayer par2EntityPlayer)
|
||||||
{
|
{
|
||||||
super(par1World);
|
super(par1World);
|
||||||
this.setSize(0.25F, 0.25F);
|
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.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.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.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.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()
|
public void onUpdate()
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ import net.minecraft.world.World;
|
||||||
|
|
||||||
public class EntityChargeWater extends Entity {
|
public class EntityChargeWater extends Entity {
|
||||||
|
|
||||||
public EntityLiving shootingEntity;
|
public EntityPlayer shootingEntity;
|
||||||
private boolean inGround = false;
|
private boolean inGround = false;
|
||||||
private int xTile = -1;
|
private int xTile = -1;
|
||||||
private int yTile = -1;
|
private int yTile = -1;
|
||||||
|
|
@ -41,16 +41,16 @@ public class EntityChargeWater extends Entity {
|
||||||
super(par1World);
|
super(par1World);
|
||||||
}
|
}
|
||||||
|
|
||||||
public EntityChargeWater(World par1World, EntityLiving par2EntityLiving)
|
public EntityChargeWater(World par1World, EntityPlayer par2EntityPlayer)
|
||||||
{
|
{
|
||||||
super(par1World);
|
super(par1World);
|
||||||
this.setSize(0.25F, 0.25F);
|
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.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.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.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.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()
|
public void onUpdate()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue