Weeping shulkers

- Properly fix shulker boxes appearing in the wrong location
This commit is contained in:
Jozufozu 2024-11-12 16:55:20 -08:00
parent cfcb4246af
commit 46fb59289f

View file

@ -53,7 +53,7 @@ public class ShulkerBoxVisual extends AbstractBlockEntityVisual<ShulkerBoxBlockE
lid = instances.childOrThrow("lid"); lid = instances.childOrThrow("lid");
initialPose = createInitialPose(); initialPose = createInitialPose();
instances.updateInstancesStatic(initialPose); applyTransform(partialTick);
} }
private Matrix4f createInitialPose() { private Matrix4f createInitialPose() {
@ -81,7 +81,11 @@ public class ShulkerBoxVisual extends AbstractBlockEntityVisual<ShulkerBoxBlockE
return; return;
} }
float progress = blockEntity.getProgress(context.partialTick()); applyTransform(context.partialTick());
}
private void applyTransform(float partialTicks) {
float progress = blockEntity.getProgress(partialTicks);
if (progress == lastProgress) { if (progress == lastProgress) {
return; return;
} }