public void func_73241_b(int p_73241_1_, int p_73241_2_) {
   if (this.field_73251_h.field_73011_w.func_76567_e()) {
     ChunkCoordinates var3 = this.field_73251_h.func_72861_E();
     int var4 = p_73241_1_ * 16 + 8 - var3.field_71574_a;
     int var5 = p_73241_2_ * 16 + 8 - var3.field_71573_c;
     short var6 = 128;
     if (var4 < -var6 || var4 > var6 || var5 < -var6 || var5 > var6) {
       this.field_73248_b.add(
           Long.valueOf(ChunkCoordIntPair.func_77272_a(p_73241_1_, p_73241_2_)));
     }
   } else {
     this.field_73248_b.add(Long.valueOf(ChunkCoordIntPair.func_77272_a(p_73241_1_, p_73241_2_)));
   }
 }
  public boolean add(Object var1) {
    if (!(var1 instanceof NextTickListEntry)) {
      return false;
    } else {
      NextTickListEntry var2 = (NextTickListEntry) var1;
      if (var2 == null) {
        return false;
      } else {
        long var3 =
            ChunkCoordIntPair.func_77272_a(var2.field_77183_a >> 4, var2.field_77182_c >> 4);
        HashSet var5 = (HashSet) this.longHashMap.func_76164_a(var3);
        if (var5 == null) {
          var5 = new HashSet();
          this.longHashMap.func_76163_a(var3, var5);
        }

        boolean var6 = var5.add(var2);
        if (var6) {
          ++this.size;
        }

        return var6;
      }
    }
  }
示例#3
0
  public Chunk loadChunk(int var1, int var2) {
    long var3 = ChunkCoordIntPair.chunkXZ2Int(var1, var2);
    this.droppedChunksSet.remove(var3);
    Chunk var5 = (Chunk) this.chunkMap.func_35578_a(var3);
    if (var5 == null) {
      int var6 = 1875004;
      if (var1 < -var6 || var2 < -var6 || var1 >= var6 || var2 >= var6) {
        return this.field_28064_b;
      }

      var5 = this.loadChunkFromFile(var1, var2);
      if (var5 == null) {
        if (this.chunkProvider == null) {
          var5 = this.field_28064_b;
        } else {
          var5 = this.chunkProvider.provideChunk(var1, var2);
        }
      }

      this.chunkMap.func_35577_a(var3, var5);
      this.chunkList.add(var5);
      if (var5 != null) {
        var5.func_4143_d();
        var5.onChunkLoad();
      }

      var5.func_35843_a(this, this, var1, var2);
    }

    return var5;
  }
  public Chunk func_73158_c(int p_73158_1_, int p_73158_2_) {
    long var3 = ChunkCoordIntPair.func_77272_a(p_73158_1_, p_73158_2_);
    this.field_73248_b.remove(Long.valueOf(var3));
    Chunk var5 = (Chunk) this.field_73244_f.func_76164_a(var3);
    if (var5 == null) {
      var5 = this.func_73239_e(p_73158_1_, p_73158_2_);
      if (var5 == null) {
        if (this.field_73246_d == null) {
          var5 = this.field_73249_c;
        } else {
          var5 = this.field_73246_d.func_73154_d(p_73158_1_, p_73158_2_);
        }
      }

      this.field_73244_f.func_76163_a(var3, var5);
      this.field_73245_g.add(var5);
      if (var5 != null) {
        var5.func_76631_c();
      }

      var5.func_76624_a(this, this, p_73158_1_, p_73158_2_);
    }

    return var5;
  }
  public Iterator getNextTickEntries(int var1, int var2) {
    long var3 = ChunkCoordIntPair.func_77272_a(var1, var2);
    HashSet var5 = (HashSet) this.longHashMap.func_76164_a(var3);
    if (var5 == null) {
      var5 = this.emptySet;
    }

    return var5.iterator();
  }
示例#6
0
 public void func_35391_d(int var1, int var2) {
   ChunkCoordinates var3 = this.worldObj.getSpawnPoint();
   int var4 = var1 * 16 + 8 - var3.posX;
   int var5 = var2 * 16 + 8 - var3.posZ;
   short var6 = 128;
   if (var4 < -var6 || var4 > var6 || var5 < -var6 || var5 > var6) {
     this.droppedChunksSet.add(ChunkCoordIntPair.chunkXZ2Int(var1, var2)); // Spout
   }
 }
 public Chunk func_73154_d(int p_73154_1_, int p_73154_2_) {
   Chunk var3 =
       (Chunk)
           this.field_73244_f.func_76164_a(ChunkCoordIntPair.func_77272_a(p_73154_1_, p_73154_2_));
   return var3 == null
       ? (!this.field_73251_h.field_72987_B && !this.field_73250_a
           ? this.field_73249_c
           : this.func_73158_c(p_73154_1_, p_73154_2_))
       : var3;
 }
 public boolean contains(Object var1) {
   if (!(var1 instanceof NextTickListEntry)) {
     return false;
   } else {
     NextTickListEntry var2 = (NextTickListEntry) var1;
     if (var2 == null) {
       return false;
     } else {
       long var3 =
           ChunkCoordIntPair.func_77272_a(var2.field_77183_a >> 4, var2.field_77182_c >> 4);
       HashSet var5 = (HashSet) this.longHashMap.func_76164_a(var3);
       return var5 == null ? false : var5.contains(var2);
     }
   }
 }
示例#9
0
 public Chunk provideChunk(int var1, int var2) {
   Chunk var3 = (Chunk) this.chunkMap.func_35578_a(ChunkCoordIntPair.chunkXZ2Int(var1, var2));
   return var3 == null ? this.loadChunk(var1, var2) : var3;
 }
示例#10
0
 public boolean chunkExists(int var1, int var2) {
   return this.chunkMap.func_35575_b(ChunkCoordIntPair.chunkXZ2Int(var1, var2));
 }
示例#11
0
 public boolean func_73149_a(int p_73149_1_, int p_73149_2_) {
   return this.field_73244_f.func_76161_b(ChunkCoordIntPair.func_77272_a(p_73149_1_, p_73149_2_));
 }