The Bug:
When a player looks at an entity, the debug screen displays the name of the entity on the right side. A living entity with the invisibility effect or an item frame with the NBT tag 'Invisible' set to true still appears on the debug screen if a player is in range.
Steps to Reproduce:
Summon an invisible villager at your position by using the command provided below.
/summon minecraft:villager ~ ~ ~ {NoAI:1b,active_effects:[{duration:-1,amplifier:0b,id:"minecraft:invisibility"}]}
Enable the F3 debug screen by hitting the F3 key.
Step back and look at the invisible villager.
Look at the right-hand side of the debug screen and take note of how this menu indicates if you're targeting the invisible villager.
Related issues
relates to
Attachments
Comments


WAI that is the point of debugging. You can set reducedDebugInfo to true if cheating is a concern.

The reason I reported this is because of MC-4069.

An attachment with a disallowed file extension has been removed from this ticket.
Executable files and documents are not allowed as attachments.
Please attach crash reports, log files and screenshots as they are instead of pasting them into a document.
-- I am a bot. This action was performed automatically! Please report any issues on Discord or Reddit
Can confirm that this is an issue. Also affects 1.16.5.

If this bug is fixed, will it still be possible to hit invisible entities with melee attacks (fists, swords, etc.)?

It will still be possible to hit invisible entities, the name of the entity simply won't show on the debug screen.