Posted August 16, 20196 yr 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!
August 16, 20196 yr Author 22 hours ago, diesieben07 said: Nothing special is needed for this. Show your code. *link* Edited August 17, 20196 yr by Differentiation
August 16, 20196 yr Author 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).
August 16, 20196 yr Author 2 minutes ago, diesieben07 said: How are you checking this? Log.info(Object o) in PlayerTickEvent And I also check if I have fall damage when I log in and if I'm invulnerable, etc.
August 16, 20196 yr Author 2 minutes ago, diesieben07 said: Are the NBT methods called correctly? Do they have the correct data? I'm positive that they are
August 16, 20196 yr Author 5 minutes ago, diesieben07 said: Okay. Please post a working Git repository of your mod where this can be reproduced. I'll just upload the necessary files to the Git, since the whole thing will take days.
August 16, 20196 yr Author 12 minutes ago, diesieben07 said: Okay. Please post a working Git repository of your mod where this can be reproduced. These are all the files that have to do with the topic https://github.com/TheWoodenWizard/DC-mod
August 16, 20196 yr Author 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...
August 16, 20196 yr Author 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 August 16, 20196 yr by Differentiation
August 16, 20196 yr Author 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.