Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[1.20.1] NullPointerException when opening DisenchanterGui #1827

Open
AgentK20 opened this issue Aug 11, 2024 · 1 comment
Open

[1.20.1] NullPointerException when opening DisenchanterGui #1827

AgentK20 opened this issue Aug 11, 2024 · 1 comment

Comments

@AgentK20
Copy link

Base information

  • Minecraft version: 1.20.1
  • Mod version: 3.1.2.583
  • Minecraft Forge version: 47.3.5
  • Mod Pack: Heavily modified version of Worldly Galaxies 4.18

Crash report

https://pastebin.com/P4PWVHe9

Description / steps to reproduce

Repro steps on my pack: Put an iron sword (unsure what enchants were on it) in the Disenchanter. Game crashes.

Pretty sure this crash isn't explicitly DE's fault (more likely a bad mod interaction with something changing how enchantments work), but looking through the source I can see that the DisenchanterGui is unsafely handling a potential null within DisenchanterGui.populateList. getEnchantmentFromTag can return null, which is then immediately passed into getCostInLevels which blows up, unlike other handling with the same file.

I'm going to keep digging on my side to see which of the mods is causing a null Enchantment to be returned, but a potential fix on the DE side would be to validate the return of getEnchantmentFromTag as non-null before allowing an item to be placed in the Disenchanter.

Thanks!

@AgentK20 AgentK20 added the bug label Aug 11, 2024
@FoxMcloud5655
Copy link
Collaborator

Is it the Beheading enchantment from Mana & Artifice?

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

No branches or pull requests

3 participants