-
Notifications
You must be signed in to change notification settings - Fork 61
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
Prevent crashing on servers #627
base: 1.20.1-new
Are you sure you want to change the base?
Conversation
Hey, any update on this? |
There are unnecessary changes in this PR that I don't want to merge |
Which unnecessary changes exactly are you referring to? I think I accidentally clicked optimize imports in my IDE, which removed a few imports that were unrelated to the PR. Is that what you mean? |
Also waiting for updates |
4af4aca
to
7a32488
Compare
I rebased the changes to resolve conflicts and undid any unnecessary changes to the import. |
Any update on this? |
First make a good pr that we can merge |
Please explain to me which part of the code exactly is unnecessary. If you think there is an alternative way to prevent this issue, please let me know |
Is it possible to do something like CaffeineMC/sodium#2773 |
That option does not exist on 1.20.1 (and might be neoforge exclusive). |
You moved the initialization to the |
Please implement this feature, makes doing some things so frustrating only because of this mod |
Too late for what exactly? Keeping the initialization in the constructor is unfortunately not possible, as the EventBusSubscriber annotation does not create an instance of the class (unlike the Mod annotation). |
Then use a static block |
Unfortunately, that doesn't work as the mod list is not loaded yet: https://mclo.gs/FmmTXjq |
When attempting to start a server with oculus installed it causes a crash because oculus attempts to access client-only code.
According to the forge documentation client-only mods should work on servers: https://docs.minecraftforge.net/en/1.20.x/concepts/sides/#writing-one-sided-mods
This PR changed oculus to only listen for events on the client and therefore prevents this kind of crash.
This supersedes #367.