Jump to content

Recommended Posts

Posted

Hi, I am trying to make a tool that is upgradable. This is done by sneak + right clicking with it to open a GUI and putting an item in there. I have done all of this. In the inventory class, I have it detect what item is in this one slot container and write some nbt data to the tool based on which one of the 7 "orbs" can be placed in. This is done in this method in the Inventory class:

 

  Reveal hidden contents

 

The above works fine and in the tool class I have an "addInformation" method that detects what NBT data is stored on the tool and writed a tool tip saying: (Example) Upgrade: Heat Orb. This also works fine. but when do the same for an onUpdate method, it crashes. This is the whole tool class here:

 

 

  Reveal hidden contents

 

 

It crashes when I go into my creative tab and put the tool in my hand.

This is the crash report:

 

  Reveal hidden contents

 

 

So my question is...

Whats the issue and how could I resolve it so I can still use the tool as intended? If you need anymore code, i can paste it here for you.

-Thanks

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.