Posted April 23, 20196 yr All code is on github: https://github.com/KingParity/1.13.2 Whenever I try to throw a custom snowball I made (An emerald snowball), the game always crashes and I am given this: https://pastebin.com/fy5XFRAC It seems to have to do with it trying to render it, but I can't figure out what is going wrong
April 23, 20196 yr 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.
April 23, 20196 yr Author Ok. Thanks for letting me know that I've been registering everything wrong, and thanks for your answer! It works perfectly now
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.