request light engine, don't wait for response invalidate packet on update
- High Level light api - chunk based: (look at batching from new chunk gen branch)
public class FullBrightLightGenerator implements LightGenerator {
@Override
public void lightChunk(ChunkLightBatch batch) {
int offX = chunk.getX() * 16;
int offY = chunk.getY() * 16;
for (int x = 0; x < Chunk.SIZE_X; x++) {
for (int y = 0; y < chunk.getYSize(); y++) {
for (int z = 0; z < Chunk.SIZE_X; z++) {
boolean blockAboveIsAir = batch.get(x, y + 1, z).compare(Block.AIR);
batch.set(offX + x, y, offZ + z, blockIsAir ? LightType.SKY : LightType.BLOCK, 15);
}
}
}
};
}
low level api by engine supplying byte array
Interface for requesting to generate light chunk wise, section wise, and block wise, with having a defaultLightEngine in MinecraftServer and a customLightEngine in InstanceContainer
passing a Optional of locations of pre-existing light sources to the light engine, when the chunk gen is smart enough to recognize light sources on generation.