Latest progress - restored patches, some issues resolved
This commit is contained in:
@@ -94,10 +94,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ }
|
||||
+ lightengine.a(world.paperConfig.lightQueueSize + 16 * 256); // ensure full chunk can fit into queue
|
||||
+ sender.sendMessage("Updating Light " + coord);
|
||||
+ int cx = chunk.getPos().x << 4;
|
||||
+ int cz = chunk.getPos().z << 4;
|
||||
+ for (int y = 0; y < world.getHeight(); y++) {
|
||||
+ for (int x = 0; x < 16; x++) {
|
||||
+ for (int z = 0; z < 16; z++) {
|
||||
+ BlockPosition pos = new BlockPosition(chunk.getPos().getBlockX() + x, y, chunk.getPos().getBlockZ() + z);
|
||||
+ BlockPosition pos = new BlockPosition(cx + x, y, cz + z);
|
||||
+ lightengine.a(pos);
|
||||
+ }
|
||||
+ }
|
||||
@@ -107,7 +109,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ if (visibleChunk != null) {
|
||||
+ world.getChunkProvider().playerChunkMap.addLightTask(visibleChunk, () -> {
|
||||
+ MinecraftServer.getServer().processQueue.add(() -> {
|
||||
+ visibleChunk.sendPacketToTrackedPlayers(new PacketPlayOutLightUpdate(chunk.getPos(), lightengine), false);
|
||||
+ visibleChunk.sendPacketToTrackedPlayers(new PacketPlayOutLightUpdate(chunk.getPos(), lightengine, true), false);
|
||||
+ updateLight(sender, world, lightengine, queue);
|
||||
+ });
|
||||
+ });
|
||||
|
||||
Reference in New Issue
Block a user