sys.listenForEvent("minecraft:block_interacted_with", function (interactData) {
sendMessage("interacted!!!");
});
As above, I added the monitoring of the "minecraft:block_interacted_with" event in the script engine (sendMessage method is used to output information in the message bar, and the method works normally after inspection), but when I trigger the event in the game (right-click a block), the script engine did not send the "interacted!!" message.
This bug already existed at 1.16.0. At the time, I was not very sure whether the problem is caused by your studio changed the event identifier. However, because I have not found the relevant changes in the newly released document, so I guess it should be a bug, hope to fix it as soon as possible, if it is not a bug, I hope your studio can improve the document, thank you~
Linked issues
is duplicated by 2
Comments 5
Oh I got it, the event can only be triggered by using function block. So there is no event can listen for player right-click some normal block now😞. It's really inconvenient. Can you add some event to make up for this?
Thank you for your report!
However, this issue has been temporarily closed as Awaiting Response
To make your bug report as effective as possible, please try and include the following 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
This is definitely a valid issue as refenced by how many times this issue has been repeatedly posted then subsequently shutdown (MCPE-96911, MCPE-92640, MCPE-92640, & this one).
Format stuff
Steps to Reproduce:
1. Use code as posted bellow in server.js in behaviorpack
var serverSystem = server.registerSystem(0, 0);
serverSystem.initialize = function () {
serverSystem.listenForEvent("minecraft:block_interacted_with", eventData => {
sendMessage("test");
})
}
function sendMessage(message) {
let chatEventData = serverSystem.createEventData("minecraft:display_chat_event");
chatEventData.data.message = message;
serverSystem.broadcastEvent("minecraft:display_chat_event", chatEventData);
}
2. Add pack to world
3. Click non interactive block with empty hand / tool
Observed Results:
Nothing happens aka nothing is displayed in chat. Interestingly this works with interactive blocks like chests however didn't work with a crafting table.
Expected Results:
It should print "test" as a message in chat
Hope to solve this issue quickly😞