I'm trying to run commands on the condition that the executing player is at full health. The problem is, in this datapack, a large chunkconsiderable amount of players will not have the default Max Health attribute of 20. It can range anywhere from 6 to 40, for example.
I've tried to run a function referencing the player's Attributes data, but the issue is that the player's total value of any given attribute, including the base value and any modifiers, isn't stored anywhere, so I can't figure out how to reference just the total value.
In summary, I need a way to find out if a player's current health is equal to their maximum possible health, including all attribute modifiers. Is there a way that I can do this?