-
Bug
-
Resolution: Unresolved
-
None
-
1.18.1, 1.20.1, 1.20.2, 23w43b
-
None
-
Community Consensus
-
Resource Packs
-
Low
-
Platform
The bug
When a model contains an element that exists outside of the 0-16 bounds (-16-32 is valid) the default UV mapping will not be capped at 0-16, causing texture atlas bleeding. The problem in this report is specifically the auto-UV mapping, for UV provided out of range, see MC-236285.
How to reproduce:
- Replace the minecraft:block/cobblestone model in a resource pack with the following:
{ "parent": "minecraft:block/block", "textures": { "all": "minecraft:block/cobblestone" }, "elements": [ { "from": [ -16, -16, -16 ], "to": [ 32, 32, 32 ], "faces": { "up": { "texture": "#all" }, "down": { "texture": "#all" }, "north": { "texture": "#all" }, "south": { "texture": "#all" }, "west": { "texture": "#all" }, "east": { "texture": "#all" } } } ] }
Notice that no UV mapping is provided, so it used auto-mapping.
- Load the resource pack
- Place a cobblestone block in a world
- Notice how the 9 textures are shown with cobblestone in the center
The fix
Either one of the following:
- Deploy the second fix option for MC-236285. (Preferred fix)
- Make auto-uv mapping get the size of the face, and offset, like it does now, but then clamp it between 0 and 16 (offset into the area before cutting the size down so that elements fully outside the 0-16 range do not get a 0 wide/tall UV).