#LootJS doesnt work with modded chests from dungeons arise

87 messages · Page 1 of 1 (latest)

delicate halo
#

i made a script using lootjs to change loot tables of some vanilla chests, like nether bridge one
when i create a simple chest using that loot table it works but some mods use the loot tables in a weird way and are just not affected by lootjs at all, i guess they're created before kubejs scripts are loaded, any way to bypass this ?

tough badgeBOT
#

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

delicate halo
#

here's a normal nether bridge chest

#

and here's a dungeons arise one

#

the steel ingot is intended to be unified with my script, and one item is also intended to be removed

#

i have a rei addon that shows every loot table, the dungeons arise one doesnt exist, they're using vanilla nether bridge and just adding more rolls or idk

compact cedar
#

what's your script and logs?

#

??helpyou

balmy solsticeBOT
# compact cedar ??helpyou

╰( ͡° ͜ʖ ͡° )つ──☆:・゚˜”°•.˜”°• 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.

delicate halo
#

the logs are completely fine (no error related to this script)

balmy solsticeBOT
#

Paste version of lootjs.js from @delicate halo

compact cedar
#

still please provide the log, you never know the odds

delicate halo
#

but the script works

tame kiln
delicate halo
#

the chest is modified like it should

#

the issue is, dungeons arise is creating a new loot table based on the one i'm modifying

#

and i think kubejs scripts are executed after the creation of this loot table

delicate halo
#

i'm not a minecraft loot expert but looks like global modifiers isnt related to the issue

#

it's not about modification of a loot table, it's a new one that looks dynamically generated

delicate halo
#

what i get when i try to get global modifiers

#

with the code from the wiki

#

but i think that's completely unrelated to the main issue anyway

tame kiln
#

ehhh modifiers might be a forge thing anyways

delicate halo
#

LOL

#

what i need is a dynamic way to modify the loot tables

tame kiln
#

so, some of the loot tables are based off other loot tables

delicate halo
#

like, every time a loot table is rolled the script is applied

#

is that possible ?

tame kiln
delicate halo
#

mmh, you think this can be datapack-able ?

#

i guess i should just not use kubejs

#

but well even if i can change this i can't fix the issue at all

#

i can't make a copy of the vanilla loot tables, a lot of mods are injecting their loot...

tame kiln
#

you can.... this is really a better question for @echo stump though, probably still asleep if my time zone calcs are correct

delicate halo
#

you can what

tame kiln
#

datapack

delicate halo
#

yeah but then how can i fix my issue

#

i don't want to change the loot tables used

tame kiln
#

wait for a lytho answer, or someone with better loot table knowledge, I'm guessing the way lootjs modifies tables it isn't catching nested loot tables like that

delicate halo
#

looks like the script is currently applied once, and because kubejs loads after everything it just doesnt work with loot tables created that way

echo stump
#

lootjs does not modify loot tables directly. It just executes the modifiers when loot is rolled.

#

Afaik they just use default loot table and nothing special. So lootjs should just work

#

I can't find any reroll stuff in their code

delicate halo
#

idk if it's about rerelling but the loot tables are definitely not normal ones

#

they have like always chests full of loot

delicate halo
#

looks like they're adding new items to the loot tables as well

#

so why is lootjs not doing anything on their loot tables but works with the normal ones

#

also i'm using fabric, and looks like people tried to help me like if it was forge lootjs

echo stump
#

Still. LootJS does not operate on loot tables directly. Minecraft will roll loot (When mods use the loot context system from minecraft, which they should). Then there is a list of items and before the items will spawn in chests or in the world, lootjs inject there to modify this list.

#

How does your script exactly looks like where you try to modify one of their table?

delicate halo
balmy solsticeBOT
#

Paste version of lootjs.js from @delicate halo

echo stump
#

But whats the case then with WDA? hmm

delicate halo
#

the changes arent applied in the wda chests, that's all

delicate halo
#

and i unified it with modern industrialization in the script

#

i'm using roughly enough loot tables, the wda chests arent mentioned at all

#

they're based on the vanilla ones, i'm not sure if i get how they work

echo stump
#

But you say you modify vanilla tables

#

WDA has own tables like you linked

delicate halo
#

they have own tables based on vanilla ones

#

the steel ingot is injected by tech reborn in the vanilla table

#

there's no way i can fix this by changing the wda chest

#

it's basically the vanilla table with more loot and new items

echo stump
#

ofc you can. Because as I said. LootJS operates on the dropping loot

#

not on loot tables

delicate halo
#

how can i fix this so

echo stump
#

use WDA tables

delicate halo
#

alright

#

i'll try to use the path from the mod

#

because the wda loot tables don't exist in roughly enough loot tables, i thought they were dynamically created

echo stump
#
  1. Player opens a chest, kills an entity, destroy a block etc.
  2. Minecraft will create a loot context and will roll the table which is bound to the 1. action
  3. A list of items will be created
  4. <- LootJS injects here to let you modify the list
  5. Minecraft spawns the item
echo stump
delicate halo
#

so if i understand right lootjs isnt intended to change loot in a x loot table based on a y loot table if you change y ?

echo stump
#

No. The next bigger LootJS update will also let you modify loot tables directly

delicate halo
#

rel is just not relevant to find the wda chests

delicate halo
#

alright i unified the loot chests now