Add piston variant rendering & fix lighting
- Fix extended pistons rendering as if they were retracted - Fix retracted pistons rendering completely dark when using a lighting rendermode primitive - Use piston head 'facing' property to determine rotation - Use piston head 'type' property to determine if sticky or not
This commit is contained in:
@@ -316,9 +316,10 @@ lighting_draw(void* data, RenderState* state, PyObject* src, PyObject* mask, PyO
|
||||
if ((state->block_pdata & 4) == 4) { /* bottom right */
|
||||
do_shading_with_mask(self, state, x, y, z + 1, self->facemasks[2]);
|
||||
}
|
||||
/* leaves and ice are transparent for occlusion calculations but they
|
||||
* per face-shading to look as in game */
|
||||
} else if (is_transparent(state->block) && (state->block != 18) && (state->block != 79)) {
|
||||
/* leaves, ice, and pistons are transparent for occlusion calculations
|
||||
* but they need per face-shading to look as in game */
|
||||
} else if (is_transparent(state->block) &&
|
||||
!block_class_is_subset(state->block, (mc_block_t[]){block_leaves, block_ice, block_piston, block_sticky_piston}, 4)) {
|
||||
/* transparent: do shading on whole block */
|
||||
do_shading_with_mask(self, state, x, y, z, mask_light);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user