mezz / JustEnoughItems

Item and Recipe viewing mod for Minecraft
https://www.curseforge.com/minecraft/mc-mods/jei
MIT License
787 stars 306 forks source link

[SOLVED]: Everything breaks with one pipe and a regex. #3781

Closed Barerock closed 1 month ago

Barerock commented 1 month ago

Steps to Reproduce the Bug

Install JEI on a modpack with create or a mod with lots of colored items, like arts and crafts, sleep tight, or supplementaries. Enter world. JEI will duplicate a number of IDs and overwrite the tags on those IDs in the JEI view, sometimes erasing the recipes because of a shared required item losing its tags. For example.

Expected Behavior

I expect JEI to not do this at all. It should use the IDs and tags given to it by the game and registered mods, not generate a new list and overwrite, causing incorrect load order problems and messed up recipes. I'm no programmer, but these errors seem pretty clear cut.

Actual Behavior

I can't view hundreds of recipes in this modpack because JEI screwed up the IDs on 56 items, formerly 1506, and now various metals, dyed items, basic building blocks, etc. are unviewable.

Mod Pack URL (Optional)

No response

Mod Pack Version (Optional)

No response

Extra Notes (Optional)

A-ModList.txt I didn't have this issue at all with REI, but REI has an issue viewing sequenced assembly recipes and a few other types of recipe. Meanwhile JEI just breaks things and I don't understand why. I am using EMI, but Emi says this is out of their hands completely.

latest.log

https://gist.github.com/Barerock/bcd25f83449dbde7e9e3b5ea8f7b740e

Barerock commented 1 month ago

This may have been caused by https://github.com/mezz/JustEnoughItems/issues/3694, I just updated.

Barerock commented 1 month ago

26 warnings, but I still can't craft any metals, stone variants, really anything at all, even wood.

Barerock commented 1 month ago

This is a new thing, I'm going to backdate another mod. I was viewing many of these recipes mere hours ago.

Barerock commented 1 month ago

Only one mod updated today because I haven't had internet for 8 or 9 hours.

Barerock commented 1 month ago

Backdating didn't do anything. I'm perplexed, I have no idea what's wrong and this just happened. Nothing that could do this has been installed, updated, or tinkered with in the slightest. It was working yesterday, the day before that, and all of today until the last 3 hours.

mezz commented 1 month ago

Thanks for the report! Please link to other issues you have opened, like the EMI one, in order to share information. It looks like you have EMI installed, please remove it to narrow down the issue.

JEI does not edit anything in the game, so it certainly shouldn't be changing tags somehow. I think you may be mislead by something you're seeing, but I do not really understand what the problem you're seeing is exactly.

I think you will need to narrow down the problem in order to make progress on figuring this out. Try starting from a fresh pack with a few mods and see if you can replicate the problem.

Barerock commented 1 month ago

EMI issue was asked about in their discord. That was my next step, but it might be a few hours because I need to do things irl. JEI is reporting that IDs are being loaded with duplicates, which leads me to believe that these duplicates are overwriting tags, which is what some of the errors suggest, especially the calorite one, which cripples the entire ore and metal crafting section. I haven't done anything to change this, so I'm just perplexed by what's happening and why it's been getting worse in stages.

I'll follow up in about 3 hours, test instance will take an annoying amount of time.

Barerock commented 1 month ago

image

Barerock commented 1 month ago

latest.log

mezz commented 1 month ago
[19:01:32] [Thread-55/ERROR]: [EMI] 3 recipes loaded with the same id: supplementaries:tipped_spikes_display.poison

These logs clearly came from EMI, I don't know why you cut it off in your screenshot. Please be systematic about this. I can help you organize your approach but not if you're overlooking information or going on wild tangents. First step is to remove EMI so that we're actually dealing with JEI. Until you do that, this isn't the right place to be reporting issues.

Barerock commented 1 month ago

It's cut off ingame, and EMI doesn't do that. Like you said, JEI doesn't change ingame things, neither does EMI. It's reporting problems and I already talked to the EMI devs

Barerock commented 1 month ago

I have a dedicated test instance I've used for hundreds of compatibility checks, I have the method down, thanks for offering though. I'm going to do that first, and if still issues, I will jump to batch adding every mod with JEI in from the start to see where the issues begin. Shouldn't take more than an hour to do that whole process, but I've gotta go for a couple, hence 3 hour time.

mezz commented 1 month ago

That's fine. This is a place for asynchronous communication, it's not like Discord. I don't need a lot of updates, you can take weeks if you need to. Just let me know when there's something substantive and specific to JEI that you need me to look into, or if you're stuck and want advice.

Barerock commented 1 month ago

I'm documenting for myself and because I have known devs who suck and close inactive issues in seconds of no response or just don't understand an issue. Most don't, but it's frustrating to no end when it happens because it means that issue will stay an issue forever.

So I found the issue that caused all recipes to break; however, all of my metal recipes are still broken, and I know exactly why.

The only difference between these instances is that one is loaded with much larger KJS scripts for removing and remaking a few hundred recipes. The test instance has a version that's only about 150 recipes vs 250~, but the ad_astra stuff is in both, so why would it break? I rewrote a regex section that included a lot of metals, and by commenting it out I resolved this. That regex absolutely should not have touched anything outside it's ID range, but I guess that's what happens when... idk, code shenanigans.

The first problem, everything being broken, was caused by a single pipe ( | ) on a regex that I swear I deleted, but oh well. I will rename and close this. Thanks for being courteous, I was tearing my hair out checking my code, my mods, my updated stuff, and having to do research on a phone for several ours today was mind rending. I even checked if my assets folder had incorrect textures!