-
Bug
-
Resolution: Incomplete
-
None
-
1.18.31, 1.19.11 Hotfix
-
None
-
Unconfirmed
-
Windows
I have tried to use "query.count(query.get_nearby_entities(5, 'minecraft:cow')) > 0" as a condition to detect entities from a custom block and thus, for example, change the value of a property but it does not work.
Steps to Reproduce:
When using it as a condition to change properties of a custom block.
For example as condition of an event or condition of a "minecraft:on_interact".
{ "condition": "query.count(query.get_nearby_entities(5, 'minecraft:cow')) > 0", "set_block_property": { "mdt:nearby_cow": true } }
In this example, I'm trying to change a property to true in case a cow is within 5 blocks, but even if this is true, the property is still false.
Observed Results:
Although the specified entities are within the specified distance, it does not return the number of entities found.
Expected Results:
Should return the number of entities of that type in that radius.