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
[media]
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).
Linked issues
Attachments
Comments 7

I believe MC-236285 is that you can set a UV outside of the normal range, while this ticket is about the default UV for larger models.

Can confirm.

Isn't this a duplicate of MC-156088?

No, this is about default uv; that report specifically sets uv mapping.
That said, that report appears to be very similar to MC-236285.

Still in 1.20.1.
I'd like to request ownership of this report; @unknown has not done anything on MoJIRA since may of last year. (Over a year of no activity.)

Still in 1.21.4.
I think this actually duplicates MC-236285. How is it different?