mojira.dev
MC-208359

Certain entities whose superclass isn't LivingEntity don't appear on the debug screen when pointed at

The bug

Entities such as paintings, boats, primed tnt, falling blocks, all projectiles except fireball (normal variant), dropped items, experience orbs, etc., don't appear on the debug screen when pointed at. This does not affect armor stands or mobs.

How to reproduce

  1. Place, for example, a boat. Drop an item to the ground.

  2. Open the F3 debug screen and point at it
    → ❌  The boat doesn't appear on the debug screen

Code analysis

This is caused by code at net.minecraft.client.renderer.GameRenderer.pick which says that "only if the 'picked' entity is an instance of net.minecraft.world.entity.LivingEntity" will be assigned to the field crosshairPickEntity of net.minecraft.client.Minecraft.

This also causes that these entities, if named, will not show their name tag when hovered.

Note: I also analyzed why items, fishing bobbers, snowballs, eggs and arrows don't appear after fixing, and I've seen that entities which are not 'pickable' (the ones I said) don't appear, but that is intentional and is said as a predicate at the ProjectileUtil.getEntityHitResult call.

Linked issues

Attachments

Comments 7

Can confirm in 21w06a.

Can confirm in 1.17.1.

Can confirm in 21w40a.

Confirmed for 1.19.1 pre-release 5.

As of 23w41a, seems fixed for paintings, falling blocks, all boats, all minecarts, primed tnt and leash knot. However, it still affects other entities, such as projectiles (except normal fireball) and dropped items/xp.

ISRosillo14

(Unassigned)

Confirmed

Debug

1.16.4, 20w49a, 20w51a, 21w03a, 21w05a, ..., 1.20.5, 1.21, 1.21.3, 1.21.4, 1.21.7

Retrieved