Examples of ByteTag


Examples of com.iCo6.util.nbt.ByteTag

            ArrayList tagList = new ArrayList<Tag>();

            for (int i = 0; i < stacks.length; ++i) {
                if (stacks[i] == null) continue;

                ByteTag count = new ByteTag("Count", (byte) stacks[i].getAmount());
                ByteTag slot = new ByteTag("Slot", (byte) i);
                ShortTag damage = new ShortTag("Damage", stacks[i].getDurability());
                ShortTag id = new ShortTag("id", (short) stacks[i].getTypeId());

                HashMap<String, Tag> tagMap = new HashMap<String, Tag>();
                tagMap.put("Count", count);
View Full Code Here

Examples of com.mojang.nbt.ByteTag

        level.put("Biomes", new ByteArrayTag("Biomes", biomes));
        level.put("HeightMap", new IntArrayTag("HeightMap", heightmap));
        level.put("LastUpdate", new LongTag("LastUpdate", 0));
        level.put("xPos", new IntTag("xPos", x));
        level.put("zPos", new IntTag("zPos", z));
        level.put("TerrainPopulated", new ByteTag("TerrainPopulated", (byte)1));

        CompoundTag root = new CompoundTag("");
        root.put("Level", level);
        return root;
    }
View Full Code Here

Examples of com.mojang.nbt.ByteTag

    }
   
    public Entity createFallingBlock(int x, int y, int z, int id, int data)
    {
        CompoundTag root = createEntityRoot(x, y, z, "FallingSand");
        root.put("Tile", new ByteTag("Tile", (byte)id));
        root.put("Data", new ByteTag("Data", (byte)data));
        root.put("Time", new ByteTag("Time", (byte)0));
        root.put("DropItem", new ByteTag("DropItem", (byte)0));
        root.put("HurtEntities", new ByteTag("HurtEntities", (byte)0));
        root.put("FallHurtMax", new IntTag("FallHurtMax", 0));
        root.put("FallHurtAmount", new FloatTag("FallHurtAmount", 0));
        return new EntityImpl(root);
    }
View Full Code Here

Examples of com.mojang.nbt.ByteTag

        CompoundTag root = createTileRoot(x, y, z, "Piston");
        root.put("blockId", new IntTag("blockId", id));
        root.put("blockData", new IntTag("blockData", data));
        root.put("facing", new IntTag("facing", 0));
        root.put("progress", new FloatTag("progress", -delay));
        root.put("extending", new ByteTag("extending", (byte)0));
        return new TileEntityImpl(root);
    }
View Full Code Here

Examples of com.mojang.nbt.ByteTag

        root.put("Rotation", rotation);

        root.put("FallDistance", new FloatTag("FallDistance", 0));
        root.put("Fire", new ShortTag("Fire", (short)0));
        root.put("Air", new ShortTag("Air", (short)0));
        root.put("OnGround", new ByteTag("OnGround", (byte)0));
        root.put("Dimension", new IntTag("Dimension", 0));
        root.put("Invulnerable", new ByteTag("Invulnerable", (byte)1));
        root.put("PortalCooldown", new IntTag("PortalCooldown", 0));
       
        return root;
    }
View Full Code Here

Examples of com.mojang.nbt.ByteTag

    public CompoundTag createTag()
    {
        CompoundTag tag = new CompoundTag();

        ByteTag tagY = new ByteTag("Y", (byte) y);
        ByteArrayTag tagBlockid = new ByteArrayTag("Blocks", blockid);
        ByteArrayTag tagMetadata = new ByteArrayTag("Data", metadata.array);
        ByteArrayTag tagSkylight = new ByteArrayTag("SkyLight", skylight.array);
        ByteArrayTag tagBlocklight = new ByteArrayTag("BlockLight", blocklight.array);
View Full Code Here

Examples of com.mojang.nbt.ByteTag

        return tag;
    }

    public static Section loadSection(CompoundTag tag)
    {
        ByteTag tagY = (ByteTag) tag.get("Y");
        ByteArrayTag tagBlockid = (ByteArrayTag) tag.get("Blocks");
        ByteArrayTag tagMetadata = (ByteArrayTag) tag.get("Data");
        ByteArrayTag tagSkylight = (ByteArrayTag) tag.get("SkyLight");
        ByteArrayTag tagBlocklight = (ByteArrayTag) tag.get("BlockLight");
View Full Code Here

Examples of com.sk89q.jnbt.ByteTag

    public Map<String, Tag> serializeItem(BaseItemStack item) {
        Map<String, Tag> data = new HashMap<String, Tag>();
        data.put("id", new ShortTag((short) item.getType()));
        data.put("Damage", new ShortTag(item.getData()));
        data.put("Count", new ByteTag((byte) item.getAmount()));
        if (!item.getEnchantments().isEmpty()) {
            List<CompoundTag> enchantmentList = new ArrayList<CompoundTag>();
            for(Map.Entry<Integer, Integer> entry : item.getEnchantments().entrySet()) {
                Map<String, Tag> enchantment = new HashMap<String, Tag>();
                enchantment.put("id", new ShortTag(entry.getKey().shortValue()));
View Full Code Here

Examples of com.sk89q.jnbt.ByteTag

    public List<CompoundTag> serializeInventory(BaseItemStack[] items) {
        List<CompoundTag> tags = new ArrayList<CompoundTag>();
        for (int i = 0; i < items.length; ++i) {
            if (items[i] != null) {
                Map<String, Tag> tagData = serializeItem(items[i]);
                tagData.put("Slot", new ByteTag((byte) i));
                tags.add(new CompoundTag(tagData));
            }
        }
        return tags;
    }
View Full Code Here

Examples of com.sk89q.jnbt.ByteTag

    }

    @Override
    public CompoundTag getNbtData() {
        Map<String, Tag> values = new HashMap<String, Tag>();
        values.put("SkullType", new ByteTag(skullType));
        if (owner == null) owner = "";
        values.put("ExtraType", new StringTag( owner));
        values.put("Rot", new ByteTag(rot));
        return new CompoundTag(values);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.