Skip to content

Fix NullPointerException in JEI plugin on dedicated server#662

Open
theShroo wants to merge 1 commit intoCompactMods:21.1/mainfrom
theShroo:fix/jei-null-server
Open

Fix NullPointerException in JEI plugin on dedicated server#662
theShroo wants to merge 1 commit intoCompactMods:21.1/mainfrom
theShroo:fix/jei-null-server

Conversation

@theShroo
Copy link
Copy Markdown

@theShroo theShroo commented Apr 3, 2026

Summary

  • Fix NullPointerException in CompactMachinesJeiPlugin.registerRecipes() when client is connected to a dedicated server
  • ServerLifecycleHooks.getCurrentServer() returns null on the client — added null check before accessing registryAccess()

Test plan

  • Connect to a dedicated server with JEI installed
  • Verify no NPE in logs during recipe registration
  • Verify JEI info entries still show for machines and shrinking device

🤖 Generated with Claude Code

ServerLifecycleHooks.getCurrentServer() returns null on the client when
connected to a dedicated server. The JEI plugin's registerRecipes()
method called registryAccess() on the null server reference, causing
a NullPointerException during recipe registration.

Added a null check to skip template holder registration when no
integrated server is available. The base machine and shrinking device
info entries still register correctly.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.

1 participant