Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-265280

Mobs sometimes become invisible when you join a singleplayer world


    • Icon: Bug Bug
    • Resolution: Fixed
    • 1.20.2 Pre-release 2
    • 1.20.2 Pre-release 1
    • None
    • Confirmed
    • Entities, Networking
    • Very Important
    • Platform

      The bug

      If you start playing a singleplayer world, sometimes nearby mobs are invisible. You can hear the mob's sounds and you can hit the mob with snowballs, but you can't hit the mob with a sword. Using F3 + B does not display the mob's hitbox. Querying the mob's active_effects NBT with commands shows that it does not currently have any effects, so it does not have the invisibility effect, even though we can't see the mob. Often the mobs are only briefly invisible and then become visible again, but sometimes they remain invisible indefinitely.

      To reproduce

      I was not able to reproduce this at all in 1.20.1. In 1.20.2 pre-release 1, in most worlds I could only manage to reproduce the situation where the mobs are only briefly invisible. However, in one specific world, I noticed that a snow golem remained invisible indefinitely if it was invisible when you joined the world.

      1. Download the attached world: invisible_snow_golem.zip
      2. Join the world in singleplayer.
      3. If the snow golem is visible, repeatedly exit the world and re-join it until the snow golem is invisible. Anecdotally, the snow golem seems to be invisible approximately 50% of the time when this world is joined.
      4. Observe that the snow golem remains invisible no matter how long you wait.
      5. Use the below command to verify that the snow golem does not have the invisibility effect:
        /data get entity @e[type=minecraft:snow_golem,limit=1,sort=nearest] active_effects

        Result: Found no elements matching active_effects

      6. Switch to spectator mode.
      7. Use the below command to spectate the snow golem:
        /spectate @e[type=minecraft:snow_golem,limit=1,sort=nearest]
      8. Observe that you see a glitchy, flashing view of the sky and some other mobs.

      Expected behavior

      All mobs are always visible unless they have the invisibility effect.

      Observed behavior

      Sometimes mobs are invisible for no reason.


      Warning: This video contains rapid movement that resembles flashing. Consider not watching if you have a medical condition that makes you sensitive to flashing.

            Unassigned Unassigned
            pine1needle [Helper] pine1needle
            2 Vote for this issue
            3 Start watching this issue