Skip to content

When using vanilla mode, execute an additional command as a finishing action after ending the key input #31

@Mufish-12138

Description

@Mufish-12138

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    P/lowPriority: Low, not time-sensitiveT/additionType: New feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions