Package rakama.worldtools.data

Examples of rakama.worldtools.data.Chunk


            return chunk.getBlockID(x & 0xF, y, z & 0xF);
    }

    public int getMetaData(int x, int y, int z)
    {
        Chunk chunk = manager.getChunk(x >> 4, z >> 4);
       
        if(chunk == null)
            return -1;
        else
            return chunk.getMetaData(x & 0xF, y, z & 0xF);
    }
View Full Code Here


            return chunk.getMetaData(x & 0xF, y, z & 0xF);
    }

    public int getBlockLight(int x, int y, int z)
    {
        Chunk chunk = manager.getChunk(x >> 4, z >> 4, false, true);
       
        if(chunk == null)
            return -1;
        else
            return chunk.getBlockLight(x & 0xF, y, z & 0xF);
    }
View Full Code Here

            return chunk.getBlockLight(x & 0xF, y, z & 0xF);
    }

    public int getSkyLight(int x, int y, int z)
    {
        Chunk chunk = manager.getChunk(x >> 4, z >> 4, false, true);
       
        if(chunk == null)
            return -1;
        else
            return chunk.getSkyLight(x & 0xF, y, z & 0xF);
    }
View Full Code Here

            return chunk.getSkyLight(x & 0xF, y, z & 0xF);
    }

    public int getSkyLightHeight(int x, int z)
    {
        Chunk chunk = manager.getChunk(x >> 4, z >> 4);

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

            return chunk.getHeight(x & 0xF, z & 0xF);
    }
   
    public void setBiome(int x, int z, int biome)
    {
        Chunk chunk = manager.getChunk(x >> 4, z >> 4, true);
        chunk.setBiome(x & 0xF, z & 0xF, biome);
    }
View Full Code Here

        chunk.setBiome(x & 0xF, z & 0xF, biome);
    }

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

        chunk.setBiome(x & 0xF, z & 0xF, biome);
    }
   
    public int getBiome(int x, int z)
    {
        Chunk chunk = manager.getChunk(x >> 4, z >> 4);

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

       
        for(int x=x0; x<=x1+Chunk.width; x+=Chunk.width)
        {
            for(int z=z0; z<=z1+Chunk.length; z+=Chunk.length)
            {
                Chunk chunk = manager.getChunk(x >> 4, z >> 4);

                if(chunk == null)
                    continue;
               
                for(Entity e : chunk.getEntities())
                    if(e.getX() >= x0 && e.getX() <= x1
                    && e.getY() >= y0 && e.getY() <= y1
                    && e.getZ() >= z0 && e.getZ() <= z1)
                        list.add(e);
            }
View Full Code Here

       
        for(int x=x0; x<=x1+Chunk.width; x+=Chunk.width)
        {
            for(int z=z0; z<=z1+Chunk.length; z+=Chunk.length)
            {
                Chunk chunk = manager.getChunk(x >> 4, z >> 4);
               
                if(chunk == null)
                    continue;
               
                for(TileEntity e : chunk.getTileEntities())
                    if(e.getX() >= x0 && e.getX() <= x1
                    && e.getY() >= y0 && e.getY() <= y1
                    && e.getZ() >= z0 && e.getZ() <= z1)
                        list.add(e);
            }
View Full Code Here

   
    public void addEntity(Entity e)
    {       
        int x = (int)e.getX();
        int z = (int)e.getZ();
        Chunk chunk = manager.getChunk(x >> 4, z >> 4, true);
        chunk.addEntity(e);
    }
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.