
RenderNameTagEvent not being called
pitbox46 opened this issue ยท 1 comments
Using: Neoforge 1.21
Neoforge has a built in event (Forge as well) RenderNameTagEvent
that gets called at EntityRender#render()
before EntityRender#renderNameTag()
gets called. For culled entities, this event gets skipped. The event should be called at either EntityRendererMixin#shadowRenderNameTag()
or WorldRendererMixin#renderEntity()
before the name tag gets rendered.
This fix will enable my mod, Hidden Names to work properly with this mod. I'll be implementing a quick fix until this can be gotten to.
I've looked into it, but this will be really tricky and slow. The event needs stuff like the renderState, which doesn't exist since EntityCulling is skipping the rendering, so a renderstate is never created/filled. Triggering these events correctly will require a ton of code (thanks to the many forge/neoforge differences over the versions), and actively hurt the performance. I'll push this back for now, in the future putting this behind a setting to skip the event sounds like a better idea.