mojira.dev
MCPE-47577

distance_to_nearest_player filter does not work

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
        }
      }

Attachments

Comments 5

Can you attach the entire entity file please?

(tentatively, I believe your issue is that the numbers shouldn't be in quotes)

Can you attach the entire entity file please?

(tentatively, I believe your issue is that the numbers shouldn't be in quotes)

Cleaning up old tickets: This ticket had been set to 'Awaiting Response', but has not received a response from the reporter (~3 months+) so is being closed as Cannot Reproduce. If you feel this is still a valid issue then please comment, or create a new ticket following the Issue Guidelines which includes steps to reproduce the problem.

Quick Links:
📓 Issue Guidelines – 💬 Mojang Support – 📧 Suggestions – 📖 Minecraft Wiki

Cleaning up old tickets: This ticket had been set to 'Awaiting Response', but has not received a response from the reporter (~3 months+) so is being closed as Cannot Reproduce. If you feel this is still a valid issue then please comment, or create a new ticket following the Issue Guidelines which includes steps to reproduce the problem.

Quick Links:
📓 Issue Guidelines – 💬 Mojang Support – 📧 Suggestions – 📖 Minecraft Wiki

dordsor

(Unassigned)

Unconfirmed

Windows 10 Mobile

Windows 10

1.12.0.13 Beta

Retrieved