[1.8->1.7] generic.maxHealth attribute changes applied via item results in being stuck on respawn screen
calcastor opened this issue · 9 comments
/viaversion dump
Output
https://dump.viaversion.com/e6f35bd590d62b51aa3476b3a04363e7d9e18534fa8b435ff41819beed40a05a
Console Error
None
Bug Description
Applying a generic.maxHealth attribute via an item results in becoming stuck on the respawn screen. This is mitigated by the absorption effect.
The usage of the attribute in this situation is to reduce the player's health cap.
Steps to Reproduce
- Be on 1.7.10 and switch to an item with a generic.maxHealth attribute on a 1.8 server (specifically one that reduces health)
- Observer stuck respawn screen (respawn button does nothing)
Expected Behavior
Respawn screen should not appear
Additional Server Info
1.7.10 player on 1.8.8 Paper-based server
Checklist
- Via plugins are only running on EITHER the backend servers (e.g. Paper) OR the proxy (e.g. Velocity), not on both.
- I have included a ViaVersion dump.
- If applicable, I have included a paste (not a screenshot) of the error.
- I have tried the latest build(s) from https://ci.viaversion.com/ and the issue still persists.
- I have looked at https://www.spigotmc.org/resources/viarewind-legacy-support.52924/ and it does not offer a fix for my problem
I believe this happens in the 1.16->1.15.2 protocol, meaning 1.16+ clients shouldn't have the issue while 1.15.2 and older do, maybe you can confirm/check this?
I believe this happens in the 1.16->1.15.2 protocol, meaning 1.16+ clients shouldn't have the issue while 1.15.2 and older do, maybe you can confirm/check this?
Tested 1.15.2 through to 1.17 and the first version that I don't see the issue with is 1.17.
The offending commit in ViaRewind which causes this issue in 1.7 is 7a9bf5f
The set of commits where the issue described above for 1.9 through to 1.16.4/5 in ViaVersion are these 4; I find that this is resolved by changing PLAYER(ENTITY)
to PLAYER(LIVING_ENTITY_BASE)
in EntityTypes1_9
.
Can you provide the item and a video of the issue?
I tried this item with an 1.7/1.8 client on a 1.8 server and it works as intended on both clients:
minecraft:dirt 1 0 {AttributeModifiers:[{AttributeName:"generic.maxHealth",Name:"generic.maxHealth",Amount:-4,Operation:1,UUIDLeast:5051,UUIDMost:723375}]}
Thanks for noticing the player hierarchy issue in entity types, I fixed that now
Can you provide the item and a video of the issue?
I tried this item with an 1.7/1.8 client on a 1.8 server and it works as intended on both clients:
minecraft:dirt 1 0 {AttributeModifiers:[{AttributeName:"generic.maxHealth",Name:"generic.maxHealth",Amount:-4,Operation:1,UUIDLeast:5051,UUIDMost:723375}]}
Thanks for noticing the player hierarchy issue in entity types, I fixed that now
I can no longer replicate this with the attribute, sorry I should have tested differently. On latest, #511 is a better description of the issue as that is what seems to have been reintroduced, and is resolved by reverting 7a9bf5f (which required me to make entityData
in EntityTracker1_8
non-final to build).
The video is linked below; picking up the flag results in a kit being applied, which itself applies a health boost potion effect with an amplifier of -3
and with "infinite" duration.
https://www.youtube.com/watch?v=Oy63mufMfDY
https://dump.viaversion.com/4f264968fcd0454db2d9f6c0a099a7231acafd7088237156dda13567b41c9c97
Hmm interesting, 7a9bf5f itself should be correct as it's the counterpart of ViaVersion/ViaLegacy@dbb6e5a but the implementation might be wrong, if you have ideas feel free to PR, otherwise I'll look at it when I have time ™️