Jump to content

Recommended Posts

Posted

Hey,

 

In my player capability class, the capabilities reset when logging out and back in. I handled the capability persistence when the player clones, but I can't seem to understand how to do it for when the player logs out.

 

Any help is appreciated.

 

Thanks!

Posted
 
 
 
 
5 minutes ago, diesieben07 said:

Can't see what would cause data to reset. What exact symptoms are you seeing?

I mean, this.invulnerable, this.fallDamageImmune, etc. are all set to false when I log in, even though I set them to true when I logged out (certain commands I made that use these functions).

Posted
20 minutes ago, diesieben07 said:

That's not the point. You already posted the code here, I can't fix this by just staring at the code.

Since you are apparently unable to use the debugger yourself, I'll have to do it for you, which means you need to post a working repository, which you can clone and run your mod.

 Don't use Github's file upload. Use a Git client.

I downloaded the command line and created the repository, but it says it couldn't find the repository...

Posted (edited)
1 hour ago, diesieben07 said:

That's not the point. You already posted the code here, I can't fix this by just staring at the code.

Since you are apparently unable to use the debugger yourself, I'll have to do it for you, which means you need to post a working repository, which you can clone and run your mod.

Don't use Github's file upload. Use a Git client.

Okay this is it:

https://github.com/TheWoodenWizard/DC-mod

Edited by Differentiation
Posted

Oooh, I think I know what I did wrong...

I didnt read and write the NBT data on player clone for the ticks in DinocraftPlayerTicks class. And in my PlayerTickEvent, if the ticks = 0, then it sets the values to false...

 

Thanks for the help!

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.