#Grass varied drops with varied rarities using a tool (ID)

6 messages · Page 1 of 1 (latest)

leaden pine
#

I’m trying to make it so if I break grass with any forge knife, it drops different seeds and crops with varying rarities. Would this be correct? And how do I keep adding more drops with a different rarity to the script?

LootJS.modifiers((event) => {
    event
        .addBlockLootModifier("minecraft:grass")
        .randomChance(0.4)
        .matchMainHand(Item.of("forge:tools/knife"))
        .addLoot("minecraft:potato");
})```
kindred talonBOT
#

Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!

solid patrolBOT
#

LootJS is an addon for KubeJS that allows modifying loot from all sources dynamically (much nicer than loot tables)!
It also supports removing loot added by mods, unlike KubeJS' current loot table events.

bitter elm
#

I believe most of that is covered in the wiki

#

Just use with chance on the loot item instead of adding a chance to the entire modifier