Jump to content

[SOLVED] Falling damage doesnt dissapear with PlayerTickEvent event.player.fallDistance = 0; 


Grookey

Recommended Posts

a few other things that are wrong in your code:

  • you can't store a value in a Field because the Event is fired for each Player you should use Capabilities instead
  • your ClientEvents class is only client side so if you get the fields on server they are not set/have the default value

you can fix the problem by using a Capability and sync them to the server
in addition the PlayerEntity class has already methods which you can use server side (for sneaking: Entity#isShiftKeyDown, for jumping: LivingEntity.jumping but it's protected you should use Reflection or an AT)

Link to comment
Share on other sites

  • Grookey changed the title to [SOLVED] Falling damage doesnt dissapear with PlayerTickEvent event.player.fallDistance = 0; 

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.



×
×
  • Create New...

Important Information

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