Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-276333

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Works As Intended
    • None
    • 24w36a
    • Confirmed
    • (Unassigned)

      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.

            Unassigned Unassigned
            Dahesor Dahesor
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: