Clear particles after applying snapshot in export

This commit is contained in:
Moulberry committed 2024-08-26 14:38:43 +08:00
1 parent 67314cd5ef
commit 5bf0a59e07
2 files changed
+8 -4

No files matched your search

@@ -366,20 +366,20 @@ public class ExportJob {
private void setup(ReplayServer replayServer) {
Minecraft minecraft = Minecraft.getInstance();
// Clear particles
minecraft.particleEngine.clearParticles();
int currentTick = Math.max(0, this.settings.startTick() - 20);
// Ensure replay server is paused at currentTick
this.setServerTickAndWait(replayServer, currentTick, true);
this.runClientTick();
// Clear particles
minecraft.particleEngine.clearParticles();
// Advance until tick is at start
while (currentTick < this.settings.startTick()) {
currentTick += 1;
this.setServerTickAndWait(replayServer, currentTick, true);
this.runClientTick();
currentTick += 1;
}
// Apply initial position and keyframes at start tick