#(lootJs help) removing item from chest generated loot

14 messages · Page 1 of 1 (latest)

hushed whale
#

im sure this is really simple but ive searched and searched through the lootjs wiki and i cant seem to find a simple code that removes an item from the chest pool
very new to kubejs and java stuff, this is all i got so far
event.addLootTableModifier("minecraft:chests").removeLoot("cardiac:life_bottle")

brazen hornetBOT
#

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

limpid pecan
#

Same *about loot knowledge
i want to know how diamonds remove from lootchests or make this very rare

quick apex
#

this should remove a item from all chests:

LootJS.modifiers((event) => {
  event
    .addLootTableModifier(/^minecraft:chests\/.*/)
    .removeLoot("cardiac:life_bottle");
});

but only in not already generated chuncks

frank ingot
#
LootJS.modifiers(event =>{
    event.addLootTypeModifier(LootType.CHEST)
    .removeLoot(Ingredient.of(['cardiac:life_bottle','minecraft:diamond']))
})
#

beat me to it lol

leaden torrent
#

or would a datapack work?

#

like this for example "kubejs/data/farmersdelight/loottables/chests?

quick apex
#

You can do this with lootjs too you don't need to do this via a datapack

leaden torrent
#

and can u remove enchanted items?

leaden torrent
#

@quick apex How do i remove enchanted books from all loot tables

#

and enchanted items