mojira.dev
MCPE-48921

[Scripting Docs] some examples need to be updated

the broadcastEvent(EventIdentifier, EventData) 's 2nd argument only accept object in 1.12, but all related examples are not been updated for this change.. (Just search `broadcastEvent` in the document)

for example:

this.broadcastEvent("minecraft:display_chat_event", "Pick at x:" + eventData.position.x + " y:" + eventData.position.y + " z:" + eventData.position.z);

need to be rewrited to

const event = this.createEventData("minecraft:display_chat_event");
event.data.message =  "Pick at x:" + eventData.position.x + " y:" + eventData.position.y + " z:" + eventData.position.z;
this.broadcastEvent("minecraft:display_chat_event", event);

 

Comments 3

In 1.13.0.16, the code example for "executeCommand" is still incorrect.

 

Edit: executeCommand still has an incorrect code example in 1.14.0.1 Beta.

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

Zhibin Chen

(Unassigned)

Unconfirmed

Multiple

1.12.0

Retrieved