Making an advancement for falling a certain distance

Started by Norb on

Topic category: Help with Minecraft modding (Java Edition)

Joined Apr 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Making an advancement for falling a certain distance

I have a custom block I made, and I want to check that if the player fall distance is over 128 blocks and falls on the block, they get an advancement.

I work on 2023.2.24119 version and modding for 1.19.2, I tried using the "Entity falls" global trigger but that somehow works on every other entity except the player. I can't even check if entity is subtype of Player, because the trigger doesn't fire when the player falls.

I've been thinking of using a "On Player update tick" trigger and check if the player is falling by checking the Y velocity, but I have no idea how to then check the fall distance.

Thanks in advance.