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
1or greater treated as255.
double_sided:Normally: alpha values ignored, treated as
255. No backface culling.In icons: alpha values
1or greater treated as255. Has backface culling.
alpha_test:Normally: alpha values
128or greater treated as255; others treated as0.In icons: alpha values
1or greater treated as255.
alpha_test_to_opaque:Normally: alpha values
128or greater treated as255; others treated as0.In icons: alpha values
1or greater treated as255.
alpha_test_single_sided:Normally: alpha values
128or greater treated as255; others treated as0.In icons: alpha values
1or greater treated as255.
alpha_test_single_sided_to_opaque:Normally: alpha values
128or greater treated as255; others treated as0.In icons: alpha values
1or greater treated as255.
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
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.
Thank you for helping us improve Minecraft! We saved your files: