Esempio n. 1
0
 /** Called when the entity is attacked. */
 public boolean attackEntityFrom(DamageSource p_70097_1_, float p_70097_2_) {
   if (this.isEntityInvulnerable()) {
     return false;
   } else if ("fireball".equals(p_70097_1_.getDamageType())
       && p_70097_1_.getEntity() instanceof EntityPlayer) {
     super.attackEntityFrom(p_70097_1_, 1000.0F);
     ((EntityPlayer) p_70097_1_.getEntity()).triggerAchievement(AchievementList.ghast);
     return true;
   } else {
     return super.attackEntityFrom(p_70097_1_, p_70097_2_);
   }
 }
Esempio n. 2
0
 /** Called when the entity is attacked. */
 public boolean attackEntityFrom(DamageSource par1DamageSource, int par2) {
   if (this.isEntityInvulnerable()) {
     return false;
   } else if ("fireball".equals(par1DamageSource.getDamageType())
       && par1DamageSource.getEntity() instanceof EntityPlayer) {
     super.attackEntityFrom(par1DamageSource, 1000);
     ((EntityPlayer) par1DamageSource.getEntity()).triggerAchievement(AchievementList.ghast);
     return true;
   } else {
     return super.attackEntityFrom(par1DamageSource, par2);
   }
 }