Package com.mojang.nbt

Examples of com.mojang.nbt.ByteArrayTag


    {
        CompoundTag level = (CompoundTag) tag.get("Level");

        ListTag<CompoundTag> sections = (ListTag<CompoundTag>) level.get("Sections");
        IntArrayTag heightmap = (IntArrayTag) level.get("HeightMap");
        ByteArrayTag biome = (ByteArrayTag) level.get("Biomes");
        IntTag xPos = (IntTag) level.get("xPos");
        IntTag zPos = (IntTag) level.get("zPos");
       
        ManagedChunk chunk;
        chunk = new ManagedChunk(xPos.data, zPos.data, heightmap.data, biome.data, manager);
View Full Code Here


    }
   
    private CompoundTag createChunkTag()
    {
        CompoundTag level = new CompoundTag("Level");
        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));
View Full Code Here

    {
        CompoundTag level = (CompoundTag) tag.get("Level");

        ListTag<CompoundTag> sections = (ListTag<CompoundTag>) level.get("Sections");
        IntArrayTag heightmap = (IntArrayTag) level.get("HeightMap");
        ByteArrayTag biome = (ByteArrayTag) level.get("Biomes");
        IntTag xPos = (IntTag) level.get("xPos");
        IntTag zPos = (IntTag) level.get("zPos");

        Chunk chunk = new Chunk(xPos.data, zPos.data, heightmap.data, biome.data);
        chunk.loadSections(sections);
View Full Code Here

        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);
        tag.put("Length", tagL);
        tag.put("Materials", tagMat);
View Full Code Here

    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);

        tag.put("Y", tagY);
        tag.put("Blocks", tagBlockid);
        tag.put("Data", tagMetadata);
        tag.put("SkyLight", tagSkylight);
View Full Code Here

    }

    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");

        int y = tagY.data;

        NibbleArray metadata = new NibbleArray(tagMetadata.data);
        NibbleArray skylight = new NibbleArray(tagSkylight.data);
View Full Code Here

TOP

Related Classes of com.mojang.nbt.ByteArrayTag

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.