SokyranTheDragon / Minor-Integrations-and-Additions-MIA-

A Minecraft modification adding integrations between mods and some small features
https://www.curseforge.com/minecraft/mc-mods/minor-integrations-and-additions-mia
MIT License
7 stars 3 forks source link

Thaumcraft treasure bag JEI screen does not respect loot bag modifications via crafttweaker #36

Open Luke616 opened 2 years ago

Luke616 commented 2 years ago

Hello,

Having an issue where thaumcraft treasure bags do not display accurate contents in JEI due to them displaying default contents. Treasure bag JEI page should show corrected loot when it is modified using crafttweaker as such:

For example, the following script will remove potions and gold nuggets from all tiers [0=common, 1=uncommon, 2=rare] treasure bags, and add golden apples at a rare chance. These changes are not reflected in JEI, which still shows the potions and nuggets and will not show the golden apple.

mods.thaumcraft.LootBag.removeLoot(<minecraft:potion>, [0,1,2]);
mods.thaumcraft.LootBag.removeLoot(<minecraft:splash_potion>, [0,1,2]);
mods.thaumcraft.LootBag.removeLoot(<minecraft:lingering_potion>, [0,1,2]);
mods.thaumcraft.LootBag.removeLoot(<minecraft:gold_nugget>, [0,1,2]);
mods.thaumcraft.LootBag.addLoot(<minecraft:golden_apple>%200, [0,1,2]);

Versions used: Forge 14.23.5.2860 MIA 0.2.2a Thaumcraft 6.1.BETA26

Thank you and best regards, Luke616

SokyranTheDragon commented 2 years ago

My assumption is that CraftTweaker makes the changes after I register the loot bags in JEI. I may try looking into it in the future, but if I can fix it will depend on how JEI reacts to those being registered later.