neoforged / NeoForge

Neo Modding API for Minecraft, based on Forge
https://projects.neoforged.net/neoforged/neoforge
Other
1.2k stars 177 forks source link

Composite model loader culling behavior #1623

Open TBoshoven opened 3 days ago

TBoshoven commented 3 days ago

Minecraft Version: 1.21.1

NeoForge Version: 21.1.72

Logs: N/A

Steps to Reproduce:

  1. Load my repro mod (release page has a jar if you're particularly trusting)
  2. Give yourself a repro block (/give @p repro:repro_block) and place it in the world
  3. Observe culling behavior when placing solid blocks around it

Description of issue: When using the neoforge:composite model loader, the child models still have their original cullface logic applied. This logic will not necessarily be valid as the children are scaled, translated, or as demonstrated here, rotated.

The repro mod demonstrates this issue by means of a composite model with the same child four times in different orientations. When placing a solid block against one of the sides, all sides are culled.

Image

I imagine it would be hard to make cullface work with arbitrary transformations, but maybe rotation can be done? While I could obviously just not cull any faces on my child model to solve this issue, I couldn't do that if I was using a vanilla model instead.

XFactHD commented 2 days ago

This issue is not specific to composite models, it's caused by how the root transforms are applied to models in general. This is not an issue anymore in 1.21.3 due to changes in our model loading extensions. I'll open a PR to fix this in 1.21.1 in a moment.