#Replacing the loot received when player does popResource/popItem

3 messages · Page 1 of 1 (latest)

plain sedge
#

I'm using LootJS to hide/replace any Simple Farming simplefarming:blueberries gets replaced by fruitsdelight:blueberry. I've made it work for breaking a blueberry bush if it's ready to harvest but I can't figure out how to replace the simplefarming:blueberries entry in whatever loot table gets used when a Player right clicks (popResource or popItem I assume) on a ripe blueberry bush.

The same issue applies to trees as well.

I've tried the following but only the Block Loot Modifier works and only if I break the block

LootJS.modifiers((event) => {
    event.addBlockLootModifier("simplefarming:blueberry_bush")
    .replaceLoot('simplefarming:blueberry_bush', 'fruitsdelight:blueberry_bush')
    .replaceLoot('simplefarming:blueberries', 'fruitsdelight:blueberry');

    event.addLootTableModifier(LootType.BLOCK, LootType.CHEST, LootType.ENTITY, LootType.FISHING, LootType.GIFT, LootType.PIGLIN_BARTER, LootType.UNKNOWN)
    .replaceLoot('simplefarming:blueberries', 'fruitsdelight:blueberry')
    .replaceLoot('simplefarming:rice', 'farmersdelight:rice_panicle')
    .replaceLoot('simplefarming:rice_seeds', 'farmersdelight:rice');
})```
wise lynxBOT
#

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

plain sedge
#

Found out that the loot is hard coded