From 9b4d53d4526e73b26333d26e171d53bde878b15a Mon Sep 17 00:00:00 2001 From: JozsefA Date: Wed, 17 Feb 2021 14:27:49 -0800 Subject: [PATCH] fix one residual merge conflict. creating matrix stacks is expensive, but correct. --- .../components/structureMovement/Contraption.java | 2 +- .../simibubi/create/foundation/render/SuperByteBuffer.java | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/Contraption.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/Contraption.java index 73305f376..1de138917 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/Contraption.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/Contraption.java @@ -799,7 +799,7 @@ public abstract class Contraption { Block block = info.state.getBlock(); CompoundNBT tag = info.nbt; MovementBehaviour movementBehaviour = AllMovementBehaviours.of(block); - if (tag == null || (movementBehaviour != null && movementBehaviour.hasSpecialMovementRenderer())) + if (tag == null) return; tag.putInt("x", info.pos.getX()); diff --git a/src/main/java/com/simibubi/create/foundation/render/SuperByteBuffer.java b/src/main/java/com/simibubi/create/foundation/render/SuperByteBuffer.java index d85977d8e..90d7b54db 100644 --- a/src/main/java/com/simibubi/create/foundation/render/SuperByteBuffer.java +++ b/src/main/java/com/simibubi/create/foundation/render/SuperByteBuffer.java @@ -25,7 +25,7 @@ public class SuperByteBuffer extends TemplateBuffer { } // Vertex Position - private final MatrixStack transforms; + private MatrixStack transforms; // Vertex Texture Coords private SpriteShiftFunc spriteShiftFunc; @@ -152,7 +152,8 @@ public class SuperByteBuffer extends TemplateBuffer { .endVertex(); } - while (!transforms.isEmpty()) transforms.pop(); + transforms = new MatrixStack(); + spriteShiftFunc = null; shouldColor = false; shouldLight = false;