Hide GUI when exporting screenshot
Workaround not all chunks being loaded in screenshot Fix wrong RenderSettings being exposed in ScreenshotRenderer Update Language submodule
This commit is contained in:
@@ -7,6 +7,7 @@ import com.replaymod.replay.ReplayModReplay;
|
||||
import de.johni0702.minecraft.gui.container.GuiContainer;
|
||||
import de.johni0702.minecraft.gui.container.GuiPanel;
|
||||
import de.johni0702.minecraft.gui.element.GuiLabel;
|
||||
import de.johni0702.minecraft.gui.function.Loadable;
|
||||
import de.johni0702.minecraft.gui.layout.GridLayout;
|
||||
import de.johni0702.minecraft.gui.layout.VerticalLayout;
|
||||
import net.minecraft.crash.CrashReport;
|
||||
@@ -20,7 +21,7 @@ import java.util.ArrayList;
|
||||
import static com.replaymod.core.utils.Utils.error;
|
||||
import static com.replaymod.render.ReplayModRender.LOGGER;
|
||||
|
||||
public class GuiCreateScreenshot extends GuiRenderSettings {
|
||||
public class GuiCreateScreenshot extends GuiRenderSettings implements Loadable {
|
||||
|
||||
private final ReplayMod mod;
|
||||
|
||||
@@ -73,6 +74,12 @@ public class GuiCreateScreenshot extends GuiRenderSettings {
|
||||
return container;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void load() {
|
||||
// pause replay when opening this gui
|
||||
ReplayModReplay.instance.getReplayHandler().getReplaySender().setReplaySpeed(0);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected File generateOutputFile(RenderSettings.EncodingPreset encodingPreset) {
|
||||
File screenshotFolder = new File(getMinecraft().mcDataDir, "screenshots");
|
||||
|
||||
Reference in New Issue
Block a user