mojira.dev
MC-156088

When a block texture is unavailable, other random block textures are displayed

The bug

Parent bug of MC-145275 and MC-153547. When a texture is called but it doesn't exist, whether it be because the texture is too small or that it doesn't exist at all, random other block textures from the texturemap are called instead leaving a mash of jumbled textures. The missing texture block only covers up this glitch (see MC-153547 for more info).

Example

Model file

[media]

(which calls file

[media]

) uses the maximum size a block can be, 48x48, resulting in:

[media]

How to reproduce: Add the barrel.json file to a resource pack in the models/blocks folder.

Info from MC-236285

Model UV mappings aren't limited to 0-16 values, allowing them to bleed the texture sheet.

Steps to reproduce:

  1. Create a resource pack with the file assets/minecraft/models/block/cube.json with

    {
        "parent": "block/block",
        "elements": [
            {   "from": [ 0, 0, 0 ],
                "to": [ 16, 16, 16 ],
                "faces": {
                    "down":  { "uv": [-16, -16, 32, 32], "texture": "#down", "cullface": "down" },
                    "up":    { "uv": [-16, -16, 32, 32], "texture": "#up", "cullface": "up" },
                    "north": { "uv": [-16, -16, 32, 32], "texture": "#north", "cullface": "north" },
                    "south": { "uv": [-16, -16, 32, 32], "texture": "#south", "cullface": "south" },
                    "west":  { "uv": [-16, -16, 32, 32], "texture": "#west", "cullface": "west" },
                    "east":  { "uv": [-16, -16, 32, 32], "texture": "#east", "cullface": "east" }
                }
            }
        ]
    }
  2. Enable the resource pack

  3. Observe how each block now consists of 9 different textures

Expected behavior:

Either one of the following:

  • The model fails to process, and will instead show a missing texture for the entire element face.

  • The texture applied will repeat itself (eg showing stone textures 9 times, rather than once + 8 others). (This is the preferred solution, as that allows creating a repeating texture without having to duplicate elements or make the texture include itself multiple times.) This solution will also fix MC-246230 instantly, rather than make it dump missing textures, requiring a sepate fix.

Linked issues

Attachments

Comments 1

The attached resource pack appears to induce MC-236285. The textures in question are simply adjacent to the requested texture on the atlas, and can scarcely be considered random. I don’t know what resolution should be pursued here.

Nixinova

(Unassigned)

Confirmed

Platform

Low

Resource Packs, Textures and models

Minecraft 1.14.3, Minecraft 1.14.4 Pre-Release 2, 1.14.4, 19w34a, 19w35a, ..., 1.20.6, 24w20a, 1.21.1, 1.21.4, 1.21.6

Retrieved