Better Statistics Screen

Better Statistics Screen

21M Downloads

[3.12.3+fabric-1.21] Incompatible with EMI

luciobortoletto opened this issue ยท 4 comments

commented

What happened?

Minecraft crashes when opening inventory on Quilt (I haven't tested on Fabric). This doesn't happen when only one of the 2 mods (Better Statistics Screen or Emi) is installed.

Steps to reproduce

  1. Enter in a world
  2. Press E to open the inventory
  3. Minecraft crashes.

Relevant log output or crash report

Log: https://mclo.gs/pRFCsFM
Crash report: https://mclo.gs/CZVRfwI

Other installed mods

  • Better Statistics Screen 3.12.3+fabric-1.21
  • EMI 1.1.10+1.21+fabric
  • Quilted Fabric API (QFAPI) / Quilt Standard Libraries (QSL) 11.0.0-alpha.3+0.100.7-1.21
  • TCDCommons API 3.12.1+fabric-1.21

Code of Conduct

  • I agree that if the issue is regarding a crash, I gave the logs and the crash report.
  • I agree that I will be available later for any follow-up questions to help diagnose and resolve the issue.

I also opened the issue on EMI's repository: emilyploszaj/emi#629

commented

Hello, and thanks for the bug report.
At first glance it appears to be a conflict in how the two mods handle item-groups I assume? Due to time-zones, I will look into it later when I get the time to.
Thanks again, and have a great day!

Edit to add, just in case EMI devs need the info:
If I remember correctly, my mod manually triggers the process of assigning item groups to items whenever the players joins a world. The reason it does so is because the game does not do it on its own, espetially in survival mode. This is kind of a problem ofc, as my mod has to know which items belong to which groups so it can display properly in groups in the "Item stats tab". However, it is possible that my mod manually triggering the assigning of item groups to items may be cauing a conflict however. For now, I am not 100% sure.

commented

Thank you for responding so quickly. I'll wait, take your time. Have a great day to you as well!

commented

Alright, it appears my initial assumption was correct. My mod manually updating item groups is somehow bothering some part of EMI's code.

I have compiled a throwaway version of my mod that does not do the item group updating, and now I see no crashes anymore.. Unfortunately the side-effect of this patch attempt is the "Item stats tab" looking like a disorganized mess:

image

Additionally, this crash appears to only take place in creative mode.
Survival mode is a bit weirder, as I couldn't get any crashes to take place, but at the same time this mod also kept failing to automatically update the item groups. When removing EMI in survival mode, this mod was able to update the item groups just fine. Switching to creative mode with EMI installed, reintroduces the crash. Quite odd indeed.

-

Now, this mod updates item groups by creating an instance of CreativeInventoryScreen (loom mappings), as the game's has a line of code in there that then updates the item groups. Below is the code snippet found the BetterStatsClient class in my mod:

image

Sorry that was a bit technical and probably hard to understand, but I included it anyway just in case someone from EMI is reading this.

Edit to add:

I forgot to add earlier that my mod triggers item group updates on its own not only so the items look organized in the "Item stats tab", but so as to also tackle a performance issue on large mod-packs where opening the inventory would cause a lag spike due to a large number of items being processed and grouped. Basically, it kills two birds with one stone (a metaphorical saying).

-

The only conclusion I can come up with is that some part of EMI's code isn't compatible with I guess my mod updating item groups on its own, so I'm thinking maybe something could be done on EMI's end? I am not entirely sure. I guess worst-case-scenario, I patch this by having my mod not update item groups when EMI is present, which would ofc make the "Item stats tab" look like a disorganized mess (plus I bet a random person would open another issue saying "items in the item stats tab are not grouped").

Anyway, I guess we'll see what happens next, could prob wait for a response from EMI as well. In the meantime, have a great day again!

commented

The issue is now resolved on EMI's end.
Thanks to emilyploszaj for having this issue resolved.