private Entity closest(List list) {
    double d4 = 9000D;
    Entity ent = null;

    for (int i = 0; i < list.size(); i++) {
      Entity ent1 = (Entity) list.get(i);

      boolean okay = true;
      if (ent1 instanceof AM_EntityChopper) {
        okay = false;
      } else if (ent1 instanceof EntityWolf) {
        EntityWolf ew = (EntityWolf) ent1;
        okay = AutomatonUniversal.angrywolf(ew);
      }

      if (okay) {
        double d5 = ent1.getDistanceSq(posX, posY, posZ);
        if (d5 < d4) {
          d4 = d5;
          ent = ent1;
        }
      }
    }

    return ent;
  }
  void Dropper() {
    for (int j = 0; j < 20; j++) {
      double d = rand.nextGaussian() * 0.02D;
      double d1 = rand.nextGaussian() * 0.02D;
      double d2 = rand.nextGaussian() * 0.02D;
      worldObj.spawnParticle(
          "explode",
          (posX + (double) (rand.nextFloat() * width * 2.0F)) - (double) width,
          posY + (double) (rand.nextFloat() * height),
          (posZ + (double) (rand.nextFloat() * width * 2.0F)) - (double) width,
          d,
          d1,
          d2);
    }

    if (!AutomatonUniversal.otherWorld(worldObj)) {
      entityDropItem(new ItemStack(AutomatonLogger.biter + 256, 1, 0), 0.0F);
      setEntityDead();
    }
  }
 public void onDeath(DamageSource damagesource) {
   if (!AutomatonUniversal.otherWorld(worldObj)) {
     Dropper(); // a(field_34905_c > 0);
   }
   worldObj.setEntityState(this, (byte) 3);
 }