Reset all walk animations before exporting

This commit is contained in:
Moulberry committed 2024-11-18 23:37:24 +08:00
1 parent 57350428e8
commit a35a80342c
1 file changed
+8
@@ -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;