DrParadox7 / Lost-Era-Modpack

Files for the Lost Era Modpack
GNU General Public License v3.0
7 stars 7 forks source link

ExtraTIC materials do not have proper casting recipes #65

Closed kumquat-ir closed 1 year ago

kumquat-ir commented 1 year ago

Your Pack Version

1.5.8

Type of Instance

Single Player

Your Expectation

Attempted to cast an Inolashite pickaxe head with a steel pickaxe head cast.

The Reality

It did not cast.

It appears that every ExtraTIC material only has metal cast recipes for shurikens, crossbow parts, and bow limbs, and only ceramic cast recipes for everything else, except arrowheads, which have both.

This can be reproduced in a minimal instance with only ExtraTIC and the LE fork of Tinker's: image image

This seems to be caused by how ExtraTIC handles creating its casting recipes combined with an apparent bug in how ceramic casts are currently implemented.

This code attempts to register ceramic casts under the same name as metal casts, which (rightfully) spits out a lot of warnings in the log and causes anything accessing the cast items via the registry to get the ceramic cast instead of the metal one.

This breaks ExtraTIC's casting recipe handling by causing it to get ceramic casts for everything except arrowheads, which are handled by getting the normal metal cast item and setting damage, and the weapon parts, which are done the same way except with the weapon metal cast item.

Changing patternTypes[i] + "Cast" to patternTypes[i] + "CastCeramic" in the code linked above fixes the "only ceramic casts" issue, as it causes ExtraTIC to get the metal pattern, as expected. It does not fix the weapon parts only having metal casts, as that is caused by only checking for the normal metal cast in the ceramic cast mirroring code here.

There are also warnings in the log about re-registering patterns, caused by a similar cause in the pattern code. This probably also causes ExtraTIC parts to not be craftable via patterns, though I did not test that.

Your Proposal

Fix the duplicate ItemStack registration by changing the key for ceramic casts (and clay patterns) and add code to mirror weapon casting recipes to ceramic weapon casts.

Final Checklist

DrParadox7 commented 1 year ago

Thanks for the detailed explanation. I'll have to try tackle this after the quest rework. If you figure it out before I get to it a pull request is more than appreciated