Commit Graph

20 Commits

Author SHA1 Message Date
Ludovic Marie 91360e2f29 tools/lan_e2e.py: walls runs next to nametags, before the world fills up
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 11:08:31 +02:00
Ludovic Marie ee088c0022 tools/lan_e2e.py: walls sees a dead guest by its death screen too
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 11:05:39 +02:00
Ludovic Marie a8b6eea474 tools/lan_e2e.py: walls puts the wall halfway between the players
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 11:02:21 +02:00
Ludovic Marie 4410064c58 tools/lan_e2e.py: walls brings a dead guest back first
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 10:58:27 +02:00
Ludovic Marie a8579b4df8 lan status shows whether each guest crouches; walls sets up its own scene
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 10:58:09 +02:00
Ludovic Marie 3f7fba836e Name tags show through walls
SubmitNodeCollection.submitNameTag: a name that is not discrete is drawn
in full over the world and, faded on its background, again with
RenderPipelines.TEXT_SEE_THROUGH (no depth test) after the rest of the
world; a discrete one (a crouching player) only once, faded, on its
background. The background is ARGB.color(0.25, black): alpha 0x3F.

Part of #435

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 10:58:09 +02:00
Ludovic Marie 7e1e5eb7a0 tools/lan_e2e.py: trials puts the host back where it stood
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 10:58:09 +02:00
Ludovic Marie 2a33f2c500 tools/lan_e2e.py: trials clears the air between its blocks
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 10:58:09 +02:00
Ludovic Marie 74fafdd787 LAN: trial spawners and vaults see the guests
PlayerDetector reads level.getPlayers(): the guests count for a trial
spawner's detection and a vault's connected players, and a key a guest
inserts rewards the guest's UUID.

Part of #462

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 10:58:09 +02:00
Ludovic Marie 984a06e582 tools/lan_e2e.py: feedback expects the rounded position and closes the chat
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 10:58:09 +02:00
Ludovic Marie 11130e6ef7 LAN guest: command feedback names the guest and shows its numbers
Feedback about the player (target_name) names the guest a command runs
for. A client reading a server's chat now unwraps NbtOps' {"": value}
wrapper of any bare value, not only strings, so translation arguments that
are numbers show ("Replaced 1 slot(s)", the coordinates). horizon-ctl
messages reads a server's chat too.

Part of #435

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 10:58:09 +02:00
Ludovic Marie 257b5e9f2d tools/lan_e2e.py: containers waits for the server's menu before reading or taking
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 10:36:31 +02:00
Ludovic Marie 64f7ecd367 tools/lan_e2e.py: containers takes its chests away
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 10:27:11 +02:00
Ludovic Marie e289980c1e LAN guest: their own ender chest, and double chests as 9x6
The hub's container menus now say where their slots live (lan::menu::Slots):
one block entity, both halves of a double chest (CompoundContainer, the right
half first) or the guest's own ender inventory (PlayerEnderChestContainer,
saved as EnderItems). The host's ender inventory stays the host's while a
guest acts. A Horizon client shows a server's chest-like menu with the rows
and title the server sent, and keeps its slots off a block that holds no such
container.

Part of #435

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 10:19:00 +02:00
Ludovic Marie 36d7f02802 LAN: PvP between the host and guests
Player.attack on a player: the host hits the guest on its crosshair, a guest
hits the host or another guest. The hit is worked out as the attacker
(Game::melee_damage, shared with attacking mobs) and lands on the victim as a
player_attack (blocking, armour, knockback to the guest's client), when the
pvp game rule allows it (ServerPlayer.canHarmPlayer).

Part of #435

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 10:19:00 +02:00
Ludovic Marie 2e1212346f tools/lan_e2e.py: hazards counts the food spent from full health
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 10:19:00 +02:00
Ludovic Marie 600bae5703 LAN guest: hurt by lava, fire, drowning, suffocation and the void; hungry from moving
The host now runs the rest of the server's body tick for each guest:
LivingEntity.baseTick's drowning and lava, fire blocks, suffocation
(isInWall) and the void (checkBelowWorld, 4 a tick, creative too), and per
move handleMovePlayer's jump (ServerPlayer.jumpFromGround's exhaustion) and
checkMovementStatistics (sprinting, swimming). The first move of a tick now
starts from the ground state before it, so take-offs are seen. Hurt sounds
are heard at the guest; lan status lists each guest's health and food.

Part of #435

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 09:13:43 +02:00
Ludovic Marie 327aa5af6e tools/lan_e2e.py: a world with commands, so the guest's commands run again
Since #372 a guest's commands need the world's Allow Commands as well as
the LAN's; the test's survival world had none, so every guest command (tp,
gamemode, setblock) was refused and the checks built on them failed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 08:59:53 +02:00
Ludovic Marie dac18e8350 LAN: mobs target and attack guests
Each mob sees the nearest player (host or guest), as Level.getNearestPlayer
gives it, and keeps a guest it targets or that hurt it in the last 100 ticks.
Its hits, pushes, fire and launches on that player run with the guest swapped
in; mobs' projectiles hit guests too, and knockback reaches the guest's client
(SetEntityMotion on its own entity).

Part of #435

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 08:44:07 +02:00
Ludovic Marie fd1acd5ed7 tools/lan_e2e.py: a host and a guest on LAN, checked from both sides
Two Horizon games under horizon-ctl, each with its own scratch home: the
host opens a survival world to LAN with commands, the guest joins by
address, and each check (tab, self, armour, nametags, chest, crafting,
damage) is reported on its own with screenshots of both sides.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 20:56:45 +02:00