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

distance_to_nearest_player filter does not work

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • None
    • 1.12.0.13 Beta
    • None
    • Unconfirmed
    • Windows 10 Mobile

      The following behaviour code for a custom entity results in the behaviour as shown in the attached video. The distance_to_nearest_player filter returns true regardless of the operator and value. As well as the <= and > operators, I attempted to use most other operators that should return false, but to no success.

          "component_groups": {
            "cyd:no_player": {
              "minecraft:environment_sensor": [{
                "filters": {
                  "test": "distance_to_nearest_player",
                  "operator": "<=",
                  "value": "5.0"
                },
                "event": "player"
              }],
              "minecraft:scale": {
                "value": 1
              }
            },
            "cyd:player": {
              "minecraft:environment_sensor": [{
                "filters": {
                  "test": "distance_to_nearest_player",
                  "operator": ">",
                  "value": "5.0"
                },
                "event": "no_player"
              }],
              "minecraft:scale": {
                "value": 3
              }
            }
      

            dordsor21 dordsor
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: