Package rakama.worldtools.data

Examples of rakama.worldtools.data.Chunk


    {
        for(int z = 1; z < span - 1; z++)
        {
            for(int x = 1; x < span - 1; x++)
            {
                Chunk chunk = localChunks[x + z * span];

                if(chunk == null)
                    continue;
               
                if(relight_skip_boundaries && relight_isBoundary(x, z, span, localChunks))
View Full Code Here


    }

    public int getHeight(int x, int z)
    {
        int cindex = toChunkIndex(x >> 4, z >> 4);
        Chunk chunk = chunks[cindex];

        if(chunk == null)
            return 0;

        x &= 0xF;
View Full Code Here

        if(dis == null)
            return null;

        // decompress chunk
        CompoundTag tag = NbtIo.read(dis);
        Chunk chunk = Chunk.loadChunk(tag);
        dis.close();
       
        return chunk;
    }
View Full Code Here

   
    public boolean removeTileEntity(TileEntity e)
    {
        int x = e.getX();
        int z = e.getZ();
        Chunk chunk = manager.getChunk(x >> 4, z >> 4);
        if(chunk == null)
            return false;
        return chunk.removeTileEntity(e);
    }
View Full Code Here

        this.manager = manager;
    }

    public void setBlock(int x, int y, int z, Block block)
    {
        Chunk chunk = manager.getChunk(x >> 4, z >> 4, true);       
        chunk.setBlock(x & 0xF, y, z & 0xF, block);
    }
View Full Code Here

        chunk.setBlock(x & 0xF, y, z & 0xF, block);
    }

    public void setBlock(int x, int y, int z, int id, int data)
    {
        Chunk chunk = manager.getChunk(x >> 4, z >> 4, true);       
        chunk.setBlock(x & 0xF, y, z & 0xF, Block.getBlock(id, data));
    }
View Full Code Here

        chunk.setBlock(x & 0xF, y, z & 0xF, Block.getBlock(id, data));
    }
   
    public void setBlockID(int x, int y, int z, int id)
    {
        Chunk chunk = manager.getChunk(x >> 4, z >> 4, true);       
        chunk.setBlockID(x & 0xF, y, z & 0xF, id);
    }
View Full Code Here

        chunk.setBlockID(x & 0xF, y, z & 0xF, id);
    }

    public void setMetaData(int x, int y, int z, int data)
    {
        Chunk chunk = manager.getChunk(x >> 4, z >> 4, true);       
        chunk.setMetaData(x & 0xF, y, z & 0xF, data);
    }
View Full Code Here

        chunk.setMetaData(x & 0xF, y, z & 0xF, data);
    }
   
    public Block getBlock(int x, int y, int z)
    {
        Chunk chunk = manager.getChunk(x >> 4, z >> 4);

        if(chunk == null)
            return null;
        else
            return chunk.getBlock(x & 0xF, y, z & 0xF);
    }
View Full Code Here

            return chunk.getBlock(x & 0xF, y, z & 0xF);
    }
   
    public int getBlockID(int x, int y, int z)
    {
        Chunk chunk = manager.getChunk(x >> 4, z >> 4);   

        if(chunk == null)
            return -1;
        else
            return chunk.getBlockID(x & 0xF, y, z & 0xF);
    }
View Full Code Here

TOP

Related Classes of rakama.worldtools.data.Chunk

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.