world.beforeEvents.itemUseOn.subscribe((evd) => {
const { source: player, block, itemStack: itemUsed } = evd;
if (!itemUsed) return;
if (flint.includes(itemUsed.typeId)) {
if (block.permutation.matches("ecbl_bs:brazier")) {
const blockPosition = block.location;
system.run(() => {
player.runCommand(`setblock ${block.location.x} ${block.location.y} ${block.location.z} ecbl_bs:brazier["ecbl_bs:light"=1]`);
});
}
}
});```
#why is my script giving syntax error in the command? is it correct
1 messages · Page 1 of 1 (latest)
using command in chat works, and the block permutation is placed correctly, I just needed to put it in the script but it is giving this error, without using [ ] it works
Replace = with :
-# Yes, I know it doesn't make sense, but it mostly work
...or just use native methods
Funny design choice
*Quite inconsistent design choice