Fix duplicate registry key crash for CopperArmorMaterial (#101) - #106
Fix duplicate registry key crash for CopperArmorMaterial (#101)#106madpunkmax-jpg wants to merge 1 commit into
Conversation
) COPPER.get() re-ran createCopper() on every call, re-registering the armor material for each of the 5 armor items that call it and throwing IllegalStateException on the second call. Memoize the supplier (same pattern as CopperTier) so registration happens once. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
How do we fix this? I can not get my game to run. I apologize if this is the wrong place to ask. |
|
Hey @Eyelikegiants — this crash comes from a duplicate armor material registration bug (#101). I've already submitted a fix in #106, but it's still waiting to be merged by the maintainer. In the meantime, I can share a JAR built from my fix branch if you want to get back to playing right away — just say the word and I'll drop a download link here. |
|
Hey @Eyelikegiants I can share a JAR built from my fix branch so you can get back into the game — I'll attach the download here. https://github.com/madpunkmax-jpg/Copper-Age-Backport/releases/tag/v0.1.5-copper-armor-fix |
|
Tested in my ~430 mod modpack which this mod broke if I updated to NeoForge |
|
Please do merge this, I had to spend roughly 3 days figuring out what was going on before I could figure out it was this mod crashing things |
For now you can use @madpunkmax-jpg’s pre-compiled build from this branch or build one yourself like I did. Hopefully, the mod author does merge this though as it is a major issue to it being playable. |
You're a live saver, I have been going crazy online trying to find a way to fix this |
COPPER.get() re-ran createCopper() on every call, re-registering the armor material for each of the 5 armor items that call it and throwing IllegalStateException on the second call. Memoize the supplier (same pattern already used in CopperTier) so registration happens once.
Closes #101