-
Bug
-
Resolution: Fixed
-
Minecraft 1.12.2, Minecraft 17w45b, Minecraft 17w46a, Minecraft 17w48a, Minecraft 17w50a, Minecraft 18w01a, Minecraft 18w03b, Minecraft 18w06a, Minecraft 18w09a, Minecraft 18w10d, Minecraft 18w14b, Minecraft 18w20c, Minecraft 1.13-pre1, Minecraft 1.13-pre3, Minecraft 1.13-pre6, Minecraft 1.13-pre8, Minecraft 1.13-pre10, Minecraft 1.13, Minecraft 18w30b, Minecraft 18w31a, Minecraft 1.13.1, Minecraft 1.13.2
-
None
-
Confirmed
-
(Unassigned)
The bug
"3D texture" item models currently have issues when generated for some textures with translucency.
In particular, they appear to have missing side edges, as can be seen in the provided screenshot. (The texture used for this example is also provided)
Code analysis
These models are generated by the ItemModelGenerator class. This has a function isTransparent, which considers a pixel to be transparent if it has an alpha value of 0:
return (p_178391_1_[p_178391_3_ * p_178391_4_ + p_178391_2_] >> 24 & 255) == 0;
However, the RenderItem class used for rendering the items uses the following for alpha testing:
GlStateManager.alphaFunc(516, 0.1F);
(516 being the value of GL11.GL_GREATER), which means only item model parts with an alpha value > 0.1 will be rendered.
The transparency handling should be made consistent between these two places to prevent these issues.
- relates to
-
MC-68232 Some items are missing pixels in 3D models
- Resolved