formatting changes

This commit is contained in:
IThundxr 2024-10-14 17:53:30 -04:00
parent 008b09891a
commit fa57f34c47
Failed to generate hash of commit
2 changed files with 4 additions and 5 deletions

View file

@ -31,9 +31,7 @@ class MeshEmitter {
public void end() { public void end() {
if (((BufferBuilderAccessor) bufferBuilder).flywheel$getBuilding()) { if (((BufferBuilderAccessor) bufferBuilder).flywheel$getBuilding()) {
emit(); emit();
bufferBuilder = new BufferBuilder(byteBufferBuilder, VertexFormat.Mode.QUADS, DefaultVertexFormat.BLOCK);
} }
resultConsumer = null; resultConsumer = null;
} }
@ -47,7 +45,6 @@ class MeshEmitter {
bufferBuilder = new BufferBuilder(byteBufferBuilder, VertexFormat.Mode.QUADS, DefaultVertexFormat.BLOCK); bufferBuilder = new BufferBuilder(byteBufferBuilder, VertexFormat.Mode.QUADS, DefaultVertexFormat.BLOCK);
} else if (shade != currentShade) { } else if (shade != currentShade) {
emit(); emit();
bufferBuilder = new BufferBuilder(byteBufferBuilder, VertexFormat.Mode.QUADS, DefaultVertexFormat.BLOCK);
} }
currentShade = shade; currentShade = shade;
@ -60,5 +57,7 @@ class MeshEmitter {
resultConsumer.accept(renderType, currentShade, renderedBuffer); resultConsumer.accept(renderType, currentShade, renderedBuffer);
renderedBuffer.close(); renderedBuffer.close();
} }
bufferBuilder = new BufferBuilder(byteBufferBuilder, VertexFormat.Mode.QUADS, DefaultVertexFormat.BLOCK);
} }
} }

View file

@ -34,7 +34,6 @@ class MeshEmitter implements VertexConsumer {
public void end() { public void end() {
if (((BufferBuilderAccessor) bufferBuilder).flywheel$getBuilding()) { if (((BufferBuilderAccessor) bufferBuilder).flywheel$getBuilding()) {
emit(); emit();
bufferBuilder = new BufferBuilder(byteBufferBuilder, VertexFormat.Mode.QUADS, DefaultVertexFormat.BLOCK);
} }
resultConsumer = null; resultConsumer = null;
} }
@ -49,7 +48,6 @@ class MeshEmitter implements VertexConsumer {
bufferBuilder = new BufferBuilder(byteBufferBuilder, VertexFormat.Mode.QUADS, DefaultVertexFormat.BLOCK); bufferBuilder = new BufferBuilder(byteBufferBuilder, VertexFormat.Mode.QUADS, DefaultVertexFormat.BLOCK);
} else if (shade != currentShade) { } else if (shade != currentShade) {
emit(); emit();
bufferBuilder = new BufferBuilder(byteBufferBuilder, VertexFormat.Mode.QUADS, DefaultVertexFormat.BLOCK);
} }
currentShade = shade; currentShade = shade;
@ -66,6 +64,8 @@ class MeshEmitter implements VertexConsumer {
resultConsumer.accept(renderType, currentShade, renderedBuffer); resultConsumer.accept(renderType, currentShade, renderedBuffer);
renderedBuffer.close(); renderedBuffer.close();
} }
bufferBuilder = new BufferBuilder(byteBufferBuilder, VertexFormat.Mode.QUADS, DefaultVertexFormat.BLOCK);
} }
@Override @Override