ViaRewind

ViaRewind

7.4k Downloads

[1.8->1.7] generic.maxHealth attribute changes applied via item results in being stuck on respawn screen

calcastor opened this issue · 9 comments

commented

/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

  1. 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)
  2. 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

commented

Platform: git--SportPaper--1465194--P.1e3f759--SP.72ca320--CB.e1ebe52%20%28MC%3A%201.8.8%29
ViaVersion (5.0.4-SNAPSHOT): Even with master
ViaRewind(4.0.3-SNAPSHOT): Even with master
ViaBackwards(5.0.3): Even with master

commented

This seems like it could be related to a regression somewhere that reintroduces #511 as the behaviour described in that issue is also reintroduced. However this might be outside of ViaRewind; I can reproduce this issue and #511 on a 1.13.2 client as well.

commented

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?

commented

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.

commented

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.

commented

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

commented

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

commented

Platform: git--SportPaper--1465194--P.1e3f759--SP.72ca320--CB.e1ebe52%20%28MC%3A%201.8.8%29
ViaVersion (5.0.4-SNAPSHOT): Even with master
ViaBackwards(5.0.4-SNAPSHOT): Even with master
ViaRewind(4.0.3-SNAPSHOT): Even with master

commented

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 ™️