#add global loot to all mob drops not working (lootjs)

9 messages · Page 1 of 1 (latest)

lavish turtle
#

i like to add items with lootjs globally to all mob drops and came to this, it has no errors but it is not working:

onEvent('lootjs.modifiers', (event) => {
event.addLootTypeModifier(LootType.ENTITY)
.thenAdd('k_turrets:raw_titanium', { global: true })
.thenAdd('ars_nouveau:glyph_orbit', { global: true });
});

surreal scrollBOT
#

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

steady tree
#

idk where you got .thenAdd from but it's .addLoot(...items) so you can do: .addLoot('k_turrets:raw_titanium', 'ars_nouveau:glyph_orbit')

lavish turtle
#

thanks, i got it from ai bots.

onEvent('lootjs.modifiers', (event) => {
event.addLootTypeModifier(LootType.ENTITY)
.addLoot('k_turrets:raw_titanium', 'ars_nouveau:glyph_orbit');
});

i tested this in a new world, no errors but still no drops ;/

steady tree
#

the event name is just lootjs

#
onEvent('lootjs', (event) => {
  event.addLootTypeModifier(LootType.ENTITY)    
    .addLoot('k_turrets:raw_titanium', 'ars_nouveau:glyph_orbit')
})
#

also

heady lindenBOT
#

NEVER use any AI to generate KubeJS code. They currently know very little about it, and what they do know is often outdated or false. You can instead look at the KubeJS wiki or ask for help in #1047320998199955458.

lavish turtle
#

thx