From a35a80342c6596026158319a0f0e028a50543731 Mon Sep 17 00:00:00 2001 From: Moulberry Date: Mon, 18 Nov 2024 23:31:42 +0800 Subject: [PATCH] Reset all walk animations before exporting --- .../java/com/moulberry/flashback/exporting/ExportJob.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/main/java/com/moulberry/flashback/exporting/ExportJob.java b/src/main/java/com/moulberry/flashback/exporting/ExportJob.java index 30e5f35..5b2717d 100644 --- a/src/main/java/com/moulberry/flashback/exporting/ExportJob.java +++ b/src/main/java/com/moulberry/flashback/exporting/ExportJob.java @@ -33,6 +33,7 @@ import net.minecraft.client.resources.sounds.SimpleSoundInstance; import net.minecraft.network.chat.Component; import net.minecraft.sounds.SoundEvents; import net.minecraft.world.entity.Entity; +import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.phys.Vec3; import org.bytedeco.ffmpeg.global.avutil; import org.joml.Matrix4f; @@ -395,6 +396,13 @@ public class ExportJob { // Clear particles minecraft.particleEngine.clearParticles(); + // Reset all walk animations + for (Entity entity : minecraft.level.entitiesForRendering()) { + if (entity instanceof LivingEntity livingEntity) { + livingEntity.walkAnimation.stop(); + } + } + // Advance until tick is at start while (currentTick < this.settings.startTick()) { currentTick += 1;