mojira.dev
MC-193571

Players render invisible client-side in a server environment when exiting spectator mode whilst having previously spectated an entity

The Bug

In multiplayer, when you switch between spectator and creative, sometimes your character still is transparent after leaving spectator mode. Your hand is invisible in first-person, but in 3rd person your whole body is transparent. You can see the blocks you are holding just fine. Switching between game modes does not fix it, but sneaking does. Other players can still see you like normal. This bug only works in multiplayer.

Steps to Reproduce

  • Get two players and label them "Player A" and "Player B".

  • Ensure that both players are in creative mode.

  • Get "Player A" to stand still facing "Player B".

  • Have "Player B" summon a husk at their position.

    /summon minecraft:husk ~ ~ ~ {NoAI:1b,Silent:1b}
  • Get "Player B" to switch into spectator mode and begin spectating the husk.

    /spectate @e[type=minecraft:husk,limit=1,sort=nearest]
  • Get "Player B" to exit spectator mode and enter creative mode whilst still spectating the husk.

  • Get "Player B" to enter third person.

  • Take note as to whether or not "Player B" sees themself as invisible.

  • Take note as to whether or not "Player A" sees "Player B" as invisible.

Observed Behavior

Players are invisible client-side in a server environment when exiting spectator mode whilst having previously spectated an entity.

Expected Behavior

Players would not be invisible client-side in a server environment when exiting spectator mode whilst having previously spectated an entity.

Linked issues

Attachments

Comments 11

I've noticed this before as well, again like you said it only happens in multiplayer (I've noticed it on both LAN and on a server). To other players I appear normally. I've also had this happen with F3+N, not just F3+F4. This has also happened to me in 1.15.2 as well.

I can still reproduce it in 1.16.4.

I've had this issue on a server in 1.17-rc1. After switching from Spectator to Creative, I would be invisible for myself, but visible to other players.

Wondering if it has something to do with having teleported before switching gamemode.

Can confirm this in 21w42a.

[media][media]

I've done some further investigating regarding this issue and have found a reliable method of reproducing this. Note that this issue is client-side only, and you do not appear invisible for other players. Please also note that you'll need to perform the following steps in a multiplayer environment (either on a server or a LAN world) in order to reproduce this.

The Bug:

Players are invisible client-side in a server environment when exiting spectator mode whilst having previously spectated an entity.

Please note that this issue can still sometimes occur after switching between game modes multiple times, after having previously spectated an entity. Also, if you were to press the sneak key whilst your character appears invisible, you would reappear. 

Steps to Reproduce:

  • Get two players and label them "Player A" and "Player B".

  • Ensure that both players are in creative mode.

  • Get "Player A" to stand still facing "Player B".

  • Have "Player B" summon a husk at their position.

/summon minecraft:husk ~ ~ ~ {NoAI:1b,Silent:1b}
  • Get "Player B" to switch into spectator mode and begin spectating the husk.

/spectate @e[type=minecraft:husk,limit=1,sort=nearest]
  • Get "Player B" to exit spectator mode and enter creative mode whilst still spectating the husk.

  • Get "Player B" to enter third person.

  • Take note as to whether or not "Player B" sees themself as invisible.

  • Take note as to whether or not "Player A" sees "Player B" as invisible.

Observed Behavior:

Players are invisible client-side in a server environment when exiting spectator mode whilst having previously spectated an entity.

Expected Behavior:

Players would not be invisible client-side in a server environment when exiting spectator mode whilst having previously spectated an entity.

I'm also happy to take ownership of this ticket if the reporter no longer wants this report and/or is alright with this. 🙂

1 more comments

@unknown, this is unrelated to this report. You can try approaching Community Support but I can't guarantee that they'll be able to help you.

Can confirm in 1.18.1.

Can confirm in 22w03a.

Can confirm in 1.18.2 and 22w18a.

Can confirm in 1.19.1.

LarsDeSuperKerel

(Unassigned)

Confirmed

Networking, Rendering

multiplayer, spectator, transparent

1.16.1, 1.16.4, 1.16.5, 1.17 Release Candidate 1, 1.17.1, ..., 1.18.1, 22w03a, 1.18.2, 22w18a, 1.19.1

Retrieved