Beispiel #1
0
  private static boolean SittingOcelot(World world, int x, int y, int z) {
    Iterator iterator =
        world
            .getEntitiesWithinAABB(
                EntityOcelot.class,
                AxisAlignedBB.getBoundingBox(
                    (double) x,
                    (double) (y + 1),
                    (double) z,
                    (double) (x + 1),
                    (double) (y + 2),
                    (double) (z + 1)))
            .iterator();
    EntityOcelot entityocelot;

    do {
      if (!iterator.hasNext()) {
        return false;
      }

      Entity entity = (Entity) iterator.next();
      entityocelot = (EntityOcelot) entity;
    } while (!entityocelot.isSitting());

    return true;
  }
  /**
   * Looks for a sitting ocelot within certain bounds. Such an ocelot is considered to be blocking
   * access to the chest.
   */
  public static boolean isOcelotBlockingChest(World par0World, int par1, int par2, int par3) {
    Iterator iterator =
        par0World
            .getEntitiesWithinAABB(
                EntityOcelot.class,
                AxisAlignedBB.getBoundingBox(
                    (double) par1,
                    (double) (par2 + 1),
                    (double) par3,
                    (double) (par1 + 1),
                    (double) (par2 + 2),
                    (double) (par3 + 1)))
            .iterator();
    EntityOcelot entityocelot;

    do {
      if (!iterator.hasNext()) {
        return false;
      }

      EntityOcelot entityocelot1 = (EntityOcelot) iterator.next();
      entityocelot = (EntityOcelot) entityocelot1;
    } while (!entityocelot.isSitting());

    return true;
  }
  public EntityOcelot func_70879_a(EntityAgeable p_70879_1_) {
    EntityOcelot var2 = new EntityOcelot(this.field_70170_p);
    if (this.func_70909_n()) {
      var2.func_70910_a(this.func_70905_p());
      var2.func_70903_f(true);
      var2.func_70912_b(this.func_70913_u());
    }

    return var2;
  }
 public void func_82163_bD() {
   if (this.field_70170_p.field_73012_v.nextInt(7) == 0) {
     for (int var1 = 0; var1 < 2; ++var1) {
       EntityOcelot var2 = new EntityOcelot(this.field_70170_p);
       var2.func_70012_b(
           this.field_70165_t, this.field_70163_u, this.field_70161_v, this.field_70177_z, 0.0F);
       var2.func_70873_a(-24000);
       this.field_70170_p.func_72838_d(var2);
     }
   }
 }
 public boolean func_70878_b(EntityAnimal p_70878_1_) {
   if (p_70878_1_ == this) {
     return false;
   } else if (!this.func_70909_n()) {
     return false;
   } else if (!(p_70878_1_ instanceof EntityOcelot)) {
     return false;
   } else {
     EntityOcelot var2 = (EntityOcelot) p_70878_1_;
     return !var2.func_70909_n() ? false : this.func_70880_s() && var2.func_70880_s();
   }
 }
  @SuppressWarnings("rawtypes")
  public static boolean isOcelotBlockingChest(World par0World, int par1, int par2, int par3) {
    final Iterator var4 =
        par0World
            .getEntitiesWithinAABB(
                EntityOcelot.class,
                AxisAlignedBB.getBoundingBox(par1, par2 + 1, par3, par1 + 1, par2 + 2, par3 + 1))
            .iterator();
    EntityOcelot var6;

    do {
      if (!var4.hasNext()) {
        return false;
      }

      var6 = (EntityOcelot) var4.next();
    } while (!var6.isSitting());

    return true;
  }