Hardcore Revival

Hardcore Revival

3M Downloads

[1.21.1] Inconsistent behavior with modded totems

Closed this issue · 3 comments

commented

Minecraft Version

1.21.1 (LTS)

Mod Loader

Fabric

Describe the Issue

If you die with different totems, they behave inconsistently:

Vanilla: Triggers before entering K.O. state.
Chorus Totem (from Artifacts): Doesn't trigger at all (Already reported to Artifacts)
All totems from More Totems Of Undying: Trigger after not being rescued in time.
Void Totem: Works like vanilla

Loader:
fabric-loader-0.17.3-1.21.1

Mod list:
hardcorerevival-fabric-1.21.1-21.1.8
balm-fabric-1.21.1-21.0.53
fabric-api-0.116.7+1.21.1
MoreTotems-fabric-1.21-2.20.3
artifacts-fabric-13.1.0
voidtotem-fabric-1.21.1-4.0.0
cloth-config-15.0.140-fabric
trinkets-3.10.0

Video:
https://youtu.be/JBqk0nggZ9k
(Sorry, I can’t/don’t know how to attach videos here)

Logs

latest.log

commented

I'm honestly not sure why the Chorus Totem doesn't work. The Chorus Totem applies its death protection right before the vanilla totem by mixing into the vanilla LivingEntity::checkTotemDeathProtection method. Void Totem appears to do the exact same thing, but that one works fine.

Artifacts mixin: https://github.com/ochotonida/artifacts/blob/1.21.x/common/src/main/java/artifacts/mixin/ability/deathprotectionteleport/LivingEntityMixin.java
Void Totem mixin: https://github.com/Affehund/VoidTotem/blob/shared-1.21.1/common/src/main/java/com/affehund/voidtotem/mixin/LivingEntityMixin.java

Artifacts issue: ochotonida/artifacts#424

commented

After a bit more testing, here's what seems to be going on:

The vanilla checkTotemDeathProtection method does still trigger, but this only happens after not being rescued in time. Since you don't enter the downed state when falling into the void, this doesn't make a difference for a Void Totem. Totems from More Totems of Undying presumably apply their effect in the same manner as Artifacts and Void Totem, since they activate after not being rescued.

The reason that Artifacts' Chorus Totem doesn't work at all is that the not_rescued_in_time damage type, which is the damage type that actually kills the player, has the bypasses_invulnerability damage type tag. More Totems of Undying ignores this tag, possibly due to a bug.

The simplest way to resolve all of these issues would for Hardcore Revival to call checkTotemDeathProtection before players enter the downed state. There already seems to be some custom logic to allow the vanilla totem to work, but the checkTotemDeathProtection doesn't get called until the player actually dies.

commented

I can't safely call checkTotemDeathProtection currently because Hardcore Revival is running during damage events instead of death events (which was a choice made some versions ago because there were some issues with the death cancellation at the time...). However, since that change brought its own issues, I'm likely going to rewrite that portion in a future Minecraft version to act like a more natural death protection.

For the time being, I've added a hardcorerevival:passthrough_death_when_held tag that can be used to extend the current TOTEM_OF_UNDYING special handling to other items.