Beispiel #1
0
  public OChunk a(OWorld oworld, int i, int j) {
    ONBTTagCompound onbttagcompound = null;
    OChunkCoordIntPair ochunkcoordintpair = new OChunkCoordIntPair(i, j);
    Object object = this.c;

    synchronized (this.c) {
      if (this.b.contains(ochunkcoordintpair)) {
        for (int k = 0; k < this.a.size(); ++k) {
          if (((OAnvilChunkLoaderPending) this.a.get(k)).a.equals(ochunkcoordintpair)) {
            onbttagcompound = ((OAnvilChunkLoaderPending) this.a.get(k)).b;
            break;
          }
        }
      }
    }

    if (onbttagcompound == null) {
      DataInputStream datainputstream = ORegionFileCache.b(this.d, i, j);

      if (datainputstream == null) {
        return null;
      }

      onbttagcompound = OCompressedStreamTools.a((DataInput) datainputstream);
    }

    return this.a(oworld, i, j, onbttagcompound);
  }
Beispiel #2
0
  private void a(OAnvilChunkLoaderPending oanvilchunkloaderpending) throws IOException {
    DataOutputStream dataoutputstream =
        ORegionFileCache.c(this.d, oanvilchunkloaderpending.a.a, oanvilchunkloaderpending.a.b);

    OCompressedStreamTools.a(oanvilchunkloaderpending.b, (DataOutput) dataoutputstream);
    dataoutputstream.close();
  }