Jump to content

Recommended Posts

Posted

Well the title basically says it all

 

 

Entity Class

 

  Reveal hidden contents

 

Posted

Use LivingFallEvent.

Check if the event that gets hurt is "your entity" or "the entity you want" that takes fall damage.

 

Change the "distance" to 0.

 

Example:

@SubscribeEvent
public void livingFall(LivingFallEvent event)
{
    if (event.entityLiving instanceof EntityPlayer)
    EntityPlayer player = (EntityPlayer) event.entityLiving;
    event.distance = 0F;
}

Posted

Well I assume what I have done is wrong if you could try and correct me using my code it would be appreciated or just point out where I went wrong thanks :)

P.S its 2 AM for me :P

 

 

  Reveal hidden contents

 

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.