@Override public Block getTile(int x, int y, int z) { ChunkPoint cp = ChunkPoint.toPoint(x, z); if (!chunks.containsKey(cp)) { // TODO Add to generate queue return null; } ChunkColumn c = chunks.get(cp); int cx = x & 0xf; int cz = z & 0xf; return c.getBlock(cx, y, cz); }
@Override public void setTile(Block b, int x, int y, int z, Server server) { SMPBlock block; if (!(b instanceof SMPBlock)) return; block = (SMPBlock) b; ChunkPoint cp = ChunkPoint.toPoint(x, z); if (!chunks.containsKey(cp)) { // TODO Add to generate queue return; } ChunkColumn c = chunks.get(cp); int cx = x & 0xf; int cz = z & 0xf; c.setBlock(cz, cx, y, block); }