WanionCane / UniDict

a mod about unifying all the things.
https://www.curseforge.com/minecraft/mc-mods/unidict
Mozilla Public License 2.0
39 stars 16 forks source link

UniDict removing some shapeless recipes from TE #181

Closed ElektroKill closed 3 years ago

ElektroKill commented 4 years ago

Hello, whilst developing new additions to UniDict for version 3.0.0, I noticed that some recipes from ThermalExpansion were being removed by UniDict for no apparent reason.

Mods: UniDict(my fork, tested with 2.9.9 too), WanionLib(2.5), Latest version of CoFHCore, CoFHWorld, RedstoneFlux, JEI, Thermal Expansion, Thermal Foundation, CodeChicken Lib

No UniDict: image

After UniDict: image

It happens with other ores too, not just copper.

EDIT: After looking at some other ores, it doesn’t happen to all of them but I can’t find a pattern.

I know you don't really develop this mod anymore, but if there is any help you can provide to me in fixing this I would be grateful. I am quite new to the UniDict codebase and Minecraft modding in general so any help would be appreciated :)

Thanks in advance!

ElektroKill commented 3 years ago

@WanionCane Is there a way you help me out in diagnosing this issue? I can’t seem to find the cause of this problem. If you could guide me where to look and what may cause this weird thing to occur that would be great! I also figured out that if I add more mods more recipes for ores disappear.

WanionCane commented 3 years ago

@ElektroKill I took a look long ago, but I couldn't find why =/ btw, thanks a lot for what you're doing for UniDict! =D

ElektroKill commented 3 years ago

I am happy you like my contributions, I will continue working on improvements and mainly fixing this issue since it seems to be an important one!

ElektroKill commented 3 years ago

After two more hours of headbanging, I was still unable to figure out the cause of this problem. I have however collected a list of all the TE ores affected: Copper, Tin, Nickel, Iridium. I don't know if this is related but it seams that the TE crafting recipes are added in a "random order".

image image

This issue is really messing with me.

ElektroKill commented 3 years ago

@WanionCane After some more tinkering, I've managed to reverse the results. The ores that previously were missing recipes now have them and the ones that had now lost them. (Except nickel which seams to be broken always) :O

This is what I did: https://github.com/ElektroKill/UniDict/commit/24484730f070bdfb2df74d11bc0a247d6de07f17

This is definitely caused by some bad comparisons.

If this gives you any ideas on other things I should try, or how to fix it.

P.S. I have no idea what I am doing with this issue.

ElektroKill commented 3 years ago

@WanionCane What I am about to say is probably very very dumb and not good programming, I've changed the map type to TreeMap and it seems to be working. As I am not a very experienced Java developer, I cannot say if this fix is proper or anything of that sort. If you have any doubts please tell me.