Commit Graph

3685 Commits

Author SHA1 Message Date
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 d9deabd54e Command blocks: placing, the edit screen, and running commands
A creative player with game master commands (Player.canUseGameMasterBlocks)
places command, chain and repeating command blocks and opens
CommandBlockEditScreen on them: the command, its previous output with the
O/X tracking toggle, Impulse/Chain/Repeat, Conditional and Needs
Redstone/Always Active, applied as handleSetCommandBlock does.

The block entity (CommandBlockEntity with BaseCommandBlock) saves and
loads its vanilla fields. CommandBlock.tick runs impulse blocks on a
rising signal, repeating blocks every tick while powered or always
active, and the chain in front (executeChain), honouring conditional
blocks, command_blocks_work and max_command_sequence_length. Commands
run through the command system as the block (position, facing, game
master level); their feedback becomes the block's last output and the
[@: ...] broadcast under command_block_output. Comparators read the
success count.

Fixes #444

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 07:07:47 +02:00
Ludovic Marie 3cfb7b8053 Mods' commands in the chat's command tree (#456)
A mod's commands ran but the chat box parsed against vanilla's tree only,
so `/coords` showed red as unknown and never completed. The game now keeps
the chat's tree as vanilla's plus a literal per running mod's command (every
permission level, optional greedy `args`), rebuilt when mods start, reload
or stop.

Fixes #456

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 06:48:56 +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 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 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
Cosmic 92236010fd Document the sulfur body component limitation 2026-10-15 22:22:07 -04:00
Cosmic 938f2ec884 Merge remote-tracking branch 'origin/main' into fix/sulfur-cube-inner-layer
# Conflicts:
#	crates/horizon-client/src/game/creatures.rs
2026-10-15 22:19:52 -04:00
Cosmic e43e8ae82b Match sulfur cube block placement, lighting and fuse flashes 2026-10-15 22:19:39 -04:00
Cosmic 18e9c14642 Render swallowed sulfur cube blocks and award Uh Oh 2026-10-15 22:12:08 -04: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
Ludovic Marie 09e01f066f Merge pull request #409 from ludovic111/fix/graphics-preset-distances
Graphics presets set render and simulation distance like vanilla
2026-10-16 03:45:51 +02:00
Ludovic Marie fb5a307903 Merge pull request #407 from ludovic111/fix/allow-commands
Commands follow the world's Allow Commands
2026-10-16 03:45:47 +02:00
Ludovic Marie 7cad2d7284 Merge pull request #406 from ludovic111/fix/world-reopen-entities
Reopening a world no longer duplicates its entities
2026-10-16 03:45:43 +02:00
Ludovic Marie c163fbff83 The world backup toast slides in and out with its sounds
EditWorldScreen's SystemToast goes through vanilla's ToastManager: it
slides in from the right over 600 ms (squared), shows for 5 s times the
notification display time, slides out, and plays ui.toast.in / out. The
in-game toasts' slide moves to a shared toasts module for it.

Fixes #384

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 03:32:21 +02:00
Ludovic Marie 608507699c Classic world fields edit at a cursor: arrows, Home/End, Delete, clicks and drags
The world list's search, Edit World's name and Create New World's name and
seed kept only their String and appended to it. They now edit through an
EditBox (ui::Caret keeps the focused field's cursor, selection and scroll
between frames): EditBox.keyPressed's moves and deletions (Ctrl by word,
Shift to select), Ctrl+A/C/V/X on the selection, onClick placing the
cursor under the pointer (Shift extends, a double click within 250 ms
selects the word) and onDrag selecting.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 03:05:46 +02:00
Ludovic Marie 03fe857ec2 Dropping from a menu swings the hand
LivingEntity.drop swings the main hand for every drop, so throwing a
slot's item with Q over the inventory, a container or a creative tab
plays the swing (the inventory's player model shows it). Horizon only
swung for the drop key in game; Player.drop's port now swings itself.

Fixes #442

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 03:05:26 +02:00
Ludovic Marie 5373998ee0 Level loading screen like vanilla: panorama, chunk map and progress bar
LevelLoadingScreen while the player waits for its chunks: the title's
panorama, blur and menu background when a world opens (Reason.OTHER),
the nether portal sprite after a nether portal, Loading terrain... above
the 17x17 chunk status map (ChunkLoadStatusView, radius 8, COLORS) and
the 200x2 progress bar easing towards LevelLoadProgressTracker's value.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 03:05:21 +02:00
Ludovic Marie 93ea338bfd Holding the drop key keeps dropping, in game and in menus
KeyboardHandler.keyPress sends a key repeat (InputConstants.REPEAT) to
Screen.keyPressed and KeyMapping.click like a press, so holding key.drop
keeps throwing the held item, the hovered slot's item in a menu, and
the hovered item of a creative tab. Horizon dropped every repeat; the
drop key's now reach key_pressed. horizon-ctl `key KEY repeat` sends
one auto-repeat, for scripted checks.

Fixes #443

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 02:57:59 +02:00
Ludovic Marie 98321f5d8d World Options: tests of the layout and active states
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 02:52:47 +02:00
Ludovic Marie 9f7c1c3ce5 World Options: vanilla layout, headings, port box, lock, game rules and restrictions
WorldOptionsScreen in a HeaderAndFooterLayout: the title in the 33 pixel
header, the content in a ScrollableLayout over the in-world list
background between the separators, the footer buttons at h - 27.
Bold underlined category headings (FocusableTextWidget), the difficulty
button 130 wide beside its lock, Edit Game Rules... and Restrictions...,
the port EditBox always shown with its hint and error colour, and the
buttons' active states from updateButton and the update*Button methods.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 02:46:19 +02:00
Ludovic Marie a8e0dead35 Wayland: VSync off draws uncapped in a window
pre_present_notify ties winit's RedrawRequested to the compositor's
frame callbacks on Wayland, one per refresh, so a window drew at the
monitor's rate whatever the present mode. Only Fifo (VSync) asks for
that pacing now; Mailbox and Immediate draw as fast as the frame limit
allows, like vanilla's GLFW window.

Fixes #441

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 02:42:22 +02:00
Ludovic Marie 8ca9cda5f6 Pause menu: icon sprites centred and untinted like SpriteIconButton
CenteredIcon draws its 15x15 sprite at x + 20/2 - 15/2 = x + 3 (integer
division), y + 3, with the widget's alpha only: Horizon drew it at +2
and tinted it grey.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 02:26:36 +02:00
Ludovic Marie 9cec0dfb45 World list: hovered rows show vanilla's join arrow, a click on the icon joins
WorldListEntry.extractContent dims a hovered row's icon (0xA0909090) and
draws world_list/join over it, join_highlighted under the pointer;
mouseClicked joins the world when the click lands on the icon.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 02:25:54 +02:00
Ludovic Marie d333780478 Merge pull request #420 from ludovic111/contrib/cull-leaves-387
Optional leaf and entity culling (Online5277's #387, rebased)
2026-10-16 02:13:02 +02:00
Ludovic Marie 964280aa00 Guests on a dedicated server keep their ops-based commands
Allow Commands is the integrated server's setting; a dedicated server's
guests run what their permission level allows (dedicated_server parity).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 01:18:08 +02:00
Ludovic Marie e0b5e25c1a Commands: prune suggestions in the chat only, like the client's tree
Brigadier's getCompletionSuggestions lists every child whatever its
requirement (command_parse compares it at permission 4, 2 and 0); only the
tree the server sends the client is pruned (Commands.sendCommands). The
player's chat now asks client_suggestions, which skips what the player
may not use; guests' ask_server requests keep brigadier's.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 00:42:38 +02:00
Ludovic Marie 71fc3482ba Merge pull request #404 from Online5277/fix/rail-mipmap-cutout
Preserve native sprite mipmaps in mixed-size texture arrays
2026-10-16 00:37:42 +02:00