Mojira Archive
MCPE-87987

Addons with javascript crash and not working well

In previous versions, the call back from the server event "minecraft: block_interacted_with" worked fine, apart from never causing a crash. But since 1.16.0 this server event no longer works and also the "destroyEntity ()" generates a crash and the same happens with the following example code:


system.listenForEvent("minecraft:entity_use_item", (datosInteract) => {
let jugador = datosInteract.data.entity;
let mano = system.getComponent(jugador, "minecraft:hand_container");
let lel = mano.data[0];
switch (lel.item){ case "minecraft:wooden_hoe": let items = ["uhc:equipo1", "uhc:equipo2", "uhc:equipo3", "uhc:equipo4", "uhc:equipo5"]; let dar_equipo; let borrar = system.createEventData(ejecutarComando); borrar.data.command = "clear @a"; system.broadcastEvent(ejecutarComando, borrar); for(let i = 0; i < 5; i++)\{ dar_equipo = system.createEventData(ejecutarComando); dar_equipo.data.command = "replaceitem entity @a slot.hotbar " + i + " " + items[i]; system.broadcastEvent(ejecutarComando, dar_equipo); };
break;
default:
break;
};
});

PS: The crash does not happen when I only make something show on the screen, even if I execute it within the for loop

Incomplete

Lol lol

2020-06-30, 05:16 AM

2021-03-22, 11:27 AM

2021-03-22, 11:27 AM

1

0

Unconfirmed

1.16.0, 1.16.1

-