mojira.dev
MC-126171

Underwater visibility resets when re-entering world

How to reproduce

  1. Go to a ≥2 block deep body of water

  2. Wait until underwater area is visible (theoretically easier with night vision and water breathing)

  3. When underwater area is visible, leave the world

  4. Re-enter the world

Underwater visibility should remain when logging back into a world (at least that's what I expected).

Code analysis

Code analysis by @unknown can be found in this comment.

Attachments

Comments 11

Can confirm in 20w49a.

Can confirm in 21w03a.

Can confirm in 21w06a.

Can confirm in 21w17a.

Can confirm in 1.17.

1 more comments

Can confirm in 1.18.1.

Can confirm in 1.18.2 and 22w13a.

Code analysis

This is because getUnderwaterInvisibility (yarn 1.18.2) is present in ClientPlayerEntity not PlayerEntity and cannot be saved in NBT.

Can confirm in 1.19.

Can confirm in 1.19.2.

xXUnztoppablezXx

(Unassigned)

Confirmed

Platform

Low

Rendering, Save Data

underwater, underwater-visibility

Minecraft 18w08b, Minecraft 18w09a, Minecraft 18w11a, Minecraft 18w14a, Minecraft 18w14b, ..., 1.19, 1.19.2, 1.19.3, 1.20.1, 1.21.4

Retrieved