[1.12.2] Focus Sash priority?
SonicX8000 opened this issue · 6 comments
Unsure if the Focus Sash has any sort of priority, reason I ask is because some revival items will activate if the player's health hits 0 from full health while having the Focus Sash. Here are some examples...
Cyclic's Soul Stone which revives you if you should die, however it ignores the Focus Sash as it will revive you should you take fatal damage from full health. What I was expecting was to take fatal damage from full health and be left with 1 health, and if enough damage was taken to finish me off... the Soul Stone would revive me with some health. In later versions the Soul Stone's priority was set to LOWEST but it still activates first over the Focus Sash.
Reliquary's Phoenix Feather & Angelheart Vial which revives you if you should take fatal damage, however I am unsure if they have a priority. These items will ignore the sash if fatal damage was taken at full health, meaning they revive you first.
Now some revival items do work in the correct way. Here are some examples...
Potion Core's Revival Potion works as intended. The Sash will activate first if you took fatal damage from full health which leaves you with 1 health, and then the potion revives you if you should die.
Cyberware's Internal Defibrillator, works as intended. The Sash will activate if fatal damage was taken from full health which leaves you with 1 health, and then the Defibrillator will save you if you should die.
Extra Utilities 2's Second Chance Potion, works as intended. The Sash will activate first if you took fatal damage from full health which leaves you with 1 health, and then the potion revives you if you should die.
Twilight Forest's Charm of Life, works as intended. The Sash will activate first if you took fatal damage from full health which leaves you with 1 health, and then the charm will revive you if you should die.
Vanilla Minecraft's Totem of Undying, works as intended. The Sash will activate first if you took fatal damage from full health which leaves you with 1 health, and then the totem will revive you if you should die.
I am unsure if it's maybe the way they're set up with the way that they revive you or something.
Okay.
→ The Focus Sash checks damage on application (= after Absorption calculation, armor damaging etc), so the finale damage value.
The events comes in the order : entityHurtEvent → livingDamageEvent.
Cyclic's Soulstone uses entityHurtEvent
Reliquary's Phoenix Down uses livingAttackEvent (before entityHurtEvent)
Reliquary's Angelheart Vial too.
Potion's Core is closed source.
Cyberware's Internal Defibrillator uses livingDeathEvent, so after livingDamageEvent
ExtraUtilities2's Second Chance Potion uses livingDeathEvent too
Twilight Forest's Charm of life uses livingDeathEvent too
Haven't check for Totem of Undying.
Welp.
All is working correctly, Reliquary and Cyclic items needs to check after damage calculation instead of messing with initial damage, imo.
Ah, so it's the way they do the checks. If Cyclic & Reliquary used 'livingDeathEvent', that would fix it?
Sorry for not responding earlier. Sewef is correct, this issue would likely be something those mods would need to fix. The odds are that if it doesn't work with the Focus Sash, it also probably has issues with things like the charm from Twilight Forest as well, and all the other items with similar effects.