Jump to content

Recommended Posts

Posted

I am trying to update my mod from 1.8.9 to 1.10.2. I was using IExtendedEntityProperty to give players a thirst property. I'm trying to implement this functionality using Capabilities, but I can't get it to work. I am getting an InstantiationException when my mod tries to attach the capability to the player upon login.

 

My interface class:

 

  Reveal hidden contents

 

 

My implementation class:

 

  Reveal hidden contents

 

 

My provider class:

 

  Reveal hidden contents

 

 

My storage class:

 

  Reveal hidden contents

 

 

My handler class:

 

  Reveal hidden contents

 

 

Edited to add my CommonProxy class where I register stuff:

 

  Reveal hidden contents

 

 

The error: http://pastebin.com/64bfYYkd

Posted

I wondered about that. I didn't see any examples with a constructor. Without it, how would I get access to the player in order to send my packets? I need to notify the client when the player's thirst changes, in order to update the GUI.

Posted
  On 12/2/2016 at 5:15 AM, Daeruin said:

I wondered about that. I didn't see any examples with a constructor. Without it, how would I get access to the player in order to send my packets? I need to notify the client when the player's thirst changes, in order to update the GUI.

Make your IThirst#getThirstier and IThirst#slakeThirst take in a player so it can send the packet.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Posted

Thank you! That did it. I knew it would be something simple.

 

Now it's crashing for a different reason. Something to do with block rendering. But I'll post on that later if I can't figure it out.

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.