I'm working on a mod that strips away all the land of a world and leaves just the ores, floating in space. I just wanted to do it to see if I can.
I've gotten the core functionality working, by hooking into the ChunkEvent.load event, and I iterate through every block in the chunk, deleting (read: turning to air) the ones that aren't ores. I also removed the surface rules/feature placements in a datapack so I'm just working with stone, air, lava, and ores prior to the ChunkEvent.
After this process, the world displays the floating ores in a curious way- some are lit, as if by a shaft of light, and others are in pitch darkness, even though there is nothing above them. I think this is because the lighting is already determined before I remove the blocks, causing some to be in darkness as if they were in a cave. It seems like I need to force a lighting update in the chunkevent, or something along those lines, but I'm not sure how to do it. It's possible I should hook into a later event and try to instigate a global lighting update, but I don't know which one that should be.
Any help would be appreciated!