Skip to content

Fix duplicate registry key crash for CopperArmorMaterial (#101) - #106

Open
madpunkmax-jpg wants to merge 1 commit into
Smallinger:mainfrom
madpunkmax-jpg:main
Open

Fix duplicate registry key crash for CopperArmorMaterial (#101)#106
madpunkmax-jpg wants to merge 1 commit into
Smallinger:mainfrom
madpunkmax-jpg:main

Conversation

@madpunkmax-jpg

Copy link
Copy Markdown

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

)

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>
@Eyelikegiants

Copy link
Copy Markdown

How do we fix this? I can not get my game to run. I apologize if this is the wrong place to ask.

@madpunkmax-jpg

Copy link
Copy Markdown
Author

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.

@madpunkmax-jpg

Copy link
Copy Markdown
Author

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

@Omegabird113

Omegabird113 commented Aug 3, 2026

Copy link
Copy Markdown

Tested in my ~430 mod modpack which this mod broke if I updated to NeoForge 21.1.238 or beyond before, and this PR fixed that crash (#101 and #107). I was actually just gonna remove the mod, but I may ship this fixed JAR instead. To test, I cloned the PR's branch, ran the neoforge:build task and got the generated file from neoforge/build/libs, ran it in my pack, and it was fixed!

@Scipione Scipione left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can be merged to main

@MotherEgg

Copy link
Copy Markdown

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

@Omegabird113

Copy link
Copy Markdown

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.

@caohuuminhtrung

Copy link
Copy Markdown

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

You're a live saver, I have been going crazy online trying to find a way to fix this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Duplicate armor_material/copper registration crashes game on startup (v0.1.4, NeoForge)

6 participants