neoforged / NeoForge

Neo Modding API for Minecraft, based on Forge
https://neoforged.net
Other
1.25k stars 179 forks source link

[Bug] Layers added via `EntityRenderersEvent.AddLayers` follow the head turn of the player #1260

Open thomasglasser opened 4 months ago

thomasglasser commented 4 months ago

Minecraft Version: 1.21 NeoForge Version: 21.0.76-beta

Steps to Reproduce:

  1. Create a Render Layer that does not copy from the head
  2. Add it via the event
  3. Run the game
  4. See how it follows the head even when it is not set to

Description of issue: All render layers added via the event follow the turn of the player's head, when this may not always be desired. It's likely due to pose stack manipulation but I haven't found the exact cause. Using the pose stack in either RenderLivingEvent works fine.

XFactHD commented 4 months ago

I'm not sure how that is related to that event since it doesn't touch the layers directly at all, it just provides the correct timing for adding them to the renderers. Without looking too deep into the entity layer code, it seems to me that this is just a limitation of the entity layer system.