Ejemplo n.º 1
0
 @Override
 public void b(ONBTTagCompound paramONBTTagCompound) {
   paramONBTTagCompound.a("Health", (short) X);
   paramONBTTagCompound.a("HurtTime", (short) Z);
   paramONBTTagCompound.a("DeathTime", (short) ac);
   paramONBTTagCompound.a("AttackTime", (short) ad);
 }
Ejemplo n.º 2
0
 @Override
 public void a(ONBTTagCompound paramONBTTagCompound) {
   paramONBTTagCompound.a("Health", (short) W);
   paramONBTTagCompound.a("HurtTime", (short) Y);
   paramONBTTagCompound.a("DeathTime", (short) ab);
   paramONBTTagCompound.a("AttackTime", (short) ac);
 }
Ejemplo n.º 3
0
  public void b(ONBTTagCompound onbttagcompound) {
    onbttagcompound.a("xTile", (short) this.c);
    onbttagcompound.a("yTile", (short) this.d);
    onbttagcompound.a("zTile", (short) this.e);
    onbttagcompound.a("inTile", (byte) this.f);
    onbttagcompound.a("shake", (byte) this.b);
    onbttagcompound.a("inGround", (byte) (this.a ? 1 : 0));
    if ((this.h == null || this.h.length() == 0)
        && this.g != null
        && this.g instanceof OEntityPlayer) {
      this.h = this.g.am();
    }

    onbttagcompound.a("ownerName", this.h == null ? "" : this.h);
  }
Ejemplo n.º 4
0
  protected OChunk a(OWorld oworld, int i, int j, ONBTTagCompound onbttagcompound) {
    if (!onbttagcompound.c("Level")) {
      System.out.println("Chunk file at " + i + "," + j + " is missing level data, skipping");
      return null;
    } else if (!onbttagcompound.m("Level").c("Sections")) {
      System.out.println("Chunk file at " + i + "," + j + " is missing block data, skipping");
      return null;
    } else {
      OChunk ochunk = this.a(oworld, onbttagcompound.m("Level"));

      if (!ochunk.a(i, j)) {
        System.out.println(
            "Chunk file at "
                + i
                + ","
                + j
                + " is in the wrong location; relocating. (Expected "
                + i
                + ", "
                + j
                + ", got "
                + ochunk.g
                + ", "
                + ochunk.h
                + ")");
        onbttagcompound.a("xPos", i);
        onbttagcompound.a("zPos", j);
        ochunk = this.a(oworld, onbttagcompound.m("Level"));
      }

      ochunk.i();
      return ochunk;
    }
  }
Ejemplo n.º 5
0
  public void a(OWorld oworld, OChunk ochunk) {
    oworld.m();

    try {
      ONBTTagCompound onbttagcompound = new ONBTTagCompound();
      ONBTTagCompound onbttagcompound1 = new ONBTTagCompound();

      onbttagcompound.a("Level", (ONBTBase) onbttagcompound1);
      this.a(ochunk, oworld, onbttagcompound1);
      this.a(ochunk.k(), onbttagcompound);
    } catch (Exception exception) {
      exception.printStackTrace();
    }
  }
Ejemplo n.º 6
0
  private void a(OChunk ochunk, OWorld oworld, ONBTTagCompound onbttagcompound) {
    oworld.m();
    onbttagcompound.a("xPos", ochunk.g);
    onbttagcompound.a("zPos", ochunk.h);
    onbttagcompound.a("LastUpdate", oworld.o());
    onbttagcompound.a("HeightMap", ochunk.f);
    onbttagcompound.a("TerrainPopulated", ochunk.k);
    OExtendedBlockStorage[] aoextendedblockstorage = ochunk.h();
    ONBTTagList onbttaglist = new ONBTTagList("Sections");
    OExtendedBlockStorage[] aoextendedblockstorage1 = aoextendedblockstorage;
    int i = aoextendedblockstorage.length;

    ONBTTagCompound onbttagcompound1;

    for (int j = 0; j < i; ++j) {
      OExtendedBlockStorage oextendedblockstorage = aoextendedblockstorage1[j];

      if (oextendedblockstorage != null && oextendedblockstorage.f() != 0) {
        onbttagcompound1 = new ONBTTagCompound();
        onbttagcompound1.a("Y", (byte) (oextendedblockstorage.c() >> 4 & 255));
        onbttagcompound1.a("Blocks", oextendedblockstorage.g());
        if (oextendedblockstorage.h() != null) {
          onbttagcompound1.a("Add", oextendedblockstorage.h().a);
        }

        onbttagcompound1.a("Data", oextendedblockstorage.i().a);
        onbttagcompound1.a("SkyLight", oextendedblockstorage.k().a);
        onbttagcompound1.a("BlockLight", oextendedblockstorage.j().a);
        onbttaglist.a((ONBTBase) onbttagcompound1);
      }
    }

    onbttagcompound.a("Sections", (ONBTBase) onbttaglist);
    onbttagcompound.a("Biomes", ochunk.l());
    ochunk.m = false;
    ONBTTagList onbttaglist1 = new ONBTTagList();

    Iterator iterator;

    for (i = 0; i < ochunk.j.length; ++i) {
      iterator = ochunk.j[i].iterator();

      while (iterator.hasNext()) {
        OEntity oentity = (OEntity) iterator.next();

        ochunk.m = true;
        onbttagcompound1 = new ONBTTagCompound();
        if (oentity.c(onbttagcompound1)) {
          onbttaglist1.a((ONBTBase) onbttagcompound1);
        }
      }
    }

    onbttagcompound.a("Entities", (ONBTBase) onbttaglist1);
    ONBTTagList onbttaglist2 = new ONBTTagList();

    iterator = ochunk.i.values().iterator();

    while (iterator.hasNext()) {
      OTileEntity otileentity = (OTileEntity) iterator.next();

      onbttagcompound1 = new ONBTTagCompound();
      otileentity.b(onbttagcompound1);
      onbttaglist2.a((ONBTBase) onbttagcompound1);
    }

    onbttagcompound.a("TileEntities", (ONBTBase) onbttaglist2);
    List list = oworld.a(ochunk, false);

    if (list != null) {
      long k = oworld.o();
      ONBTTagList onbttaglist3 = new ONBTTagList();
      Iterator iterator1 = list.iterator();

      while (iterator1.hasNext()) {
        ONextTickListEntry onextticklistentry = (ONextTickListEntry) iterator1.next();
        ONBTTagCompound onbttagcompound2 = new ONBTTagCompound();

        onbttagcompound2.a("i", onextticklistentry.d);
        onbttagcompound2.a("x", onextticklistentry.a);
        onbttagcompound2.a("y", onextticklistentry.b);
        onbttagcompound2.a("z", onextticklistentry.c);
        onbttagcompound2.a("t", (int) (onextticklistentry.e - k));
        onbttaglist3.a((ONBTBase) onbttagcompound2);
      }

      onbttagcompound.a("TileTicks", (ONBTBase) onbttaglist3);
    }
  }
Ejemplo n.º 7
0
 @Override
 public void b(ONBTTagCompound var1) {
   super.b(var1);
   var1.a("playerGameType", this.c.a());
 }