Merge pull request #263 from hilburn/master
Dagger of sacrifice cleanup
This commit is contained in:
commit
5fdad1dc0d
1 changed files with 9 additions and 83 deletions
|
@ -68,7 +68,7 @@ public class DaggerOfSacrifice extends EnergyItems
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (par2EntityLivingBase.isChild() || par2EntityLivingBase instanceof EntityWither || par2EntityLivingBase instanceof EntityDragon || par2EntityLivingBase instanceof EntityPlayer || par2EntityLivingBase instanceof IBossDisplayData)
|
if (par2EntityLivingBase.isChild() || par2EntityLivingBase instanceof EntityPlayer || par2EntityLivingBase instanceof IBossDisplayData)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -86,29 +86,13 @@ public class DaggerOfSacrifice extends EnergyItems
|
||||||
this.findAndNotifyAltarOfDemon(world, par2EntityLivingBase);
|
this.findAndNotifyAltarOfDemon(world, par2EntityLivingBase);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (par2EntityLivingBase instanceof EntityVillager && !par2EntityLivingBase.isChild())
|
int lifeEssence = 500;
|
||||||
{
|
if (par2EntityLivingBase instanceof EntityVillager) lifeEssence = 2000;
|
||||||
if (findAndFillAltar(par2EntityLivingBase.worldObj, par2EntityLivingBase, 2000))
|
else if (par2EntityLivingBase instanceof EntitySlime) lifeEssence = 150;
|
||||||
{
|
else if (par2EntityLivingBase instanceof EntityEnderman) lifeEssence = 200;
|
||||||
double posX = par2EntityLivingBase.posX;
|
else if (par2EntityLivingBase instanceof EntityAnimal) lifeEssence = 250;
|
||||||
double posY = par2EntityLivingBase.posY;
|
|
||||||
double posZ = par2EntityLivingBase.posZ;
|
|
||||||
|
|
||||||
|
if (findAndFillAltar(par2EntityLivingBase.worldObj, par2EntityLivingBase, lifeEssence))
|
||||||
for (int i = 0; i < 8; i++)
|
|
||||||
{
|
|
||||||
SpellHelper.sendIndexedParticleToAllAround(world, posX, posY, posZ, 20, world.provider.dimensionId, 1, posX, posY, posZ);
|
|
||||||
}
|
|
||||||
|
|
||||||
par2EntityLivingBase.setHealth(-1);
|
|
||||||
par2EntityLivingBase.onDeath(DamageSource.generic);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (par2EntityLivingBase instanceof EntitySlime && !par2EntityLivingBase.isChild())
|
|
||||||
{
|
|
||||||
if (findAndFillAltar(par2EntityLivingBase.worldObj, par2EntityLivingBase, 150))
|
|
||||||
{
|
{
|
||||||
double posX = par2EntityLivingBase.posX;
|
double posX = par2EntityLivingBase.posX;
|
||||||
double posY = par2EntityLivingBase.posY;
|
double posY = par2EntityLivingBase.posY;
|
||||||
|
@ -121,64 +105,6 @@ public class DaggerOfSacrifice extends EnergyItems
|
||||||
|
|
||||||
par2EntityLivingBase.setHealth(-1);
|
par2EntityLivingBase.setHealth(-1);
|
||||||
par2EntityLivingBase.onDeath(DamageSource.generic);
|
par2EntityLivingBase.onDeath(DamageSource.generic);
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (par2EntityLivingBase instanceof EntityEnderman && !par2EntityLivingBase.isChild())
|
|
||||||
{
|
|
||||||
if (findAndFillAltar(par2EntityLivingBase.worldObj, par2EntityLivingBase, 200))
|
|
||||||
{
|
|
||||||
double posX = par2EntityLivingBase.posX;
|
|
||||||
double posY = par2EntityLivingBase.posY;
|
|
||||||
double posZ = par2EntityLivingBase.posZ;
|
|
||||||
|
|
||||||
for (int i = 0; i < 8; i++)
|
|
||||||
{
|
|
||||||
SpellHelper.sendIndexedParticleToAllAround(world, posX, posY, posZ, 20, world.provider.dimensionId, 1, posX, posY, posZ);
|
|
||||||
}
|
|
||||||
|
|
||||||
par2EntityLivingBase.setHealth(-1);
|
|
||||||
par2EntityLivingBase.onDeath(DamageSource.generic);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (par2EntityLivingBase instanceof EntityAnimal && !par2EntityLivingBase.isChild())
|
|
||||||
{
|
|
||||||
if (findAndFillAltar(par2EntityLivingBase.worldObj, par2EntityLivingBase, 250))
|
|
||||||
{
|
|
||||||
double posX = par2EntityLivingBase.posX;
|
|
||||||
double posY = par2EntityLivingBase.posY;
|
|
||||||
double posZ = par2EntityLivingBase.posZ;
|
|
||||||
|
|
||||||
for (int i = 0; i < 8; i++)
|
|
||||||
{
|
|
||||||
SpellHelper.sendIndexedParticleToAllAround(world, posX, posY, posZ, 20, world.provider.dimensionId, 1, posX, posY, posZ);
|
|
||||||
}
|
|
||||||
|
|
||||||
par2EntityLivingBase.setHealth(-1);
|
|
||||||
par2EntityLivingBase.onDeath(DamageSource.generic);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (findAndFillAltar(par2EntityLivingBase.worldObj, par2EntityLivingBase, 500))
|
|
||||||
{
|
|
||||||
|
|
||||||
|
|
||||||
double posX = par2EntityLivingBase.posX;
|
|
||||||
double posY = par2EntityLivingBase.posY;
|
|
||||||
double posZ = par2EntityLivingBase.posZ;
|
|
||||||
|
|
||||||
for (int i = 0; i < 8; i++)
|
|
||||||
{
|
|
||||||
SpellHelper.sendIndexedParticleToAllAround(world, posX, posY, posZ, 20, world.provider.dimensionId, 1, posX, posY, posZ);
|
|
||||||
}
|
|
||||||
|
|
||||||
par2EntityLivingBase.setHealth(-1);
|
|
||||||
par2EntityLivingBase.onDeath(DamageSource.generic);
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue