Package de.lv.jvoxgl.world

Examples of de.lv.jvoxgl.world.Chunk


 
  public Block(World world, int id, int x, int y, int z) {
    super(world,x,y,z);
    this.setId(id);
   
    Chunk chunk = world.getChunkAt(x, z);
    int cx = (int) Math.floor((float)x/(float)world.getChunkWidth());
    int cz = (int) Math.floor((float)z/(float)world.getChunkDepth());
    if(chunk == null){
      chunk = new Chunk(world, cx, cz);
    }
    if(world.getBlockAt(x, y, z) == null)chunk.addBlock(this, Coordinates.WorldToChunkCoordinatesX(world, x), y, Coordinates.WorldToChunkCoordinatesZ(world, z));
  }
View Full Code Here

TOP

Related Classes of de.lv.jvoxgl.world.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.