Examples of ByteArrayTag


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

Examples of com.mojang.nbt.ByteArrayTag

    }
   
    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

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

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

Examples of com.mojang.nbt.ByteArrayTag

        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

Examples of com.mojang.nbt.ByteArrayTag

    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

Examples of com.mojang.nbt.ByteArrayTag

    }

    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

Examples of com.sk89q.jnbt.ByteArrayTag

                CompoundTag tileEntityTag = new CompoundTag(values);
                tileEntities.add(tileEntityTag);
            }
        }

        schematic.put("Blocks", new ByteArrayTag(blocks));
        schematic.put("Data", new ByteArrayTag(blockData));
        schematic.put("TileEntities", new ListTag(CompoundTag.class, tileEntities));

        if (addBlocks != null) {
            schematic.put("AddBlocks", new ByteArrayTag(addBlocks));
        }

        // ====================================================================
        // Entities
        // ====================================================================
View Full Code Here

Examples of com.sk89q.jnbt.ByteArrayTag

                    }
                }
            }
        }

        schematic.put("Blocks", new ByteArrayTag(blocks));
        schematic.put("Data", new ByteArrayTag(blockData));
        schematic.put("Entities", new ListTag(CompoundTag.class, new ArrayList<Tag>()));
        schematic.put("TileEntities", new ListTag(CompoundTag.class, tileEntities));
        if (addBlocks != null) {
            schematic.put("AddBlocks", new ByteArrayTag(addBlocks));
        }

        // Build and output
        CompoundTag schematicTag = new CompoundTag(schematic);
        NBTOutputStream stream = new NBTOutputStream(new GZIPOutputStream(new FileOutputStream(file)));
View Full Code Here

Examples of net.lightstone.util.nbt.ByteArrayTag

        }
      }
    }

    Map<String, Tag> levelTags = new HashMap<String, Tag>();
    levelTags.put("Blocks", new ByteArrayTag("Blocks", tileData));
    levelTags.put("Data", new ByteArrayTag("Data", metaData));
    levelTags.put("SkyLight", new ByteArrayTag("SkyLight", skyLightData));
    levelTags.put("BlockLight", new ByteArrayTag("BlockLight", blockLightData));
    // TODO: Heightmap, entities, tileentities, lastupdate
    levelTags.put("HeightMap", new ByteArrayTag("HeightMap", heightMapData));
    levelTags.put("Entities", chunkEntitiesToTag(chunk));
    levelTags.put("TileEntities", chunkTileEntitiesToTag(chunk));
    levelTags.put("LastUpdate", new LongTag("LastUpdate", 0));

    levelTags.put("xPos", new IntTag("xPos", chunk.getX()));
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.