Package com.mojang.nbt

Examples of com.mojang.nbt.StringTag


            tag = new CompoundTag("Schematic");

        ShortTag tagW = new ShortTag("Width", (short)width);
        ShortTag tagH = new ShortTag("Height", (short)height);
        ShortTag tagL = new ShortTag("Length", (short)length);
        StringTag tagMat = new StringTag("Materials", "Alpha");
        ByteArrayTag tagBlockid = new ByteArrayTag("Blocks", blockid);
        ByteArrayTag tagMetadata = new ByteArrayTag("Data", metadata);

        tag.put("Width", tagW);
        tag.put("Height", tagH);
View Full Code Here


        Tag temp = tag.get("id");
       
        if(temp == null || !(temp instanceof StringTag))
            throw new IllegalArgumentException("Unrecognized tag format");
       
        StringTag id = (StringTag)temp;
       
        // TODO: map into correct classes
       
        return new EntityImpl(tag);
    }
View Full Code Here

        Tag temp = tag.get("id");
       
        if(temp == null || !(temp instanceof StringTag))
            throw new IllegalArgumentException("Unrecognized tag format");
       
        StringTag id = (StringTag)temp;

        // TODO: map into correct classes
       
        if(id.data.equals("Control"))
            return new CommandBlock(tag);
View Full Code Here

    }
   
    public CommandBlock createCommandBlock(int x, int y, int z, String command)
    {
        CompoundTag root = createTileRoot(x, y, z, "Control");
        root.put("Command", new StringTag("Command", command));
        return new CommandBlock(root);
    }
View Full Code Here

    {
        CompoundTag root = new CompoundTag();
        root.put("x", new IntTag("x", x));
        root.put("y", new IntTag("y", y));
        root.put("z", new IntTag("z", z));
        root.put("id", new StringTag("id", id));
        return root;
    }
View Full Code Here

    protected CompoundTag createEntityRoot(int x, int y, int z, String id)
    {
        CompoundTag root = new CompoundTag();
       
        root.put("id", new StringTag("id", id));
       
        ListTag<DoubleTag> pos = new ListTag<DoubleTag>("Pos");
        pos.add(new DoubleTag("x", x));
        pos.add(new DoubleTag("y", y));
        pos.add(new DoubleTag("z", z));
View Full Code Here

TOP

Related Classes of com.mojang.nbt.StringTag

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.