mojira.dev
MCPE-102533

query.get_nearby_entities not working from block

the query 'query.get_nearby_entities' is not working when called inside a block permutation.

For example, the query below always returns false (even when player is standing in a radius of less than 4 blocks):
query.count(query.get_nearby_entities(4, 'minecraft:player')) > 0

PS: I've tested the query from an animation controller on the player and the query does work, just not on blocks. So I'm sure its just an issue when using on blocks.

Comments 6

I can confirm this happened to me as well while using it in a custom block

Well apparently it doesnt always return false. It always returns 0. When I tested if it was equal to 0, it returned true

@Jack Valdez 0 is the same as false, so yes if you test if it is equal to 0 it returns true because it is false.

Thank you for your report! And sorry for the late response.
However, this issue has been temporarily closed as Awaiting Response.

Is this still an issue in the latest version? If so, can you add it to the affected versions?

Please try and use the following template:

Steps to Reproduce:
1.
2.
3.
...

Observed Results:
(Briefly describe what happens)

Expected Results:
(Briefly describe what should happen)

If your ticket does not look like the example given here, then it's likely to be closed as incomplete.

This ticket will automatically reopen when you reply.

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 Incomplete. 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.

For any account or purchasing related issues, please contact Minecraft Customer Support directly, as we cannot assist with those here at the bug tracker.

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

Stijn Defour

(Unassigned)

Unconfirmed

Windows

1.16.100.59 Beta

Retrieved