-
Notifications
You must be signed in to change notification settings - Fork 6
Description
Checklist
- I am requesting a new feature or a functional improvement.
- I am not requesting an update or backport.
- This feature does not exist on the latest version.
- This feature has not already been requested.
Feature Description
Currently, using vanilla mode allows the repeated execution of predefined commands, which can maintain the execution state of a command while a key is being held down. However, the mod currently does not capture the moment when the key input is released, making it difficult to perfectly implement features that should be activated by pressing a key and promptly deactivated when the key input ends.
Use Case
If this feature could be implemented, it would perfectly enable command functionalities like this: bind the sneak key to /data merge entity @s {Attributes:[{Base:0.2d,Name:"forge:entity_gravity"}]}, and bind the release of the sneak key to /data merge entity @s {Attributes:[{Base:0.08d,Name:"forge:entity_gravity"}]}.
This would allow the player to fall faster while holding the sneak key in midair—essentially creating a gravity boots effect. When the player no longer wants to fall quickly, simply releasing the sneak key would instantly restore the normal gravity attribute.
Of course, this is just a basic example. If commands or even command sets could automatically execute when key input ends, it would serve as a perfect replacement for complex command block chains.
Minecraft Version (if not latest)
1.20.1