#loot_tables script no longer working

12 messages · Page 1 of 1 (latest)

slow sentinel
#

onEvent('block.loot_tables', event => {
// Override zombie loot table that will drop 5 of either carrot (25% chance) or apple (75% chance)
event.build('minecraft:podzol', table => { // Build loot table manually
table.pool(pool => {
pool.rolls = 2
pool.survivesExplosion()
pool.addCondition({"condition": "minecraft:random_chance","chance": 0.2})
pool.addItem('minecraft:gravel')
})
})
})
used to work, now it gives kubejs error

neon sparrowBOT
#

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

lapis lavaBOT
#

You can write your code in a codeblock by typing it between the codeblock delimiters:

```js
onEvent('recipes', e => {
e.smelting('minecraft:glass', '#forge:sand').xp(.1)
})
```

As an example, :arrow_up: will look like this:

onEvent('recipes', e => {
  e.smelting('minecraft:glass', '#forge:sand').xp(.1)
})
#

╰( ͡° ͜ʖ ͡° )つ──☆:・゚˜”°•.˜”°• Many Help •°”˜.•°”˜*
Please provide a description of your issue with as much detail as possible. If you have an issue with a script provide the script. Explain what you can see happening and what you expect to happen. Be specific!

Tell us what is happening, we already know it "doesn't work".
Avoid using words like "it", tell us exactly what "it" is.
Don't assume anyone knows what you are talking about, be specific.

Provide screenshots or video if possible.
Provide the log.

lapis lavaBOT
#

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.

slow sentinel
#

it seems as if the lootjs mod may have removed that part of the api

#

although it is difficult as there is not api reference

vagrant python
#

when you say 'used to work' do you mean a previous version of kjs? some of the underlying things may have changed between versions, but lootjs itself doesn't affect that. Lootjs is suggested by everyone because it is more fleshed out, documented, and full featured compared to the stock loot events in kjs itself

echo lion
#

And yeah 1.18 docs apply to 1.19

#

Or whatever version you’re using

neon sparrowBOT
#

@slow sentinel Unresolved thread still hasn't been closed! If your question was answered, please close this post with </ticket close:1054771505520717835> command!