DaFuqs / Spectrum

A full-feature minecraft mod about harnessing the powers of color
Other
102 stars 60 forks source link

Crash with EnchantedShulkers because of enchantment code loop #338

Closed Yowesephth closed 7 months ago

Yowesephth commented 8 months ago

Describe the bug Game crashes upon reaching title screen. a dirt background with a row of text block icons shows up for a moment, then the game closes. Trying to remove mods that I feel are causing this conflict according to what I see in the crash log still has all the text in the game replaced with these blocks, and resource packs get unloaded.

To Reproduce The conflict seems to be with some create content I have installed along with spectrum. I'm not sure what specific mod might be causing this. The create mods I had installed are Prominant Create, Create Enchantment Industry, OPAC Create Mod Support, Create Crafts & Additions, Create Deco, Create: Steam 'n' Rails, Create, Bells & Whistles, Create Jetpack, Rechiseled, Create, and Delightful Creators.

I could at least get to the titlescreen with all these create mods installed turned off. (though the titlescreen's text was all replaced with boxes.)

Expected behavior I was hoping the game would load up and I would be able to play.

Mod version I attempted this with Spectrum 1.7.4, as well as 1.7.3. I also tried using both revalationary 1.3.7 and 1.3.6 This was all on 1.20.1, using fabric 0.15.6

Crash Report here is the crash report: https://mclo.gs/A1h2kA1

KatTheFox commented 8 months ago

It looks like a conflict between Enchanted Shulkers and Spectrum, from that log

KatTheFox commented 8 months ago

seems to be related to this mixin https://github.com/RubixDev/EnchantedShulkers/blob/06e8bec8ce6d68a09836a243a1a8f0418629db97/src/main/java/de/rubixdev/enchantedshulkers/mixin/ItemStackMixin.java#L28 The PreenchantedMultitoolItem (spectrum) redirects GetDefaultStack to GetDefaultEnchantedStack, which calls addEnchantment, which this mixin (enchanted shulkers) makes call GetDefaultStack again, so the stack overflows

Noaaan commented 8 months ago

It is indeed. See the following:

https://github.com/RubixDev/EnchantedShulkers/blob/main/src/main/java/de/rubixdev/enchantedshulkers/Utils.java#L42-L48

https://github.com/RubixDev/EnchantedShulkers/blob/06e8bec8ce6d68a09836a243a1a8f0418629db97/src/main/java/de/rubixdev/enchantedshulkers/mixin/ItemStackMixin.java#L28-L29

Yowesephth commented 8 months ago

Removing the mod allowed the pack to load up, so that was definitely it. Think it'd be a good idea to file a bug report with that mod linking to all this?

Noaaan commented 8 months ago

Please do. Link them to this issue as well

DaFuqs commented 7 months ago

Fixed on EnchantedShulkers side ✅