Commit Graph

1827 Commits

Author SHA1 Message Date
Ludovic Marie 487d76c0ae gfx: the batch test covers see-through text
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 3e6052ac92 control: keys reach a server's chat input
The control socket's key command went straight to key_pressed, so Escape
paused the game instead of closing the chat a server connection opens
(remote_chat_key handles the real keyboard).

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 bc0cd9cc84 LAN guest: a use packet uses the item alone
ServerGamePacketListenerImpl.handleUseItem takes the client's rotation and
uses the held item, nothing else. The host ran the whole right click, with
the block the guest had looked at before: a guest that turned from an
ender chest to a double chest could get the ender chest opened again.

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 7e8dd577ac Merge pull request #454 from ludovic111/fix/title-toast-slide
World backup toast slides in and out with its sounds (#384)
2026-10-16 07:37:05 +02:00
Ludovic Marie a75c3a315f Merge pull request #453 from ludovic111/fix/slider-smooth-drag
Classic sliders follow the pointer and snap on release (#385)
2026-10-16 07:37:01 +02:00
Ludovic Marie 932c7bfc17 Merge pull request #452 from ludovic111/fix/classic-text-fields
World screens' text fields: move the cursor, select, click and drag
2026-10-16 07:36:56 +02:00
Ludovic Marie d0fa05b3e7 Merge pull request #451 from ludovic111/fix/level-loading-screen
Level loading screen like vanilla: panorama, chunk map and progress bar
2026-10-16 07:36:52 +02:00
Ludovic Marie 592ac6966b Merge pull request #450 from ludovic111/fix/world-options-layout
World Options: vanilla layout, headings, port box, lock and footer
2026-10-16 07:36:47 +02:00
Ludovic Marie 3e19e0d4dd Merge pull request #449 from ludovic111/fix/pause-icon-buttons
Pause menu: icons centred and in full colour like vanilla
2026-10-16 07:36:43 +02:00
Ludovic Marie 6a0d4284d0 Merge pull request #445 from ludovic111/fix/world-list-join-icon
World list: hovered rows show the join arrow, clicking the icon joins
2026-10-16 07:36:39 +02:00
Ludovic Marie f188dfeb45 Merge pull request #439 from ludovic111/feat/ominous-trials
Trial spawners: become ominous, Trial Omen and ominous item spawners
2026-10-16 06:42:37 +02:00
Ludovic Marie 45404c4507 Merge pull request #433 from ludovic111/feat/trial-pots
Give trial chamber pots their loot, sherds and insertion
2026-10-16 06:42:32 +02:00
Ludovic Marie d7c7c56e05 Merge pull request #422 from ludovic111/feat/trial-visuals
Show trial spawner and vault visuals
2026-10-16 06:42:27 +02:00
Ludovic Marie d1c753e085 Merge pull request #417 from ludovic111/feat/vault-game
Vaults in the game: ticking, keys, rewards and the display item
2026-10-16 06:42:22 +02:00
Ludovic Marie 9126df5ac5 Merge pull request #410 from ludovic111/feat/vault-logic
Vaults: server logic and a parity harness
2026-10-16 06:42:17 +02:00
Ludovic Marie d3b9441833 Merge pull request #457 from LookImEcho-Rick/fix/launcher-data-preview-scroll
Fix launcher data preview scroll isolation
2026-10-16 06:40:49 +02:00
Ludovic Marie e6a2d72467 Merge pull request #459 from LookImEcho-Rick/codex/chat-arrow-history
Keep chat arrow keys from turning the camera
2026-10-16 06:40:45 +02:00
Ludovic Marie 3c57aba6c9 Classic sliders follow the pointer and snap on release
Vanilla's AbstractSliderButton keeps its own position while held and
only snaps to the option's stepped value in resetValue (on release, or
600 ms after the last change for sliders that apply late).

Fixes #385

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 06:18:28 +02:00
Ludovic Marie 9b9b23bf3a Merge pull request #436 from ludovic111/feat/shaderpack-client
horizon-client: run a Java pack's full-screen passes over the world
2026-10-16 05:31:32 +02:00
Ludovic Marie 953cdc947f Merge pull request #418 from ludovic111/feat/shaderpack-passes
horizon-shaderpack: plan a Java pack's full-screen passes like Iris
2026-10-16 05:31:28 +02:00
Ludovic Marie 4de37ac0e4 Merge pull request #415 from ludovic111/feat/shaderpack-properties
horizon-shaderpack: read shaders.properties like Iris
2026-10-16 05:31:23 +02:00
Ludovic Marie 1bf51d786f Merge pull request #413 from ludovic111/feat/shaderpack-translate
Java shader packs (2): translate programs to WGSL (syntax-tree legaliser + naga)
2026-10-16 05:31:19 +02:00
Ludovic Marie 64a82acdab Merge pull request #405 from ludovic111/feat/shaderpack-preprocess
Java shader packs (1): horizon-shaderpack crate, Iris's preprocessor and options
2026-10-16 05:31:14 +02:00
LookImEcho-Rick f2bbd6e3dc Keep arrow-key camera controls out of chat and menus 2026-10-15 22:23:25 -05:00
Ludovic Marie 63453086b6 Trial spawners: become ominous, Trial Omen and ominous item spawners
A player seen with Bad Omen or Trial Omen turns a trial spawner ominous
(tryDetectPlayers' ominous branch): Bad Omen becomes Trial Omen, level
events 3020, the spawner's mobs vanish (3012) and the ominous config
starts over. While active, an ominous spawner drops an ominous item
spawner over a player or one of its mobs every 160 ticks
(spawnOminousOminousItemSpawner, getDispensingItems seeded per 30x20x30
cell); it floats, grows and turns for 60 to 120 ticks, then the item
falls or is fired down (OminousItemSpawner).

Zombies, piglins and zoglins read IsBaby from their tag, so the baby
zombie trial spawners spawn babies, and zombies save it.

The trial spawner harness covers the ominous branch, Trial Omen, the
discarded mobs and the item spawners' items, positions and delays.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 05:04:30 +02:00
Ludovic Marie c4f915c9d1 Give trial chamber pots their loot, sherds and insertion
Generated chunks now keep the block entities Horizon does not model
(decorated pots, brushable blocks) as placed, like a loaded chunk's, so a
trial chamber pot keeps its loot table and sherds. The loot table is
rolled into the pot's item the first time it is read
(RandomizableContainer.unpackLootTable: the seed, else the table's random
sequence, else the level random), so breaking the pot drops it. Pots
render their sherds from the saved block entity, and DecoratedPotBlock's
useItemOn / useWithoutItem insert items (wobble, sounds, dust plume,
game event) or wobble and refuse.

Part of #223.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 05:04:06 +02:00
Ludovic Marie ed5427197f Show trial spawner and vault visuals
LevelEventHandler 3011-3021 (spawn, detect, eject, ominous and item spawner
particles and sounds, vault activation and deactivation), the trial
spawner's client tick (state particles, the spinning display mob, the
ambient sound) and the vault's client tick (idle smoke and flames, the
connection particles towards the player, the ambient sound).

Part of #223.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 05:03:47 +02:00
Ludovic Marie 3ac3efe749 Save round-trip: a vault's next state update moves with the clock
Vaults tick in the game now, and an idle one pushes
state_updating_resumes_at to gameTime + 20 on every update, so Horizon,
which saves later than vanilla, stores a later value. Stage 3 already
treats it as volatile.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 05:03:38 +02:00
Ludovic Marie 2c07b5e621 Wire vaults into the game
Vaults are block entities now (loaded from saves and structure templates,
so trial chambers keep their ominous configs) and tick every game tick:
their state changes, sounds, level events and ejected rewards reach the
world, keys go in through VaultBlock.useItemOn before the item's own use,
and VaultRenderer draws the display item spinning inside the cage.

Part of #223.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 05:03:38 +02:00
Ludovic Marie 2567a4a41a Add the vault's server logic with a parity harness
vault::Vault is VaultBlockEntity with its config, server and shared data:
load and save, Server.tick (display item cycling, VaultState.tickAndGetNext,
ejection, transitions with their sounds and level events) and
VaultBlock.useItemOn / tryInsertKey (keys, rewarded players, fail sounds,
the reward roll with its random sequence).

tools/test_vault_parity.py runs 3,000 cases against vanilla through a new
mode=vault of the natural spawn oracle and fixture.

Part of #223.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 05:03:28 +02:00
LookImEcho-Rick d5fbe2b7d6 Fix launcher data preview scroll isolation 2026-10-15 22:02:18 -05:00
Ludovic Marie 9044ae30c9 Merge pull request #423 from ludovic111/fix/server-list-dialogs
Server list: confirm before deleting, vanilla Direct Connection layout
2026-10-16 03:51:54 +02:00
Ludovic Marie c72a5643a4 Merge remote-tracking branch 'origin/main' into fix/server-list-dialogs
# Conflicts:
#	crates/horizon-client/src/multiplayer.rs
2026-10-16 03:46:14 +02:00
Ludovic Marie 3315138536 Merge pull request #421 from ludovic111/fix/server-list-entries
Server list rows: favicons, styled MOTDs, player count colours, icon arrows
2026-10-16 03:46:02 +02:00
Ludovic Marie f8c22f4e72 Merge pull request #416 from ludovic111/fix/f3-crosshair
F3 shows vanilla's debug crosshair (world axes)
2026-10-16 03:45:58 +02:00
Ludovic Marie 128111ff27 Merge pull request #414 from ludovic111/fix/f3-on-top
F3 overlay like vanilla: on top of menus, debug GUI scale, default entries
2026-10-16 03:45:54 +02:00