daedalus4096 / PrimalMagick

Harness the magick of the primal sources of the land.
MIT License
9 stars 11 forks source link

ArrayIndexOutOfBoundsException when looking at extended tooltip of any create item crafted in mechanical crafter #58

Closed StormyData closed 2 years ago

StormyData commented 2 years ago

Crash occurs when trying to calculate affinities for items created in mechanical crafter

Steps to reproduce: Open any inventory containing any item crafted using mechanical crafter and non standard grid i.e. crushing wheel, extendo grip, flywheel, potato cannon or wand of symmetry, furnace engine Mouse over said item Press shift

crash-report-client.txt

versions: MC - 1.18.1 Forge - 39.0.8 Create - v0.4a Flywheel - 0.4.2-rc Primal Magick - 2.0.0-beta

Detailed description: Mechanical crafter is a device which is able to process recipes with variable grid size and can have (and usualy has) more than 9 ingredients, and such recipes e.g. a 12 ingredient one for extendo grip is cought by generateItemAffinityValuesFromIngredients (as create:mechanical_crafting extends ShapedRecipe) and while trying to calculate remaining items for this recipe it fails

This may possibly cause incompability with any mod adding recipes using more than 9 slots and/or non standard recipe shape

Possible fixes: 1) limit the checked recipes to those that we are sure are within bounds (loss of functionality) or 2) I imagine it would also be possible to use some kind of unbounded crafting container (if one exists, or write our own)

If I had more knowledge of the inner workings of minecraft/forge modding I would have maybe made a pull request for this

daedalus4096 commented 2 years ago

This issue should be fixed as of version 2.0.2 of Primal Magick. Please file a new ticket if you encounter the issue again. Thank you for filing this ticket and helping me make the mod better!