Ensure task queue is not locked during rendering (fixes #157)

Similar to 3fedc22 in effect and cause. However tasks are executed, they just
cannot be submitted pre-1.14 because MC would continuously hold the lock on the
scheduledTasks queue for the entire renderVideo call.
This commit is contained in:
Jonas Herzig
2020-05-07 13:42:06 +02:00
parent 316f4e2c3c
commit 72ce522813
3 changed files with 27 additions and 10 deletions

View File

@@ -229,7 +229,7 @@ public class GuiRenderSettings extends GuiScreen implements Closeable {
new GuiRenderQueue(GuiRenderSettings.this, GuiRenderSettings.this, replayHandler, timeline).open();
}
}).setSize(100, 20).setI18nLabel("replaymod.gui.renderqueue.open");
public final GuiButton renderButton = new GuiButton(buttonPanel).onClick(() -> ReplayMod.instance.runLater(new Runnable() {
public final GuiButton renderButton = new GuiButton(buttonPanel).onClick(() -> ReplayMod.instance.runLaterWithoutLock(new Runnable() {
@Override
public void run() {
// Closing this GUI ensures that settings are saved