How to prevent fall damage? (Read entire post first)

Started by myxical on

Topic category: Help with Minecraft modding (Java Edition)

Joined May 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to prevent fall damage? (Read entire post first)

I've been recently modding again and I wanted to make a potion effect which removes fall damage. So what I did is I used the override fall distance block, except there's a problem - you can't do critical hits, since they are based on fall distance. I've thought of canceling all damage that is fall damage but in the damage event there's no way to check for the type of damage (if the damage is fall damage or not). I tried making it so in the Entity falls event when distance is larger than something it overrides the distance, but that doesn't work either. I noticed there's a dependency in the Entity falls event called "damagemultiplier" but I can't find a way to modify it.

Is there any way to fix? If not then is there a way to detect the type of damage the entity receives?

Joined Nov 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Try using "Cancel event that…
Wed, 06/28/2023 - 18:17

Try using "Cancel event that triggered global trigger" (under Advanced) on the "Entity falls" event.

Joined May 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Works, thanks! How did I…
Wed, 08/09/2023 - 20:43

Works, thanks! How did I came up with this....