mojira.dev
MCPE-63269

Scripting: Getting entities from component and component groups

I have started playing around with Scripting in the Bedrock edition recently.

Currently, I am trying to track arrows using filtered queries. The [example in the documentation|https://minecraft.gamepedia.com/Bedrock_Edition_scripting_documentation#addFilterToQuery.28Query.2C_ComponentIdentifier.29] works great.

 

However I am attempting to execute this query:

 

let arrow_query = {};
server.initialize = function() {
    arrow_query = this.registerQuery();
    // First attempted "minecraft:player_arrow" with same result
    this.addFilterToQuery(arrow_query, "minecraft:projectile");
}

server.update = function() {
    let arrows = this.getEntitiesFromQuery(arrow_query);
}

In the game text chat, the same message appears multiple times per tick:

"Script Warning: Something went wrong..."

[media]

I do not believe that there is anything wrong with my query, and I thought that the query worked with component groups as well. Overall I'm not too sure what the issue is here due to the minimal error logging available at the moment.

Attachments

Comments 3

I see now that I am only able to query components listed under the server events in the documentation 😞

 

Thank you for your report!
However, this issue has been temporarily resolved as Awaiting Response

Is this still an issue in the latest version?

If it is, please be sure to include steps to reproduce the problem:

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.

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

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

Adam Grady

(Unassigned)

Unconfirmed

Windows

Windows 10.0.18362 Build 18362

1.14.30 Hotfix

Retrieved