The component in EntityRenderState#nameTag is always set from EntityRenderer::getNameTag, RenderNameTagEvent$CanRender::getContent is never used.
Also on a side note it is no longer possible to render name tags for entities more than 64 blocks away due to RenderNameTagEvent$CanRender only being called when entity.distanceToCameraSq < 4096.0, which wasn't the case before 1.21.2.
Before only the name tag renderer would check the distance, and by cancelling the event and rendering the name tag yourself it was possible to bypass the distance check.
Minecraft Version: 1.21.3
NeoForge Version: 21.3.4-beta
The component in
EntityRenderState#nameTag
is always set from EntityRenderer::getNameTag,RenderNameTagEvent$CanRender::getContent
is never used.Also on a side note it is no longer possible to render name tags for entities more than 64 blocks away due to
RenderNameTagEvent$CanRender
only being called whenentity.distanceToCameraSq < 4096.0
, which wasn't the case before 1.21.2. Before only the name tag renderer would check the distance, and by cancelling the event and rendering the name tag yourself it was possible to bypass the distance check.