From 46fb59289f9e3e7e88f864d98c62de997681c627 Mon Sep 17 00:00:00 2001 From: Jozufozu Date: Tue, 12 Nov 2024 16:55:20 -0800 Subject: [PATCH] Weeping shulkers - Properly fix shulker boxes appearing in the wrong location --- .../engine_room/flywheel/vanilla/ShulkerBoxVisual.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/common/src/main/java/dev/engine_room/flywheel/vanilla/ShulkerBoxVisual.java b/common/src/main/java/dev/engine_room/flywheel/vanilla/ShulkerBoxVisual.java index 8f8953b60..699d96c9e 100644 --- a/common/src/main/java/dev/engine_room/flywheel/vanilla/ShulkerBoxVisual.java +++ b/common/src/main/java/dev/engine_room/flywheel/vanilla/ShulkerBoxVisual.java @@ -53,7 +53,7 @@ public ShulkerBoxVisual(VisualizationContext ctx, ShulkerBoxBlockEntity blockEnt lid = instances.childOrThrow("lid"); initialPose = createInitialPose(); - instances.updateInstancesStatic(initialPose); + applyTransform(partialTick); } private Matrix4f createInitialPose() { @@ -81,7 +81,11 @@ public void beginFrame(Context context) { return; } - float progress = blockEntity.getProgress(context.partialTick()); + applyTransform(context.partialTick()); + } + + private void applyTransform(float partialTicks) { + float progress = blockEntity.getProgress(partialTicks); if (progress == lastProgress) { return; }