Jump to content

[1.13.2 - 25.0.149] Crash on custom snowball throw


KingIceCream

Recommended Posts

Don't do anything you are doing with your items/blocks/entities/registry entries. They must be instantinated in the appropriate registry event, and registered using the registry instance passed in that event. If you are ever accessing registries like that you are doing everything wrong.

 

And yeah, your issue is using static fields. In your ClientProxy the itemrenderer is stored in a static field, or rather it is obtained by a static field. By the time that executes it is null, so you are passing null to the renderer thus making it crash with an NPE.

 

Don't obtain references in static fields like that, don't use static initializers, don't access registries like that, use appropriate events.

  • Thanks 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.