#help changing ore drops using LootJS

5 messages · Page 1 of 1 (latest)

wheat siren
#

trying to figure out how to change ore drops from raw ore to crushed ore from create, similar to in createa&b, using LootJS.

I am not that familiar with javascript or programming in general, and I am lost on what LootJS action I should use to modify the raw ore to be a different item or tag, or if im trying to do this the right way at all

    event
        .addBlockLootModifier('minecraft:iron_ore')
        .modifyLoot('minecraft:raw_iron', (itemStack) => {
            itemStack.
            return itemStack
        })
});```
terse basinBOT
#

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

sleek valve
#

Try this js LootJS.modifiers((event) => { event .addBlockLootModifier(/^minecraft:.*iron_ore$/) .replaceLoot('minecraft:raw_iron', 'create:crushed_raw_iron') .randomChanceWithEnchantment('minecraft:fortune', [0, 0.15, 0.3, 0.6]) .addLoot('create:crushed_raw_iron'); }); this should replace the loot for normal and deepslate iron ore and add a extra drop (with chance) for fortune tools.

wheat siren
#

that worked! thanks

#

I completely missed the replaceloot action on the lootjs wiki like a dumb dumb