public void buildChunk(Chunk chunk, Node node, boolean notifyNeighbors) {
        chunk.setNeedsRebuild(false);

        Vec3i cLoc = chunk.getLocation();
        Vec3i gLoc = CoordConverter.chunkToGlobal(cLoc.duplicate());
        ChunkRenderer.buildChunkMesh(gLoc, chunk, node);

        if (notifyNeighbors) {
            if (config.notifyNeighborsMode >= 0) {
                ChunkTable chunks = chunk.getWorld().getChunks();
                //immediate neighbors
                notifyNeighbor(cLoc, 1, 0, 0, chunks);
                notifyNeighbor(cLoc, -1, 0, 0, chunks);
                notifyNeighbor(cLoc, 0, 1, 0, chunks);
                notifyNeighbor(cLoc, 0, -1, 0, chunks);
                notifyNeighbor(cLoc, 0, 0, 1, chunks);
                notifyNeighbor(cLoc, 0, 0, -1, chunks);
                if (config.notifyNeighborsMode >= 1) {
                    //edges
                    notifyNeighbor(cLoc, 1, 1, 0, chunks);
                    notifyNeighbor(cLoc, 1, -1, 0, chunks);
                    notifyNeighbor(cLoc, -1, 1, 0, chunks);
                    notifyNeighbor(cLoc, -1, -1, 0, chunks);
                    notifyNeighbor(cLoc, 1, 0, 1, chunks);
                    notifyNeighbor(cLoc, 1, 0, -1, chunks);
                    notifyNeighbor(cLoc, -1, 0, 1, chunks);
                    notifyNeighbor(cLoc, 1, 0, -1, chunks);
                    notifyNeighbor(cLoc, 0, 1, 1, chunks);
                    notifyNeighbor(cLoc, 0, -1, 1, chunks);
                    notifyNeighbor(cLoc, 0, 1, -1, chunks);
                    notifyNeighbor(cLoc, 0, -1, -1, chunks);
                    if (config.notifyNeighborsMode >= 2) {
                        //corners
                        notifyNeighbor(cLoc, 1, 1, 1, chunks);
                        notifyNeighbor(cLoc, 1, 1, -1, chunks);
                        notifyNeighbor(cLoc, -1, 1, 1, chunks);
                        notifyNeighbor(cLoc, -1, 1, -1, chunks);
                        notifyNeighbor(cLoc, 1, -1, 1, chunks);
                        notifyNeighbor(cLoc, 1, -1, -1, chunks);
                        notifyNeighbor(cLoc, -1, -1, 1, chunks);
                        notifyNeighbor(cLoc, -1, -1, -1, chunks);
                        if (config.notifyNeighborsMode >= 3) {
                            //2nd layer immediates
                            notifyNeighbor(cLoc, 2, 0, 0, chunks);
                            notifyNeighbor(cLoc, -2, 0, 0, chunks);
                            notifyNeighbor(cLoc, 0, 2, 0, chunks);
                            notifyNeighbor(cLoc, 0, -2, 0, chunks);
                            notifyNeighbor(cLoc, 0, 0, 2, chunks);
                            notifyNeighbor(cLoc, 0, 0, -2, chunks);
                        }
                    }
                }
            }
        }
        VecPool.free(cLoc);
        VecPool.free(gLoc);
    }