Jump to content

Recommended Posts

Posted

NPE is easy to solve. One of these is null:

 

if (hasAttachment(stack, MainRegistry.content().ironSights.getName()))

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted

could you help me have no idea why it is a npe

Tell us what "it" is. You're the one with the debugger! Set a breakpoint in the offending method and then look at values and step into method calls.

 

For debugging, it can help a bit to break apart complex expressions into several discrete assignments. For example, replace

 

    MainRegistry.content().ironSights.getName())

 

with something like

 

    c = MainRegistry.content();

    s = c.ironSights;

    n = s.getName();

 

to narrow down the location of the error.

The debugger is a powerful and necessary tool in any IDE, so learn how to use it. You'll be able to tell us more and get better help here if you investigate your runtime problems in the debugger before posting.

Posted

You should not mod before you learn basic java.

I. Stellarium for Minecraft: Configurable Universe for Minecraft! (WIP)

II. Stellar Sky, Better Star Rendering&Sky Utility mod, had separated from Stellarium.

Posted

The error you have can be explained like this:

 

Would you please remove the lid of the peanut butter jar you are currently holding?

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

  • 5 years later...
  • Guest locked this topic
Guest
This topic is now closed to further replies.

Announcements



×
×
  • Create New...

Important Information

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