Jump to content

PureUnstable

Members
  • Posts

    3
  • Joined

  • Last visited

Everything posted by PureUnstable

  1. I originally had a check in an if statement to see if the player had the capability but it was coming back as false, so i just did a shortcut through the code last night before I went to bed. I just took a look through my code again and realized I had my client proxy class referenced within my main mod class, but not the common proxy class. After fixing that, my capability now works. Thanks everyone for helping me work through it!
  2. I just finished fixing those errors. Thank you for pointing them out. I moved my @CapabilityInject to my EventHandlerCommon.java to see if that may solve anything, but it does not seem like it has. The way I am attempting to check if my player has the capability is by right clicking with an item with the following code: The way I see it, if the player has the DESTRUCTION_CAP capability, then there will be a chat message that shows the points, which is starting at 0 points. I'm instead getting a null pointer exception whenever I right click with this item. Is this a bad way to go about checking if I have the capability?
  3. I am trying to attach a capability to the player allowing for there to be a point counter listed as destruction points. The capability system I created doesn't seem to work. I made an item called Point Reader that attempts to read the current points the player has, but it keeps returning that the player doesnt have the capability. Here is my code: IDestruction.java DefaultImpl.java Storage.java EventHandlerCommon.java CommonProxy.java And I have this in my main mod class:
×
×
  • Create New...

Important Information

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