Reset all walk animations before exporting

This commit is contained in:
Moulberry committed 2024-11-18 23:31:42 +08:00
1 parent 069b22457e
commit 0c80b160fd
1 file changed
+8
@@ -35,6 +35,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;
@@ -396,6 +397,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;