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:
CrushedPixel
2017-11-01 15:36:15 +01:00
parent 2ebec358e0
commit a4a9473111
4 changed files with 18 additions and 8 deletions

View File

@@ -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");