Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-236285

Model UV is not limited to 0-16, bleeding texture atlas

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 1.17.1, 1.18.1, 1.19, 1.19.1 Pre-release 3, 1.19.2, 1.19.3, 1.19.4, 23w12a, 1.20.1, 1.20.2, 23w43b
    • None
    • Confirmed
    • Textures and models

      See title.

      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.

        1. 2021-09-10_21.56.57.png
          2021-09-10_21.56.57.png
          1.65 MB
        2. 2021-09-10_21.57.21.png
          2021-09-10_21.57.21.png
          3.07 MB
        3. test pack.zip
          0.9 kB

            Unassigned Unassigned
            jirauser71590 user-f2760 (Inactive)
            Votes:
            4 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              CHK: