There is an issue with the shadows of custom blocks. Despite setting the "minecraft:block_light_absorption" property to 0, shadows are still being generated. This problem does not occur if the block model is customized as a unit cube or if it has a predefined geometry. However, when these conditions are not met, this error occurs. It is important to address this issue so that creators of custom blocks can design connected glass textures without unwanted shadow generation.
Attachments
Comments 3
To create a custom block, we have certain codes that can be used. One of them is "minecraft:unit_cube": {}, which sets the block as a cubic block without a custom 3D model. This means that the block will be represented as a simple cube in the game, without any additional details or custom geometry. This code is useful when an elaborate 3D model is not required for the block.
When this code is removed and the "minecraft:geometry" code is not present either, the block will be displayed in the same way as a glass block. This makes the block become invisible if it is covered by blocks of the same type. This is particularly useful for creating custom glass blocks, as the faces covered by other blocks of the same type will not be visible. However, the problem arises when configuring a block in this way: the "minecraft:block_light_absorption" code, set to 0, stops working, and the block generates shadows despite being transparent.
However, if the "minecraft:geometry" or "minecraft:unit_cube" codes are added, the block will no longer cast shadows. This indicates that the "minecraft:block_light_absorption" code, set to 0, is functioning perfectly. The bug lies in its inability to work independently of both codes, resulting in these peculiar shadows for connected transparent blocks, as shown in the image.
Could you please attach an example add-on that can be used to reproduce the issue to your report? This will help us investigate and address the problem more effectively.
{
"format_version": "1.16.100",
"minecraft:block": {
"description": {
"identifier": "daz:example1"
}, "components": {
"tag:glass": {},
"minecraft:block_light_absorption": 0, // It doesn't work. "minecraft:loot": "loot_tables/empy",
"minecraft:destroy_time": 0.3,
"minecraft:friction": 0.6,
"minecraft:creative_category": {
"category": "construction",
"group": "itemGroup.name.glass"
},
"minecraft:flammable": {
"flame_odds": 0,
"burn_odds": 0
},
"minecraft:block_light_emission": 0.0,
"minecraft:material_instances" : {
"*": {
"texture": "glass",
"render_method": "blend"
}
}
}
}
}
{
"format_version": "1.16.100",
"minecraft:block": {
"description": {
"identifier": "daz:example2"
}, "components": {
"tag:glass": {},
"minecraft:block_light_absorption": 0, // It works
"minecraft:loot": "loot_tables/empy",
"minecraft:destroy_time": 0.3,
"minecraft:friction": 0.6,
"minecraft:creative_category": {
"category": "construction",
"group": "itemGroup.name.glass"
},
"minecraft:flammable": {
"flame_odds": 0,
"burn_odds": 0
},
"minecraft:block_light_emission": 0.0,
"minecraft:unit_cube": {}, // This code is what prevents the faces from becoming invisible. When it is removed, the error occurs.
"minecraft:material_instances" : {
"*": {
"texture": "soul_glass",
"render_method": "blend"
}
}
}
}
}
Thank you for your report!
However, this issue has been temporarily closed as Awaiting Response.
Is this still an issue in the latest version? If yes, can you please add it to the affected versions (or mention it if you are not the reporter)?
This ticket will automatically reopen when you reply.
Quick Links:
📓 Issue Guidelines – 💬 Mojang Support – 📓 Project Summary – 📧 Suggestions – 📖 Minecraft Wiki
Resolving temporarily as Awaiting Response. Could you please attach an example add-on that can be used to reproduce the issue to your report?
This ticket will reopen automatically when you reply.