Fix MeshEmitter not restarting builder after emitting

This commit is contained in:
PepperCode1 2024-05-27 16:10:57 -07:00
parent 9593126d6e
commit c880cdc2a7
2 changed files with 2 additions and 0 deletions

View File

@ -41,6 +41,7 @@ class MeshEmitter {
bufferBuilder.begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.BLOCK);
} else if (shade != currentShade) {
emit();
bufferBuilder.begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.BLOCK);
}
currentShade = shade;

View File

@ -44,6 +44,7 @@ class MeshEmitter implements VertexConsumer {
bufferBuilder.begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.BLOCK);
} else if (shade != currentShade) {
emit();
bufferBuilder.begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.BLOCK);
}
currentShade = shade;