Package game

Examples of game.Tag


    }
  }

  @Override
  public Tag saveToNBT(Tag tag) {
    tag.addTag(new Tag(Tag.Type.TAG_String, "NAME", this.getName()));
    tag.addTag(new Tag(Tag.Type.TAG_Int, "WIDTH", this.getWidthInTiles()));
    tag.addTag(new Tag(Tag.Type.TAG_Int, "HEIGHT", this.getHeightInTiles()));
    tag.addTag(new Tag(Tag.Type.TAG_Byte_Array, "TILES", this
        .getTileIdArray()));
    // tag.addTag(new Tag(Tag.Type.TAG_Byte_Array, "META", this.meta));
    // tag.addTag(new Tag(Tag.Type.TAG_Byte_Array, "OVERLAY",
    // this.overlay));
    Tag ents = new Tag(Tag.Type.TAG_Compound, "ENTITIES",
        new Tag[] { new Tag(Tag.Type.TAG_Int, "dump", 0) });
    for (int i = 0; i < entities.size(); i++) {
      // Tag e = new Tag(Tag.Type.TAG_Compound, "ENTITY_" +
      // entities.get(i).getId(), new Tag[] {new Tag(Tag.Type.TAG_Int,
      // "dump", 0)});
      ents.addTag(EntityLoader.saveObject(entities.get(i)));
      // ents.addTag(e);
    }
    ents.addTag(new Tag(Tag.Type.TAG_End, null, null));
    tag.addTag(ents);
    tag.addTag(new Tag(Tag.Type.TAG_End, null, null));
    return tag;
  }
View Full Code Here


  }

  @Override
  public Tag saveToNBT(Tag tag) {
    super.saveToNBT(tag);
    tag.addTag(new Tag(Tag.Type.TAG_Int, "HEALTH", this.health));
    tag.addTag(new Tag(Tag.Type.TAG_Int, "MAX_HEALTH", this.maxHealth));
    tag.addTag(new Tag(Tag.Type.TAG_End, null, null));
    return tag;
  }
View Full Code Here

TOP

Related Classes of game.Tag

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.