From c880cdc2a7470751cfeaa092cf6982e4d69792ad Mon Sep 17 00:00:00 2001 From: PepperCode1 <44146161+PepperCode1@users.noreply.github.com> Date: Mon, 27 May 2024 16:10:57 -0700 Subject: [PATCH] Fix MeshEmitter not restarting builder after emitting --- .../dev/engine_room/flywheel/lib/model/baked/MeshEmitter.java | 1 + .../dev/engine_room/flywheel/lib/model/baked/MeshEmitter.java | 1 + 2 files changed, 2 insertions(+) diff --git a/fabric/src/lib/java/dev/engine_room/flywheel/lib/model/baked/MeshEmitter.java b/fabric/src/lib/java/dev/engine_room/flywheel/lib/model/baked/MeshEmitter.java index 3beaeacb0..268a6e1da 100644 --- a/fabric/src/lib/java/dev/engine_room/flywheel/lib/model/baked/MeshEmitter.java +++ b/fabric/src/lib/java/dev/engine_room/flywheel/lib/model/baked/MeshEmitter.java @@ -41,6 +41,7 @@ void prepareForGeometry(boolean shade) { bufferBuilder.begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.BLOCK); } else if (shade != currentShade) { emit(); + bufferBuilder.begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.BLOCK); } currentShade = shade; diff --git a/forge/src/lib/java/dev/engine_room/flywheel/lib/model/baked/MeshEmitter.java b/forge/src/lib/java/dev/engine_room/flywheel/lib/model/baked/MeshEmitter.java index 4a21280e7..e878ae95c 100644 --- a/forge/src/lib/java/dev/engine_room/flywheel/lib/model/baked/MeshEmitter.java +++ b/forge/src/lib/java/dev/engine_room/flywheel/lib/model/baked/MeshEmitter.java @@ -44,6 +44,7 @@ private void prepareForGeometry(boolean shade) { bufferBuilder.begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.BLOCK); } else if (shade != currentShade) { emit(); + bufferBuilder.begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.BLOCK); } currentShade = shade;