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 ?
#LootJS doesnt work with modded chests from dungeons arise
87 messages · Page 1 of 1 (latest)
Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!
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
╰( ͡° ͜ʖ ͡° )つ──☆:・゚˜”°•.˜”°• 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.
the logs are completely fine (no error related to this script)
here's the script if you need it
Paste version of lootjs.js from @delicate halo
still please provide the log, you never know the odds
but the script works
did you check the global modifiers?
https://github.com/AlmostReliable/lootjs/wiki/1.18.2-Event#getglobalmodifiers
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
that looks interesting
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
[ERR ] Error occurred while handling event 'lootjs': TypeError: Cannot find function getGlobalModifiers in object com.almostreliable.lootjs.fabric.kubejs.LootModificationFabricEventJS@37c5a975. (server_scripts:lootjs.js#10)
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
ehhh modifiers might be a forge thing anyways
so, some of the loot tables are based off other loot tables
yes
https://github.com/Aureljz/WhenDungeonsArise--Fabric/blob/master/src/main/resources/data/dungeons_arise/loot_tables/chests/aviary/aviary_normal.json
look at the very bottom
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...
you can.... this is really a better question for @echo stump though, probably still asleep if my time zone calcs are correct
you can what
datapack
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
what i need is this
looks like the script is currently applied once, and because kubejs loads after everything it just doesnt work with loot tables created that way
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
hey
idk if it's about rerelling but the loot tables are definitely not normal ones
they have like always chests full of loot
look at this
someone mentioned this too (i wasnt aware there was a repo for this mod)
https://github.com/Aureljz/WhenDungeonsArise--Fabric/blob/master/src/main/resources/data/dungeons_arise/loot_tables/chests/aviary/aviary_normal.json
GitHub
Contribute to Aureljz/WhenDungeonsArise--Fabric development by creating an account on GitHub.
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
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?
i'm modifying the vanilla loot tables
Paste version of lootjs.js from @delicate halo
But whats the case then with WDA? 
the changes arent applied in the wda chests, that's all
look at this, there's a steel ingot from tech reborn
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
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
ofc you can. Because as I said. LootJS operates on the dropping loot
not on loot tables
how can i fix this so
use WDA tables
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
- Player opens a chest, kills an entity, destroy a block etc.
- Minecraft will create a loot context and will roll the table which is bound to the 1. action
- A list of items will be created
- <- LootJS injects here to let you modify the list
- Minecraft spawns the item
Not sure how REL gets the information. Maybe people has to integrate it
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 ?
No. The next bigger LootJS update will also let you modify loot tables directly
i was just dumb, there's nothng dynamically generated here
rel is just not relevant to find the wda chests
alright i unified the loot chests now