mirror of
https://github.com/FabricMC/fabric.git
synced 2024-11-22 15:47:57 -05:00
parent
c00bc2e112
commit
0ddb3a4838
2 changed files with 3 additions and 2 deletions
|
@ -27,6 +27,7 @@ import net.fabricmc.indigo.renderer.aocalc.AoCalculator;
|
|||
import net.fabricmc.indigo.renderer.helper.ColorHelper;
|
||||
import net.fabricmc.indigo.renderer.mesh.EncodingFormat;
|
||||
import net.fabricmc.indigo.renderer.mesh.MutableQuadViewImpl;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
||||
|
@ -140,7 +141,7 @@ public abstract class AbstractQuadRenderer {
|
|||
*/
|
||||
int flatBrightness(MutableQuadViewImpl quad, BlockState blockState, BlockPos pos) {
|
||||
mpos.set(pos);
|
||||
if((quad.geometryFlags() & LIGHT_FACE_FLAG) != 0) {
|
||||
if((quad.geometryFlags() & LIGHT_FACE_FLAG) != 0 || Block.isShapeFullCube(blockState.getCollisionShape(blockInfo.blockView, pos))) {
|
||||
mpos.setOffset(quad.lightFace());
|
||||
}
|
||||
return brightnessFunc.applyAsInt(blockState, mpos);
|
||||
|
|
|
@ -132,7 +132,7 @@ public class TerrainFallbackConsumer extends AbstractQuadRenderer implements Con
|
|||
// vanilla compatibility hack
|
||||
// For flat lighting, cull face drives everything and light face is ignored.
|
||||
if(cullFace == null) {
|
||||
editorQuad.geometryFlags(0);
|
||||
editorQuad.invalidateShape();
|
||||
} else {
|
||||
editorQuad.geometryFlags(GeometryHelper.LIGHT_FACE_FLAG);
|
||||
editorQuad.lightFace(cullFace);
|
||||
|
|
Loading…
Reference in a new issue