Need help on how to create a function that checks to see if a players y level is 0 or less

Started by Dynamic4244 on

Topic category: Help with Minecraft modding (Java Edition)

Joined Jan 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Need help on how to create a function that checks to see if a players y level is 0 or less

The title says it if there's a better solution then please! this if for a advancement I'm making. I might just add a block right under bedrock if that's possible if what I'm asking cant be done. Sorry this is my first post if this isn't in the right spot please tell me!

Joined Dec 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
This isn't actually too…
Sun, 01/10/2021 - 03:02

This isn't actually too difficult to achieve, but here is how to do it.

First, set the advancement to only be achieved using procedures.

https://imgur.com/UBnl2mi

Next, this part is a bit more difficult, but still pretty easily achievable. You have to create a procedure and give it the global "On Player Tick Update". You have to test first if the player is at or below y = 0, and if they don't have the advancement, because you wouldn't want to give it to them multiple times. Then, just simply give them the advancement.

https://imgur.com/GUb0k0A

If this doesn't work, just simply reply, and I'll be here to help!