mojira.dev
MCPE-241941

Custom block icons render incorrectly

Custom block icons render incorrectly in 2 ways: alpha value handling and, in one case, backface culling. Here are the details, sorted by render method:

  • opaque:

    • Normally: alpha values ignored, treated as 255.

    • In icons: alpha values 1 or greater treated as 255.

  • double_sided:

    • Normally: alpha values ignored, treated as 255. No backface culling.

    • In icons: alpha values 1 or greater treated as 255. Has backface culling.

  • alpha_test:

    • Normally: alpha values 128 or greater treated as 255; others treated as 0.

    • In icons: alpha values 1 or greater treated as 255.

  • alpha_test_to_opaque:

    • Normally: alpha values 128 or greater treated as 255; others treated as 0.

    • In icons: alpha values 1 or greater treated as 255.

  • alpha_test_single_sided:

    • Normally: alpha values 128 or greater treated as 255; others treated as 0.

    • In icons: alpha values 1 or greater treated as 255.

  • alpha_test_single_sided_to_opaque:

    • Normally: alpha values 128 or greater treated as 255; others treated as 0.

    • In icons: alpha values 1 or greater treated as 255.

Interestingly, the 2 blend methods do not have any alpha value handling issues. Notice that double_sided has an issue with backface culling; others do not. Also notice that icons for these 6 render methods always blindly use the “alpha values 1 or greater treated as 255” rule.

Demonstration

The attached images demonstrate this issue. There are 6 custom blocks, one for each of the above render methods. All 6 use a custom texture. The red portion is opaque; the green portion is 50% opaque; the blue portion is 49% opaque; the black portion is 0% opaque (fully transparent). With each image, you can compare the icon being held with the world rendering in the background.

Reproduction

This example is taken from the packs in the attached world for convenience. This world can be opened (in Minecraft Preview) for inspection or unzipped to access the code associated with such.

Attachments

Comments 2

Thank you for helping us improve Minecraft! We saved your files:

[media][media][media][media][media][media][media]

This issue has been reviewed by our team.

Please add new, relevant information if it helps us understand or reproduce the issue. To show that you’re affected, use the vote feature rather than commenting.

If a fix is implemented, it will be listed in our official changelogs.

For major outages or urgent assistance, visit the Minecraft Help Center.

Ciosciaa

(Unassigned)

1687817

Confirmed

Multiple

26.50.26 Preview

Retrieved