[SOLVED] Is there a way where i can check the amount of breath a player has left?

Started by RealACKtbt on

Topic category: Help with Minecraft modding (Java Edition)

Joined Dec 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
[SOLVED] Is there a way where i can check the amount of breath a player has left?
Tue, 01/10/2023 - 06:05 (edited)

I am making another bar on top of the hunger bar but the bubble bar of when you go underwater gets in the way. So i want the abr i have made to disappear when they are running out of breath. I could do this by detecting if the player is underwater, but that results in the bubble bar overlaying my bar because it takes some time to get the breath back out of water. I don't want my mod to be in an onlder version because of this, and i cannot find any "Get breath for entity" block.

 

EDIT: There is a "Get oxygen of [event / target entity]" tile that works how i wanted, and it took a while but i figured out that the max breath is 300.

Edited by RealACKtbt on Tue, 01/10/2023 - 06:05