#Native variant type conversion failed
1 messages · Page 1 of 1 (latest)
I translate the error into English: incorrect type of argument number 1, you need to specify string or ItemType, line 200
I realized what's wrong
new mc.ItemStack(blockInfo ? (blockInfo.item, blockInfo.itemPerLevel) : (currentBlock.typeId, 1));
JS treats this as 1 argument, not two. You need to write like this:
let item = blockInfo ? new mc.ItemStack(blockInfo.item, blockInfo.itemPerLevel) : currentBlock.getItemStack()