Check cullface after transform

This commit is contained in:
2xsaiko 2020-02-08 23:13:36 +01:00 committed by Player
parent aea78a258d
commit 88fd2ae928

View file

@ -92,7 +92,7 @@ public abstract class TerrainFallbackConsumer extends AbstractQuadRenderer imple
List<BakedQuad> quads = model.getQuads(blockState, face, random.get());
final int count = quads.size();
if (count != 0 && blockInfo.shouldDrawFace(face)) {
if (count != 0) {
for (int j = 0; j < count; j++) {
BakedQuad q = quads.get(j);
renderQuad(q, face, defaultMaterial);
@ -131,6 +131,12 @@ public abstract class TerrainFallbackConsumer extends AbstractQuadRenderer imple
return;
}
cullFace = editorQuad.cullFace();
if (cullFace != null && !blockInfo.shouldDrawFace(cullFace)) {
return;
}
if (!editorQuad.material().disableAo(0)) {
// needs to happen before offsets are applied
editorQuad.invalidateShape();