Files
horizon-airdef/crates/horizon-client/src/lib.rs
T
Ludovic Marie d75ad778e3 Read the physical Shift keys in container screens and drop a stack clicked outside
Quick move, the recipe book's place-all, its search box and the hold-Shift
tooltips read self.keys, which holds remapped and toggled keys: with toggle
sneak, a Left Shift press behind a screen is dropped by the sneak mapping and
sync_toggle then removes ShiftLeft. Vanilla reads the event's own modifiers
(InputWithModifiers.hasShiftDown) or Screen.hasShiftDown: the physical keys.
Track them in physical_keys and read them through has_shift_down.

Clicking outside the window did nothing. AbstractContainerScreen.mouseClicked
sends slot -999 when hasClickedOutside (AbstractRecipeBookScreen's rule when
the screen has a book): a held stack starts a quick craft drag whose release
sends PICKUP -999, which AbstractContainerMenu.doClick turns into a drop of
the stack (left) or one item (right), thrown from the hand with a swing. The
mouse handling is now horizon_client::container_screen, checked against the
real screens by tools/test_container_screen_parity.py; servers get the same
ContainerClick.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 15:31:49 +02:00

141 lines
2.7 KiB
Rust

//! Horizon native client: resources, world streaming, rendering and the
//! bindings between the validated simulation pieces and the game loop.
#![forbid(unsafe_code)]
pub mod advancements;
pub mod ambience;
pub mod animate_tick;
pub mod assets;
pub mod atlas_sources;
pub mod attack_strength;
pub mod attribute_updates;
pub mod audio;
pub mod auto_jump;
pub mod banner;
pub mod biome;
pub mod block_entity_anim;
pub mod block_entity_nbt;
pub mod block_entity_render;
pub mod block_transform;
pub mod blocks;
pub mod border_render;
pub mod bossbar;
pub mod breaking;
pub mod brewing;
pub mod camera;
pub mod cauldron;
pub mod chat;
pub mod chunk;
pub mod clock;
pub mod clouds;
pub mod collisions;
pub mod command;
pub mod command_storage;
pub mod component;
pub mod container_screen;
pub mod containers;
pub mod control;
pub mod crafting;
pub mod creative;
pub mod data_cmd;
pub mod datapack;
pub mod effects;
pub mod enchant;
pub mod entities;
pub mod entity_nbt;
pub mod environment;
pub mod fast_hash;
pub mod fastutil_order;
pub mod first_person;
pub mod flatgen;
pub mod fog;
pub mod font;
pub mod front;
pub mod gamerules;
pub mod gfx;
pub mod gossip;
pub mod graphics;
pub mod graphics_style;
pub mod graphics_ui;
pub mod health;
pub mod hotbar;
pub mod hud;
pub mod hud_layout;
pub mod hud_overlays;
pub mod hunger;
pub mod input;
pub mod item_data;
pub mod item_render;
pub mod item_tooltip;
pub mod items;
pub mod java_text;
pub mod key_names;
pub mod keybinds;
pub mod keymapping;
pub mod lan;
pub mod landing;
pub mod lang;
pub mod light;
pub mod menu;
pub mod merchant;
pub mod mesher;
pub mod mobs;
pub mod models;
pub mod motion;
pub mod mouse;
pub mod multiplayer;
pub mod music;
pub mod nbt_path;
pub mod net;
pub mod options_file;
pub mod options_fixes;
pub mod options_horizon;
pub mod options_ui;
pub mod pack_screen;
pub mod packs;
pub mod particles;
pub mod patrol;
pub mod perf_overlay;
pub mod pose;
pub mod post;
pub mod projectiles;
pub mod raid;
pub mod random_sequences;
pub mod recipe_book;
pub mod recipe_book_screen;
pub mod save;
pub mod scoreboard;
pub mod scoreboard_cmd;
pub mod screen_draw;
pub mod screen_effects;
pub mod screen_layout;
pub mod sculk;
pub mod server;
pub mod settings;
pub mod shadows;
pub mod signs;
pub mod skins;
pub mod snbt;
pub mod sound_engine;
pub mod sound_events;
pub mod spans;
pub mod sprint;
pub mod sprites;
pub mod stations;
pub mod stopwatches;
pub mod streaming;
pub mod structure_blocks;
pub mod tab_list;
pub mod testgen;
pub mod text;
pub mod title;
pub mod ui;
pub mod ui_theme;
pub mod vanillagen;
pub mod weather;
pub mod widgets;
pub mod window;
pub mod world;
pub mod worldborder;
pub mod zip;
pub type Result<T> = std::result::Result<T, Box<dyn std::error::Error>>;