Jump to content

[SOLVED] [1.15.2] Capability#getDefaultInstance is returning null


Recommended Posts

Posted (edited)

It's as the title says; I'm having trouble with my capabilities :( Here are the classes that are relevant:

 

Main class

  Reveal hidden contents

Capability class

  Reveal hidden contents

log:

  Reveal hidden contents

 

Edited by Nozzomi
Posted

Can you please edit your post and click this button next time:

image.png.01ebae90f47173d47dda1095445578f8.png

 

Because without doing that your spoiler blocks are 4000 pixels tall and completely useless.

 

image.png.c50c182260becc11e7fd164cb381d4bd.png

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
  On 2/6/2020 at 10:21 PM, Draco18s said:

Can you please edit your post and click this button next time:

image.png.01ebae90f47173d47dda1095445578f8.png

 

Because without doing that your spoiler blocks are 4000 pixels tall and completely useless.

 

image.png.c50c182260becc11e7fd164cb381d4bd.png

Expand  

Ahh sorry! I put a temporary fix on my phone, but I'll try re-copying-and-pasting once I get to my computer! Hopefully this is enough for now

Posted
  On 2/7/2020 at 5:10 PM, diesieben07 said:

At this point your capabilities are not registered yet (you are in the process of doing so). Your SmithQualityCap constructor (which you call here) tries to access your @CapabilityInject field though, which cannot possibly be initialized here, because your capability is not registered yet.

You should not implement IStorage on the same class as your capability.

Expand  

Thank you! That solved it

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.