Remove OnlyIn and rework registration #636

Merged
import_user_oitsjustjose_95mQ merged 2 commits from github/fork/lukebemish/1.18 into 1.18 2022-05-03 12:33:00 +00:00
import_user_oitsjustjose_95mQ commented 2022-05-03 02:11:14 +00:00 (Migrated from git.oitsjustjose.com)

Fix general good practice by:

  • Removing @OnlyIn annotation where necessary and refactoring code for client/server seperation.
  • Changing registry system to use DeferredRegister to avoid log spam and occasional crashing.

This should, among other things, future-proof the code a bit, as well as stopping the constant log spam during loading caused by the old system and should also, at least as far as I can tell, fix the occasional crashes I was experiencing with the old system.

Fix general good practice by: - Removing `@OnlyIn` annotation where necessary and refactoring code for client/server seperation. - Changing registry system to use DeferredRegister to avoid log spam and occasional crashing. This should, among other things, future-proof the code a bit, as well as stopping the constant log spam during loading caused by the old system and should also, at least as far as I can tell, fix the occasional crashes I was experiencing with the old system.
import_user_oitsjustjose_95mQ commented 2022-05-03 02:13:37 +00:00 (Migrated from git.oitsjustjose.com)

I haven't tested this locally yet, but just looking - does this need to be static since you're registering the class, and not an instance, of GeolosysClient to the Event Bus?

I haven't tested this locally yet, but just looking - does this need to be static since you're registering the class, and not an instance, of `GeolosysClient` to the Event Bus?
import_user_oitsjustjose_95mQ commented 2022-05-03 02:15:24 +00:00 (Migrated from git.oitsjustjose.com)

Probably. Let me fix that quickly

Probably. Let me fix that quickly
import_user_oitsjustjose_95mQ commented 2022-05-03 02:20:27 +00:00 (Migrated from git.oitsjustjose.com)

Should be fixed now

Should be fixed now
import_user_oitsjustjose_95mQ commented 2022-05-03 02:21:57 +00:00 (Migrated from git.oitsjustjose.com)

Testing locally and all seems to be working well. Have you tested on the server by chance?

Testing locally and all seems to be working well. Have you tested on the server by chance?
import_user_oitsjustjose_95mQ commented 2022-05-03 02:23:06 +00:00 (Migrated from git.oitsjustjose.com)

I ran a server, but didn't join it with a player. I'll give that a try.

I ran a server, but didn't join it with a player. I'll give that a try.
import_user_oitsjustjose_95mQ commented 2022-05-03 02:30:22 +00:00 (Migrated from git.oitsjustjose.com)

Yep, just started one up and joined, couldn't seem to do anything that made it crash.

Yep, just started one up and joined, couldn't seem to do anything that made it crash.
import_user_oitsjustjose_95mQ (Migrated from git.oitsjustjose.com) closed this pull request 2022-05-03 12:33:00 +00:00
import_user_oitsjustjose_95mQ (Migrated from git.oitsjustjose.com) merged commit into 1.18 2022-05-03 12:33:00 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
oitsjustjose/Geolosys!636
No description provided.