Mod Crashes Server, works on Singleplayer (Registry Object not present)

Started by Nwago on

Topic category: Help with modding (Java Edition)

Last seen on 11:19, 15. Sep 2024
Joined Mar 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Mod Crashes Server, works on Singleplayer (Registry Object not present)

Hello!

I am having a major issue since updating to 2023.4 (1.20.1), as in when attempting to run my mod on a server, it crashes.

My mod worked just fine on multiplayer when I compiled it with 2023.3 (1.20.1).

 

Multiple blocks and plants appear in the console log with the error "java.lang.NullPointerException: Registry Object not present".

Here is a link to the console log: Log

 

Any help would be greatly appreciated :)

 

Attempted to load class net…
Mon, 01/15/2024 - 18:01

Attempted to load class net/minecraft/client/player/LocalPlayer for invalid dist DEDICATED_SERVER 

Seems some client side code is running on server side.

Do you use any plugins. Some client-side heavy plugin could be causing this

Last seen on 11:19, 15. Sep 2024
Joined Mar 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Hello, I've managed to…
Sun, 01/21/2024 - 10:02

Hello, I've managed to identify the issue, which was a procedure running on "Client Display Random Tick" on a few of my block elements.

The issue only seems to occur when I use the "event/target entity" dependency inside the procedure. When I do, any attempt at running a server will crash, but it works fine on singleplayer as stated above.

As for your question, I only use the World Renderer plugin for a skybox in one dimension, and have actually removed it temporarily to see if it had any effect (it didn't).