mojira.dev
MC-280080

Transparent pixels of a block model layer are rendered as black

When a block model has only 1 layer it makes sense to render the transparent pixels of a non-transparent block as black.

But it is also possible to "layer" textures on top of each other.

If the second layer contains transparent pixels, one would assume it just gets laid on top of the bottom layer, but it turns black.

This turns a simple model definition of a block with a non-emissive base and an emissive layer on top of it from this:

 

{
    "credit": "Made with Blockbench by Jaded",
    "parent": "block/block",
    "textures": {
        "0": "blackblock:block/glow_bricks/base",
        "1": "blackblock:block/glow_bricks/glow",
        "particle": "blackblock:block/glow_bricks/base"
    },
    "elements": [
        {
            "from": [0, 0, 0],
            "to": [16, 16, 16],
            "faces": {
                "north": {"cullface": "north", "uv": [0, 0, 16, 16], "texture": "#0"},
                "east": {"cullface": "east", "uv": [0, 0, 16, 16], "texture": "#0"},
                "south": {"cullface": "south", "uv": [0, 0, 16, 16], "texture": "#0"},
                "west": {"cullface": "west", "uv": [0, 0, 16, 16], "texture": "#0"},
                "up": {"cullface": "up", "uv": [0, 0, 16, 16], "texture": "#0"},
                "down": {"cullface": "down", "uv": [0, 0, 16, 16], "texture": "#0"}
            }
        },
        {
            "from": [0, 0, 0],
            "to": [16, 16, 16],
            "light_emission": 15,
            "faces": {
                "north": {"cullface": "north", "uv": [0, 0, 16, 16], "texture": "#1"},
                "east": {"cullface": "east", "uv": [0, 0, 16, 16], "texture": "#1"},
                "south": {"cullface": "south", "uv": [0, 0, 16, 16], "texture": "#1"},
                "west": {"cullface": "west", "uv": [0, 0, 16, 16], "texture": "#1"},
                "up": {"cullface": "up", "uv": [0, 0, 16, 16], "texture": "#1"},
                "down": {"cullface": "down", "uv": [0, 0, 16, 16], "texture": "#1"}
            }
        }
    ]
}

Into a monstrosity like this:

{
    "credit": "Made with Blockbench by Jaded",
    "parent": "block/block",
    "textures": {
       "0": "blackblock:block/glow_bricks/base",
       "1": "blackblock:block/glow_bricks/glow",
       "particle": "blackblock:block/glow_bricks/base"
    },
    "elements": [
       {
          "from": [0, 0, 0],
          "to": [16, 16, 16],
          "faces": {
             "north": {"cullface": "north", "uv": [0, 0, 16, 16], "texture": "#0"},
             "east": {"cullface": "east", "uv": [0, 0, 16, 16], "texture": "#0"},
             "south": {"cullface": "south", "uv": [0, 0, 16, 16], "texture": "#0"},
             "west": {"cullface": "west", "uv": [0, 0, 16, 16], "texture": "#0"},
             "up": {"cullface": "up", "uv": [0, 0, 16, 16], "texture": "#0"},
             "down": {"cullface": "down", "uv": [0, 0, 16, 16], "texture": "#0"}
          }
       },
       {
          "from": [-0.02, -0.02, -0.02],
          "to": [16.02, 1.02, 16.02],
          "light_emission": 15,
          "faces": {
             "north": {"cullface": "north", "uv": [0, 15, 16, 16], "texture": "#1"},
             "east": {"cullface": "east", "uv": [0, 15, 16, 16], "texture": "#1"},
             "south": {"cullface": "south", "uv": [0, 15, 16, 16], "texture": "#1"},
             "west": {"cullface": "west", "uv": [0, 15, 16, 16], "texture": "#1"}
          }
       },
       {
          "from": [-0.02, 4, -0.02],
          "to": [16.02, 5.02, 16.02],
          "light_emission": 15,
          "faces": {
             "north": {"cullface": "north", "uv": [0, 11, 16, 12], "texture": "#1"},
             "east": {"cullface": "east", "uv": [0, 11, 16, 12], "texture": "#1"},
             "south": {"cullface": "south", "uv": [0, 11, 16, 12], "texture": "#1"},
             "west": {"cullface": "west", "uv": [0, 11, 16, 12], "texture": "#1"}
          }
       },
       {
          "from": [-0.02, 8, -0.02],
          "to": [16.02, 9.02, 16.02],
          "light_emission": 15,
          "faces": {
             "north": {"cullface": "north", "uv": [0, 7, 16, 8], "texture": "#1"},
             "east": {"cullface": "east", "uv": [0, 7, 16, 8], "texture": "#1"},
             "south": {"cullface": "south", "uv": [0, 7, 16, 8], "texture": "#1"},
             "west": {"cullface": "west", "uv": [0, 7, 16, 8], "texture": "#1"}
          }
       },
       {
          "from": [-0.02, 12, -0.02],
          "to": [16.02, 13.02, 16.02],
          "light_emission": 15,
          "faces": {
             "north": {"cullface": "north", "uv": [0, 3, 16, 4], "texture": "#1"},
             "east": {"cullface": "east", "uv": [0, 3, 16, 4], "texture": "#1"},
             "south": {"cullface": "south", "uv": [0, 3, 16, 4], "texture": "#1"},
             "west": {"cullface": "west", "uv": [0, 3, 16, 4], "texture": "#1"}
          }
       },
       {
          "from": [-0.02, 13, 11],
          "to": [16.02, 16.02, 12.02],
          "light_emission": 15,
          "faces": {
             "west": {"cullface": "west", "uv": [11, 0, 12, 3], "texture": "#1"},
             "up": {"cullface": "up", "uv": [0, 11, 16, 12], "texture": "#1"}
          }
       },
       {
          "from": [-0.02, 13, 7],
          "to": [16.02, 16.02, 8.02],
          "light_emission": 15,
          "faces": {
             "up": {"cullface": "up", "uv": [0, 7, 16, 8], "texture": "#1"}
          }
       },
       {
          "from": [-0.02, 13, 15],
          "to": [16.02, 16.02, 16.02],
          "light_emission": 15,
          "faces": {
             "up": {"cullface": "up", "uv": [0, 15, 16, 16], "texture": "#1"}
          }
       },
       {
          "from": [-0.02, -0.02, 12],
          "to": [16.02, 3.02, 13.02],
          "light_emission": 15,
          "faces": {
             "down": {"cullface": "down", "uv": [0, 3, 16, 4], "texture": "#1"}
          }
       },
       {
          "from": [-0.02, -0.02, 8],
          "to": [16.02, 3.02, 9.02],
          "light_emission": 15,
          "faces": {
             "down": {"cullface": "down", "uv": [0, 7, 16, 8], "texture": "#1"}
          }
       },
       {
          "from": [-0.02, -0.02, 4],
          "to": [16.02, 3.02, 5.02],
          "light_emission": 15,
          "faces": {
             "down": {"cullface": "down", "uv": [0, 11, 16, 12], "texture": "#1"}
          }
       },
       {
          "from": [-0.02, -0.02, -0.02],
          "to": [16.02, 3.02, 1.02],
          "light_emission": 15,
          "faces": {
             "down": {"cullface": "down", "uv": [0, 15, 16, 16], "texture": "#1"}
          }
       },
       {
          "from": [-0.02, 13, 3],
          "to": [16.02, 16.02, 4.02],
          "light_emission": 15,
          "faces": {
             "west": {"cullface": "west", "uv": [3, 0, 4, 3], "texture": "#1"},
             "up": {"cullface": "up", "uv": [0, 3, 16, 4], "texture": "#1"}
          }
       },
       {
          "from": [-0.02, 1, -0.02],
          "to": [1.02, 4.02, 1.02],
          "light_emission": 15,
          "faces": {
             "north": {"cullface": "north", "uv": [15, 12, 16, 15], "texture": "#1"}
          }
       },
       {
          "from": [8, 1, -0.02],
          "to": [9.02, 4.02, 1.02],
          "light_emission": 15,
          "faces": {
             "north": {"cullface": "north", "uv": [7, 12, 8, 15], "texture": "#1"}
          }
       },
       {
          "from": [12, 5, -0.02],
          "to": [13.02, 8.02, 1.02],
          "light_emission": 15,
          "faces": {
             "north": {"cullface": "north", "uv": [3, 8, 4, 11], "texture": "#1"}
          }
       },
       {
          "from": [4, 5, -0.02],
          "to": [5.02, 8.02, 1.02],
          "light_emission": 15,
          "faces": {
             "north": {"cullface": "north", "uv": [11, 8, 12, 11], "texture": "#1"}
          }
       },
       {
          "from": [-0.02, 9, -0.02],
          "to": [1.02, 12.02, 1.02],
          "light_emission": 15,
          "faces": {
             "north": {"cullface": "north", "uv": [15, 4, 16, 7], "texture": "#1"}
          }
       },
       {
          "from": [8, 9, -0.02],
          "to": [9.02, 12.02, 1.02],
          "light_emission": 15,
          "faces": {
             "north": {"cullface": "north", "uv": [7, 4, 8, 7], "texture": "#1"}
          }
       },
       {
          "from": [12, 13, -0.02],
          "to": [13.02, 16.02, 1.02],
          "light_emission": 15,
          "faces": {
             "north": {"cullface": "north", "uv": [3, 0, 4, 3], "texture": "#1"}
          }
       },
       {
          "from": [4, 13, -0.02],
          "to": [5.02, 16.02, 1.02],
          "light_emission": 15,
          "faces": {
             "north": {"cullface": "north", "uv": [11, 0, 12, 3], "texture": "#1"}
          }
       },
       {
          "from": [11, 13, 15],
          "to": [12.02, 16.02, 16.02],
          "light_emission": 15,
          "faces": {
             "south": {"cullface": "south", "uv": [11, 0, 12, 3], "texture": "#1"}
          }
       },
       {
          "from": [3, 13, 15],
          "to": [4.02, 16.02, 16.02],
          "light_emission": 15,
          "faces": {
             "south": {"cullface": "south", "uv": [3, 0, 4, 3], "texture": "#1"}
          }
       },
       {
          "from": [7, 9, 15],
          "to": [8.02, 12.02, 16.02],
          "light_emission": 15,
          "faces": {
             "south": {"cullface": "south", "uv": [7, 4, 8, 7], "texture": "#1"}
          }
       },
       {
          "from": [15, 9, 15],
          "to": [16.02, 12.02, 16.02],
          "light_emission": 15,
          "faces": {
             "south": {"cullface": "south", "uv": [15, 4, 16, 7], "texture": "#1"}
          }
       },
       {
          "from": [11, 5, 15],
          "to": [12.02, 8.02, 16.02],
          "light_emission": 15,
          "faces": {
             "south": {"cullface": "south", "uv": [11, 8, 12, 11], "texture": "#1"}
          }
       },
       {
          "from": [3, 5, 15],
          "to": [4.02, 8.02, 16.02],
          "light_emission": 15,
          "faces": {
             "south": {"cullface": "south", "uv": [3, 8, 4, 11], "texture": "#1"}
          }
       },
       {
          "from": [7, 1, 15],
          "to": [8.02, 4.02, 16.02],
          "light_emission": 15,
          "faces": {
             "south": {"cullface": "south", "uv": [7, 12, 8, 15], "texture": "#1"}
          }
       },
       {
          "from": [15, 1, 15],
          "to": [16.02, 4.02, 16.02],
          "light_emission": 15,
          "faces": {
             "south": {"cullface": "south", "uv": [15, 12, 16, 15], "texture": "#1"}
          }
       },
       {
          "from": [15, 13, 4],
          "to": [16.02, 16.02, 5.02],
          "light_emission": 15,
          "faces": {
             "east": {"cullface": "east", "uv": [11, 0, 12, 3], "texture": "#1"}
          }
       },
       {
          "from": [15, 13, 12],
          "to": [16.02, 16.02, 13.02],
          "light_emission": 15,
          "faces": {
             "east": {"cullface": "east", "uv": [3, 0, 4, 3], "texture": "#1"}
          }
       },
       {
          "from": [15, 9, 8],
          "to": [16.02, 12.02, 9.02],
          "light_emission": 15,
          "faces": {
             "east": {"cullface": "east", "uv": [7, 4, 8, 7], "texture": "#1"}
          }
       },
       {
          "from": [15, 9, -0.02],
          "to": [16.02, 12.02, 1.02],
          "light_emission": 15,
          "faces": {
             "east": {"cullface": "east", "uv": [15, 4, 16, 7], "texture": "#1"}
          }
       },
       {
          "from": [15, 5, 4],
          "to": [16.02, 8.02, 5.02],
          "light_emission": 15,
          "faces": {
             "east": {"cullface": "east", "uv": [11, 8, 12, 11], "texture": "#1"}
          }
       },
       {
          "from": [15, 5, 12],
          "to": [16.02, 8.02, 13.02],
          "light_emission": 15,
          "faces": {
             "east": {"cullface": "east", "uv": [3, 8, 4, 11], "texture": "#1"}
          }
       },
       {
          "from": [15, 1, 8],
          "to": [16.02, 4.02, 9.02],
          "light_emission": 15,
          "faces": {
             "east": {"cullface": "east", "uv": [7, 12, 8, 15], "texture": "#1"}
          }
       },
       {
          "from": [15, 1, -0.02],
          "to": [16.02, 4.02, 1.02],
          "light_emission": 15,
          "faces": {
             "east": {"cullface": "east", "uv": [15, 12, 16, 15], "texture": "#1"}
          }
       },
       {
          "from": [-0.02, 1, 15],
          "to": [1.02, 4.02, 16.02],
          "light_emission": 15,
          "faces": {
             "west": {"cullface": "west", "uv": [15, 12, 16, 15], "texture": "#1"}
          }
       },
       {
          "from": [-0.02, 1, 7],
          "to": [1.02, 4.02, 8.02],
          "light_emission": 15,
          "faces": {
             "west": {"cullface": "west", "uv": [7, 12, 8, 15], "texture": "#1"}
          }
       },
       {
          "from": [-0.02, 5, 3],
          "to": [1.02, 8.02, 4.02],
          "light_emission": 15,
          "faces": {
             "west": {"cullface": "west", "uv": [3, 8, 4, 11], "texture": "#1"}
          }
       },
       {
          "from": [-0.02, 5, 11],
          "to": [1.02, 8.02, 12.02],
          "light_emission": 15,
          "faces": {
             "west": {"cullface": "west", "uv": [11, 8, 12, 11], "texture": "#1"}
          }
       },
       {
          "from": [-0.02, 9, 15],
          "to": [1.02, 12.02, 16.02],
          "light_emission": 15,
          "faces": {
             "west": {"cullface": "west", "uv": [15, 4, 16, 7], "texture": "#1"}
          }
       },
       {
          "from": [-0.02, 9, 7],
          "to": [1.02, 12.02, 8.02],
          "light_emission": 15,
          "faces": {
             "west": {"cullface": "west", "uv": [7, 4, 8, 7], "texture": "#1"}
          }
       },
       {
          "from": [15, -0.02, 1],
          "to": [16.02, 1.02, 4.02],
          "light_emission": 15,
          "faces": {
             "down": {"cullface": "down", "uv": [15, 12, 16, 15], "texture": "#1"}
          }
       },
       {
          "from": [7, -0.02, 1],
          "to": [8.02, 1.02, 4.02],
          "light_emission": 15,
          "faces": {
             "down": {"cullface": "down", "uv": [7, 12, 8, 15], "texture": "#1"}
          }
       },
       {
          "from": [3, -0.02, 5],
          "to": [4.02, 1.02, 8.02],
          "light_emission": 15,
          "faces": {
             "down": {"cullface": "down", "uv": [3, 8, 4, 11], "texture": "#1"}
          }
       },
       {
          "from": [11, -0.02, 5],
          "to": [12.02, 1.02, 8.02],
          "light_emission": 15,
          "faces": {
             "down": {"cullface": "down", "uv": [11, 8, 12, 11], "texture": "#1"}
          }
       },
       {
          "from": [15, -0.02, 9],
          "to": [16.02, 1.02, 12.02],
          "light_emission": 15,
          "faces": {
             "down": {"cullface": "down", "uv": [15, 4, 16, 7], "texture": "#1"}
          }
       },
       {
          "from": [7, -0.02, 9],
          "to": [8.02, 1.02, 12.02],
          "light_emission": 15,
          "faces": {
             "down": {"cullface": "down", "uv": [7, 4, 8, 7], "texture": "#1"}
          }
       },
       {
          "from": [3, -0.02, 13],
          "to": [4.02, 1.02, 16.02],
          "light_emission": 15,
          "faces": {
             "down": {"cullface": "down", "uv": [3, 0, 4, 3], "texture": "#1"}
          }
       },
       {
          "from": [11, -0.02, 13],
          "to": [12.02, 1.02, 16.02],
          "light_emission": 15,
          "faces": {
             "down": {"cullface": "down", "uv": [11, 0, 12, 3], "texture": "#1"}
          }
       },
       {
          "from": [15, 15, 12],
          "to": [16.02, 16.02, 15.02],
          "light_emission": 15,
          "faces": {
             "up": {"cullface": "up", "uv": [15, 12, 16, 15], "texture": "#1"}
          }
       },
       {
          "from": [7, 15, 12],
          "to": [8.02, 16.02, 15.02],
          "light_emission": 15,
          "faces": {
             "up": {"cullface": "up", "uv": [7, 12, 8, 15], "texture": "#1"}
          }
       },
       {
          "from": [3, 15, 8],
          "to": [4.02, 16.02, 11.02],
          "light_emission": 15,
          "faces": {
             "up": {"cullface": "up", "uv": [3, 8, 4, 11], "texture": "#1"}
          }
       },
       {
          "from": [11, 15, 8],
          "to": [12.02, 16.02, 11.02],
          "light_emission": 15,
          "faces": {
             "up": {"cullface": "up", "uv": [11, 8, 12, 11], "texture": "#1"}
          }
       },
       {
          "from": [15, 15, 4],
          "to": [16.02, 16.02, 7.02],
          "light_emission": 15,
          "faces": {
             "up": {"cullface": "up", "uv": [15, 4, 16, 7], "texture": "#1"}
          }
       },
       {
          "from": [7, 15, 4],
          "to": [8.02, 16.02, 7.02],
          "light_emission": 15,
          "faces": {
             "up": {"cullface": "up", "uv": [7, 4, 8, 7], "texture": "#1"}
          }
       },
       {
          "from": [3, 15, -0.02],
          "to": [4.02, 16.02, 3.02],
          "light_emission": 15,
          "faces": {
             "up": {"cullface": "up", "uv": [3, 0, 4, 3], "texture": "#1"}
          }
       },
       {
          "from": [11, 15, -0.02],
          "to": [12.02, 16.02, 3.02],
          "light_emission": 15,
          "faces": {
             "up": {"cullface": "up", "uv": [11, 0, 12, 3], "texture": "#1"}
          }
       }
    ]
}

This is also how vanilla-emissive-ore texturepacks currently have to work.

Linked issues

Comments

Kevin Turtiak

this is the same thing if i am recalling correctly on how if you use a slim skin on a wide model the extra arm pixels become black right?

[MOD] Greymagic27

We do not have enough information to reproduce this issue.

Please include the following information to help us understand your problem:

Steps to Reproduce:

  1. (Explain what needs to be done for the issue to happen)

Observed Results:
(Briefly describe what happens)

Expected Results:
(Briefly describe what should happen)

Please also attach any needed commands, add-ons/behavior packs, data packs, resource packs, screenshots, videos, or worlds needed to help reproduce this issue.

Refer to the Bug Tracker Guidelines for more information about how to write helpful bug reports. Bug reports with insufficient information may be closed as Incomplete.

This issue is being temporarily resolved as Awaiting Response. Once the requested information has been delivered, the report will be reopened automatically.
Quick Links:
📓 Bug Tracker Guidelines -- 💬 Community Support -- 📧 Mojang Support (Technical Issues) -- 📧 Microsoft Support (Account Issues) -- ✍️ Feedback and Suggestions -- 📖 Game Wiki

skerit

(Unassigned)

Unconfirmed

Textures and models

1.21.4

Retrieved