Apply face culling consistently in mesh consumer (#216)

This commit is contained in:
grondag 2019-05-27 06:55:27 +02:00 committed by asie
parent 144f81d241
commit 4076d79a11
2 changed files with 6 additions and 4 deletions

View file

@ -1,5 +1,5 @@
archivesBaseName = "fabric-renderer-indigo"
version = getSubprojectVersion(project, "0.1.1")
version = getSubprojectVersion(project, "0.1.2")
dependencies {
compile project(path: ':fabric-api-base', configuration: 'dev')

View file

@ -57,9 +57,7 @@ public abstract class AbstractMeshConsumer extends AbstractQuadRenderer implemen
// only used via RenderContext.getEmitter()
@Override
public Maker emit() {
if(blockInfo.shouldDrawFace(this.cullFace())) {
renderQuad(this);
}
renderQuad(this);
clear();
return this;
}
@ -93,6 +91,10 @@ public abstract class AbstractMeshConsumer extends AbstractQuadRenderer implemen
return;
}
if(!blockInfo.shouldDrawFace(q.cullFace())) {
return;
}
final RenderMaterialImpl.Value mat = q.material();
final int textureCount = mat.spriteDepth();