Clients keep the light the server sends; the server sends light updates

A remote client (a LAN guest, or the game on its server thread) threw away
the light in each LevelChunkWithLight and relit the column and its
neighbours itself. It now applies the sky and block layers as
ClientPacketListener.applyLightData does, and relights only block changes,
as vanilla's client does.

The hub now sends ClientboundLightUpdatePacket for the light sections that
changed in a column to the players for whom it is on the tracked border
(ChunkHolder.broadcastChanges), so light from blocks a guest doesn't track
reaches it.

horizon-ctl gains 'light X1 Y1 Z1 X2 Y2 Z2', and lan_e2e a 'light' check
comparing the guest's light with the host's.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Ludovic Marie
2026-10-18 06:09:46 +02:00
parent d85a3603bd
commit 817a71ffa5
13 changed files with 394 additions and 32 deletions
+1 -1
View File
@@ -109,7 +109,7 @@ game accepts, test hooks included.
- **Observe:** `state` (position, rotation, velocity, health, food, saturation,
XP, effects, game mode, dimension, time, weather, the screen and what the
crosshair points at), `looking-at`, `entities [RADIUS] [TYPE]` (mobs with
ids and health, dropped items, orbs), `block X Y Z`, `blocks X1 Y1 Z1 X2 Y2 Z2`,
ids and health, dropped items, orbs), `block X Y Z`, `blocks X1 Y1 Z1 X2 Y2 Z2`, `light X1 Y1 Z1 X2 Y2 Z2`,
`find-block BLOCK [RADIUS]`, `inventory` (stacks with their components as
SNBT), `screen` (the open screen or title menu, its buttons and slots) and
`messages` (chat, title, subtitle and action bar).