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