Hipposgrumm / armor-trims

2 stars 1 forks source link

JEI Plugin is still very unoptimized. #6

Closed 3pical closed 1 year ago

3pical commented 1 year ago

Having both Armor Trims and JEI installed causes the world not to load.

Minecraft Version: 1.19.2 Forge: 43.2.11 JEI: 11.6.0.1015 Armor Trims: 1.1.1

Hipposgrumm commented 1 year ago

Can you give more information about the environment (what other mods, can you recreate the issue using as few mods as possible)? Maybe you will be more insightful than this one.

3pical commented 1 year ago

Ok so running them alone doesn't cause any issues, however adding craftTweaker causes some conflict that prevents the recipes from registering. Maybe there's some communication between craftTweaker and Jei that conflicts with this mod. Here are logs: https://pastebin.com/SxpnZeWw Crafttweaker version: 10.1.44

cosmoderp commented 1 year ago

To reply to your comment earlier in referenced closed issue, I do know what I am doing LOL. Seeing this thread, I also see a lot of information that people seem to be omitting.

So to helping with testing. Initially, I removed both JEI and crafttweaker in the modpack I am using and it did load but with this mod installed I went from 180fps down to 30fps. So it could be there are incompatibilities with multiple mods or its just another mod. Will test more on this later so that maybe you can add a compatibility warning at least.

So moving onto more simple test. I did test with JUST forge and it was ok. I then also ran a test with crafttweaker added and it also ran fine. So then I tested with just this mod and just JEI installed and it also did not crash. Last I tested with this mod + crafttweaker + JEI installed and it did not crash.

I conclude then the issue is not JEI or crafttweaker but rather an interaction with some other mod since I cannot reproduce with those mods installed alone with armor trims.

I will continue to test to see if I can figure out what other mod may be the real cause the crash and I suspect whatever created the FPS drop may be what it may be.

Hipposgrumm commented 1 year ago

The lag issues may be related to #5.

cosmoderp commented 1 year ago

On the world with the many mods the armor stands was indeed the issue, but not on the world with a few mods as it seems to have no lag at all. Makes me think its still some mod incompatibility since removing armor trims also fixes this lag on the many mods world. Edit: I need to sleep for tonight I will keep going down this rabbit hole tomorrow after work ... XD

WenXin20 commented 1 year ago

Minecraft v1.19.2 Forge v43.2.7 Armor Trims v1.1.1 JEI v11.6.0.1015

I also seem to be having this issue, but I don't have craft tweaker installed. I'll see about doing more testing later. Latest Log

cosmoderp commented 1 year ago

I did do some testing. That hanging was indeed still JEI related after testing. It was strange since the more mods that got added the longer the delay became. It seem it does eventually load but it takes a really long time. In fact if you look at the above persons log its exactly what happens. It delays at Registering recipes: armor_trims:armortrims_jei.

I assume since I have a beefy computer, this is why mine likely was not crashing. but I did discover if I let it sit there and just went to do other stuff it would eventually load. After work today I will probably try with ATM8 to see if I leave it a really long time if it too will load.

Hipposgrumm commented 1 year ago

I think the JEI plugin might be iterating through every single item trying every possible combination.

cosmoderp commented 1 year ago

I head to work in a few min but decided, now that you said that, to test this out real quick. I decided to look around the JEI recipes and that is exactly it. its creating 4000 recipes for the vanilla armor alone. When I added just all the mods that start with A from allthemods8 and its dependencies I got 31968 recipes. edit: I think now more than ever I will just load up atm8 and leave it loading while I go to work LOL, just to see cause now I am curious.

image

WenXin20 commented 1 year ago

This does look to be the case. With just 27 mods, jei displays over 11,000 recipes. And for every armor piece a mod adds, or material added to the config, this compounds exponentially.

image

Just adding one material, increases it by over 300 recipes

image

Hipposgrumm commented 1 year ago

Idk how I'm going to solve this. I was told to ask for help finding a solution on the JEI Discord.

cosmoderp commented 1 year ago

Yeah its been 10 hours and windows thinks its frozen, but you can clearly see its thinking doing some thinking....the cpu usage keeps going up and down, same with the memory. With my system running at about a around average 50% CPU and 12gb of ram utilization this would have definitely crashed half the people I know. If I find time tonight I might try some stuff using the kubejs mod. Edit: with close to about 400 mods....I am sure the amount of recipes here would be unfathomable. Yeah the JEI discord might have solutions or maybe something that could be done on their end cause this I have never seen.

WenXin20 commented 1 year ago

I'm not sure how much this would help, but maybe only display a recipe for each material type, and then just cycle through each armor piece/trim. Silent Gear does something similar.

recipes

Hipposgrumm commented 1 year ago

I plan on doing something like that.

cosmoderp commented 1 year ago

So I just tested by compiling this mod myself with the JEI compat folder removed. I loaded instantly, even on atm8. Only thing that persist is that armor stand lag. As a quick fix its not that bad. You still can see in the tooltips what materials you can add by looking at the templates themselves which still do show up in JEI. As long as you know how the smithing table works itself it would work fine.

Hipposgrumm commented 1 year ago

I have made the armor cycle in the JEI slot and by doing so decreased the vanilla count from 4000 to 250! Therefore, I can probably mark this as resolved.

Hipposgrumm commented 1 year ago

Plug-in still takes a long time to launch with larger packs.

Hipposgrumm commented 1 year ago

After learning how to use mezz.jei.api.gui.builder.IRecipeLayoutBuilder#createFocusLink(), this issue should now be fixed and will be released soon. When 1.2.1 is released for 1.18.2, the temporary fix will be removed.

Aceplante commented 1 year ago

still seems to happen on 1.18.2

theshadowake commented 4 months ago

Also experiencing this on 1.18.2