예제 #1
0
  /** Called when the mob's health reaches 0. */
  public void onDeath(DamageSource par1DamageSource) {
    super.onDeath(par1DamageSource);

    if (par1DamageSource.getEntity() instanceof EntitySkeleton) {
      this.dropItem(Item.record13.shiftedIndex + this.rand.nextInt(10), 1);
    }
  }
  /** Called when the mob's health reaches 0. */
  public void onDeath(DamageSource par1DamageSource) {
    super.onDeath(par1DamageSource);

    if (par1DamageSource.getSourceOfDamage() instanceof EntityArrow
        && par1DamageSource.getEntity() instanceof EntityPlayer) {
      EntityPlayer var2 = (EntityPlayer) par1DamageSource.getEntity();
      double var3 = var2.posX - this.posX;
      double var5 = var2.posZ - this.posZ;

      if (var3 * var3 + var5 * var5 >= 2500.0D) {
        var2.triggerAchievement(AchievementList.snipeSkeleton);
      }
    }
  }
예제 #3
0
 public void onDeath(DamageSource damagesource) {
   super.onDeath(damagesource);
   if (damagesource.func_35532_a() instanceof EntitySkeleton) {
     dropItem(Item.record13.shiftedIndex + rand.nextInt(2), 1);
   }
 }