Skip to content

Fix ClassNotFound exceptions on servers due to client only class being accessed in cover code#2829

Merged
Zorbatron merged 1 commit into
masterfrom
zb/ender-cover-server-fix
Aug 7, 2025
Merged

Fix ClassNotFound exceptions on servers due to client only class being accessed in cover code#2829
Zorbatron merged 1 commit into
masterfrom
zb/ender-cover-server-fix

Conversation

@Zorbatron

Copy link
Copy Markdown
Member

What

Fixes ClassNotFound exceptions due to LangKey#get being inside a DynamicKey string supplier. DynamicKey's constructor gets the string from the supplier to null check, but this ends up getting the result of the LangKey which has ClientScreenHandler.getTicks() in the get() method, which is annotated with SideOnly(CLIENT).

Implementation Details

Remove usage of dynamic keys in the ender cover code and change BaseFilterContainer#getFilterName to getFilterKey so a lang key can be returned directely.

Outcome

You can use covers on servers.

Additional Information

This affected conveyor and robot arm covers too

@Zorbatron Zorbatron requested a review from a team as a code owner June 19, 2025 04:06
@Zorbatron Zorbatron added the type: bug Something isn't working label Jun 19, 2025
@ALongStringOfNumbers

Copy link
Copy Markdown
Contributor

On this branch, I cannot runClient or runServer at all, they both crash with another ClassNotFound for IModuleManager

@Zorbatron

Zorbatron commented Jun 30, 2025

Copy link
Copy Markdown
Member Author

Where in loading does it crash, and you provide the entire stack trace? Client and server both work for me.

@Zorbatron Zorbatron merged commit 62f148a into master Aug 7, 2025
4 of 5 checks passed
@Zorbatron Zorbatron deleted the zb/ender-cover-server-fix branch August 7, 2025 23:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants