I'm trying to modify the loot tables of IE chests in villages so that the ingots/nuggets match the ones I'm using from other mods, instead of defaulting to the IE ones. I've found the json file on their github responsible for the loot table (https://github.com/BluSunrize/ImmersiveEngineering/blob/1.18.2/src/generated/resources/data/immersiveengineering/loot_tables/chests/engineers_house.json), and I've seen the wiki entry on loot table modification, but I don't see an event.custom() command similar to the one for recipes shown. Is modifying the loot table possible similar to how custom recipes can be edited with event.custom(), or do I need to use an alternative method?
#Changing IE chest loot tables?
5 messages · Page 1 of 1 (latest)
Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!
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.
you can do a straight datapack overwrite by putting it in the same location, but in the kubejs/data folder instead. So for that one kubejs/data/immersiveengineering/loot_tables/chests/engineers_house.json or you can also use the ServerEvents.highPriorityAssets(event => {}) event which the old version of the event is documented here https://mods.latvian.dev/books/kubejs-legacy/page/datapack-load-events which would be something like
ServerEvents.highPriorityAssets(event => {
event.addJson('immersiveengineering:loot_tables/chests/engineers_house', {new json here})
})
thank you for the advice, I've decided to go with the datapack overwrite method. Do you know if there's a way of spawning in a loot chest to test it's working properly, or do I just need to find them in the world and check that way?