Skip to content

Avoid using @SubscribeEvent to prevent fully scanning classes#455

Merged
alRex-U merged 1 commit intoalRex-U:1.21.1-NFfrom
Yesssssman:1.21.1-NF
Jan 13, 2026
Merged

Avoid using @SubscribeEvent to prevent fully scanning classes#455
alRex-U merged 1 commit intoalRex-U:1.21.1-NFfrom
Yesssssman:1.21.1-NF

Conversation

@Yesssssman
Copy link

@SubscribeEvent fully scans the class even in a dedicated server, leading to the crash, Invalid Dist

And to avoid referencing methods with client-side code, annotated @OnlyIn(Dist.CLIENT)

Demonstration:

image

ParCool + Epic Fight + Epic ParCool works in a dedicated server.

Annotated Client code with @onlyin(Dist.CLIENT)
@Yesssssman Yesssssman changed the title Avoid using @SubscribeEvent to fully scan the class Avoid using @SubscribeEvent to prevent fully scanning classes Jan 11, 2026
@alRex-U alRex-U merged commit ca2e31d into alRex-U:1.21.1-NF Jan 13, 2026
2 checks passed
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.

2 participants