Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/18.x/forge' into 19.2/forge
Browse files Browse the repository at this point in the history
  • Loading branch information
embeddedt committed Oct 12, 2023
2 parents e51eadf + b1a0fb3 commit d9600c8
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,21 @@ public boolean shouldDrawSide(BlockState selfState, BlockView view, BlockPos pos
}

if (selfShape.isEmpty()) {
// Upstream Sodium only returns true under stricter conditions than this, in order to cull faces in
// unusual block arrangements like a potted cacti under a solid block.
// However, that fix has the side effect of causing block models with improperly specified cullfaces
// to not render sometimes, and also breaks powder snow culling on 1.17+.
// It's not clear that the stricter check provides a significant performance uplift, so we err
// on the side of compatibility and use the same weaker check as vanilla.
return true;
/*
if (adjShape.isEmpty()){
return true; //example: top face of potted plants if top slab is placed above
}
else if (!adjState.isSideSolid(view,adjPos,facing.getOpposite(), SideShapeType.FULL)){
return true; //example: face of potted plants rendered if top stair placed above
}
*/
}

return this.calculate(selfShape, adjShape);
Expand Down

0 comments on commit d9600c8

Please sign in to comment.