mojira.dev
MC-65994

Polygons (faces) in block models not using designated textures

The faces of extra polygons added to a block model like Wooden Fences or Wooden Stairs do not use the designated texture. Instead they use a different texture with different texture coordinates and rotation. Changing the texture coordinates or rotation in the code wont change the outcome.

What I expected to happen was that the faces of the extra polygon(s) added would have the designated texture, right texture coordinates and right rotation.

What actually happened was that the faces of the extra polygon(s) happen to have a different texture from the one designated to it/them, together with a different rotation. The outcome could not be edited by changing the code.
(For example, I designated the oak wood plank texture to extra polygons on a oak_fence_n.json model file, the outcome is a nether brick texture.)
A screenshot has been attached.

Steps to Reproduce:
1. Use the Resource pack containing the oak_fence_n.json block moddel attached to this bug report.
2. Place a block next to a fence post.

Linked issues

Attachments

Comments 4

Please do not mark unreleased versions (anything starting with "Future Version") as affected. You don't have access to them yet.

Turning off uvlock fixes the issue.

As Carl pointed out, turning off the uvlock option in the relevant blockstate file fixes the issue.

That said, I've modified the behavior such that the game will internally wrap individual vertices' UVs to a range of 0 to 16, so if you want to use uvlock, you can. However, you will need to break your columns into a section going from 13-16 and another section going from 16-25, otherwise the UVs will auto-generate as 13 to 9 (25-16).

This is not fixed. Textures often do not map properly when the model is rotated; the game tries to fit an entire texture image onto one face of an element. In addition, this seems to work only in the positive directions for certain coordinates; sometimes the texture is not wrapped, it is taken from elsewhere in the atlas.

In short, uv-lock is unreliable outside of the normal one-block space.

Dooreman Benjamin

migrated

Unconfirmed

faces, models, texture, uv-mapping

Minecraft 14w32a, Minecraft 14w32b

Minecraft 14w33a

Retrieved