Allow servers to declare custom keymaps and provide the client with a screen where they can assign the command to the desired key. We server devs are always limited to only interactions like LEFT/RIGHT CLICK and SNEAK to make interactions in the game or with inventory items.
It would be ABSURDLY great if we could declare keys and send them to the client, so we would have a variety of keymaps that could be used.
Example: Battle minigame, character can have 3 skills, usually we would do it like this: Assign an item with texture and place it in the hotbar, but during the execution of the skill the player has to interrupt the combat, and to activate the skill, select the item, click on it. This is sometimes not so cool.
Especially in more complex minigames... So my suggestion would be for the server to send a clientbound packet `minecraft:declare_custom_keys` with the keymap ID (unique identifier), friendly name (or localized, or raw text) and keycode (virtual keys) with default key.
And the client can modify this in the settings. And client dispatch serverbound packet `minecraft:key_down` with keymap ID (previous declared and sent to client) with extra info, about modifiers (CTRL, SHIFT or ALT) pressed (bit flags) and client-to-server packet `minecraft:key_up` so we can track when player started/finished holding that key.
This would be an exclusive feature of Java Edition, because there are already ways to do it in Berdock. And in Java Edition only with mods, and making the player install a mod just for this makes no sense.
Please sign in to leave a comment.
0 Comments