Uploaded image for project: 'Minecraft (Bedrock codebase)'
  1. Minecraft (Bedrock codebase)
  2. MCPE-177107

Filter "target" in subject dont work correct

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 1.20.41 Hotfix
    • None
    • Unconfirmed
    • Android

      (I used a translator, sorry..)

      The "target" argument in the "subject" filter parameter does not work correctly
      The attached screenshot shows a code that assumes the following work:
      If the mob has a tag and if its target is from the "player" family, then it writes two messages to the chat:
      1)  Is " True" - that is, the conditions were successful
      2)  Is "I - target" message from the target

      But!
      If the mob doesn't have target, then "True" is still sent to the chat
      Although why, if there is haven't target, as well as his family in general

      Further:
      If the mob has a target, then both messages will be successfully sent to the chat
      Regardless of the family, although "player" is specified in the filter

      Steps to Reproduce:

      1.  Create event for mob, with code:
        "filters": {"test": "is_family", "subject": "target", "value": "illager"},
        "sequence": [
        {"run_command": {"command": ["say I have target"]}},
        {"run_command": {"command": ["say Is target"],"target":"target"}}
        ]
        
      1. Spawn mob, with code
      2. Trigger event with mob (can use command /event)
      3. Spawn another mob that can be target of first mob
      4. Trigger event with first mob one more time

      Observed Results:
      If mob hasn't target, then Mob say "I have target".
      If mob has target, then Mob say "I have target" and despite the filter conditions target of Mob will say "Is target"

      Expected Results:
      If mob hasn't target, then nothing should happen
      If mob has target, then Mob say "I have target" and if family of target is illager, then target of Mob will say "Is target"

            Vindicator Vindicator
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: