OneBar

OneBar

2.7k Downloads

Advanced health estimate

Madis0 opened this issue ยท 1 comments

commented

When having multiple similar effects - regeneration, poison, wither - how would one determine the final health? Cannot just use a max or min value, nor an average.

At the very least it should prioritize by the effect duration and level.

I think it should be a weighed average of estimated health with the weigh of effect duration * effect level. However, what would be the weighs of non-effect states (e.g. drowning)? Possibly the time in ticks to die.

Edit: 1.4.1 added parentheses, which helps with the readability a bit.

commented

It has been suggested to use min(all effects) to make the player "act early" in case of dangers. It could be a possible option, though it definitely does undermine the positive effects (e.g. using golden apples in a Wither fight).