The goal: Modify entity loot tables for multiple mobs.
The code:
event
.addEntityLootModifier("minecraft:piglin_brute")
.addLoot(LootEntry.of("dotcoinmod:copper_coin").limitCount([2, 6]))
.randomChance(0.1)
.addLoot("dotcoinmod:iron_coin")
})
LootJS.modifiers((event) => {
event
.addEntityLootModifier("minecraft:ender_dragon")
.addWeightedLoot([1, 1], [
LootEntry.of("dotcoinmod:gold_coin").withChance(80),
LootEntry.of("dotcoinmod:platinum_coin").withChance(20)])
})```
The problem: This isn't working, and neither is combining both entries under one event.
This is definitely 101-level problems but my brain has melted after crunching for the past month on other code stuff and I have no idea what simple thing I'm supposed to do here 😅
