Script for adding loot to an entity doesn't work
Chickenkarim2009 opened this issue ยท 1 comments
Version
lootjs-forge-1.19.2-2.9.0.jar modpack: GLF 2 Rising Skies 0.0.0.4
Describe the bug!
I wanted to add a mobdrop to the Wither Skeleton but my script keeps failing.
Here's the script:
LootJS.modifiers((event) => {
// by id
event
.addLootTableModifier("minecraft:entities/wither_skeleton")
.randomChance(0.2)
.addLoot("mysticalagriculture:soul_dust");
Crash Report
No response
Log
https://www.dropbox.com/scl/fi/mioie1f10v9nrks5p4554/server.log?rlkey=ocw2h0i40fgy5cxij3deq5msh&dl=0
Additional Context
Yes
Modifications
No response
Did the issue happen in singleplayer or on a server?
Singleplayer
You have syntax issues in your script which are mentioned in your log.
If you need help, join the Discord.