mojira.dev
MC-276333

The player input predicate does not detect player input when inside a UI

The new field input can detect "which movement keys the player is pressing", quoting the official release note. 

However it does not work with players looking at UI, like inventory. I do not know if this is intended. but it says "which keys is pressing" and it suggests that it should always work when the key is being pressed.

Steps To Reproduce:

  1. Run the following command in a repeating command block:

    execute as @a at @s if predicate { "condition": "entity_properties", "entity": "this", "predicate": { "type_specific": { "type": "player", "input": { "right": true } } }} run say detected!
  2. Open inventory

  3. Press d, or the key that moves you to the right.

Expected Result:

The input would be detected inside the GUI.

Observed Result:

Nothing is detected, no say command is output.

Comments 1

Thank you for your report!
After consideration, the issue is being closed as Working as Intended.

Please note, that mechanics of the game may change between updates.
Things such as graphics, sounds, world creation, biomes, redstone, villagers, and animals may not work the same in current versions.

Full Version HistorySnapshot Version HistoryThe official Minecraft feedback site

Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki

Dahesor

(Unassigned)

Confirmed

(Unassigned)

input, predicate

24w36a

Retrieved