mojira.dev
MC-48817

Cube face winding incorrect (front faces culled) when flipping from and to attribute for cubes

When a cube is defined in a "bad" way the front faces will be culled.

{
"__comment": "Fair warning, this format is highly likely to change even more in the future!",
"name": "cactus",
"useAmbientOcclusion": false,
"elements": [
{ "type": "cube",
"from": [ 0, 0, 0 ],
"to": [ 8, 8, 8 ],
"shade": [ 0.5, 1.0, 0.8, 0.8, 0.6, 0.6 ],
"uv": [
[ 0, 0, 16, 16, "down" ],
[ 0, 0, 16, 16, "down" ],
[ 0, 0, 16, 16, "down" ],
[ 0, 0, 16, 16, "down" ],
[ 0, 0, 16, 16, "down" ],
[ 0, 0, 16, 16, "down" ]
],
"cull": [ false, false, false, false, false, false ]
},
{ "type": "cube",
"from": [ 16, 16, 16 ],
"to": [ 8, 8, 8 ],
"shade": [ 0.5, 1.0, 0.8, 0.8, 0.6, 0.6 ],
"uv": [
[ 0, 0, 16, 16, "down" ],
[ 0, 0, 16, 16, "down" ],
[ 0, 0, 16, 16, "down" ],
[ 0, 0, 16, 16, "down" ],
[ 0, 0, 16, 16, "down" ],
[ 0, 0, 16, 16, "down" ]
],
"cull": [ false, false, false, false, false, false ]
}
]
}

Attachments

Comments 2

Why do you think this is a bug ?

WAI. This happens because the cube is inverted, so technically the faces culled ARE the back faces, because the "front" faces are actually reversed.

To fix this, instead of

"from": [ 16, 16, 16 ], 
"to": [ 8, 8, 8 ],

Do

"from": [ 8, 8, 8 ], 
"to": [ 16, 16, 16 ],

CatzHoek

(Unassigned)

Unconfirmed

block, models, rendering

Minecraft 14w07a

Retrieved