Complete all currently actionable 1.13.2 FIXMEs

This commit is contained in:
Jonas Herzig
2019-03-10 22:41:14 +01:00
parent e9ca1bb47e
commit 0f3a6253e0
23 changed files with 313 additions and 289 deletions

View File

@@ -54,7 +54,7 @@ public class FullBrightness implements Extra {
public void run() {
active = !active;
//#if MC>=11300
// FIXME check if this is no longer required (especially when replay is paused)
mod.getMinecraft().entityRenderer.tick(); // need to tick once to update lightmap when replay is paused
//#else
//$$ mod.getMinecraft().entityRenderer.lightmapUpdateNeeded = true;
//#endif

View File

@@ -1,7 +1,6 @@
package com.replaymod.extras;
import com.replaymod.core.ReplayMod;
import com.replaymod.core.Setting;
import com.replaymod.core.versions.MCVer;
import de.johni0702.minecraft.gui.container.AbstractGuiScreen;
import de.johni0702.minecraft.gui.container.GuiContainer;
@@ -40,7 +39,6 @@ import static com.replaymod.extras.ReplayModExtras.LOGGER;
public class OpenEyeExtra implements Extra {
private static final String DOWNLOAD_URL = "https://www.replaymod.com/dl/openeye/" + ReplayMod.getMinecraftVersion();
private static final Setting<Boolean> ASK_FOR_OPEN_EYE = new Setting<>("advanced", "askForOpenEye", null, true);
private ReplayMod mod;
@@ -53,7 +51,7 @@ public class OpenEyeExtra implements Extra {
//#else
//$$ boolean isOpenEyeLoaded = Loader.isModLoaded("OpenEye");
//#endif
if (!isOpenEyeLoaded && mod.getSettingsRegistry().get(ASK_FOR_OPEN_EYE)) {
if (!isOpenEyeLoaded && mod.getSettingsRegistry().get(Setting.ASK_FOR_OPEN_EYE)) {
new Thread(() -> {
try {
LOGGER.trace("Checking for OpenEye availability");
@@ -121,7 +119,7 @@ public class OpenEyeExtra implements Extra {
}).start();
});
noButton.onClick(() -> {
mod.getSettingsRegistry().set(ASK_FOR_OPEN_EYE, false);
mod.getSettingsRegistry().set(Setting.ASK_FOR_OPEN_EYE, false);
mod.getSettingsRegistry().save();
parent.display();
});

View File

@@ -3,6 +3,8 @@ package com.replaymod.extras;
import com.replaymod.core.SettingsRegistry;
public final class Setting<T> {
public static final SettingsRegistry.SettingKey<Boolean> ASK_FOR_OPEN_EYE =
new SettingsRegistry.SettingKeys<>("advanced", "askForOpenEye", null, true);
public static final SettingsRegistry.SettingKey<Boolean> SKIP_POST_SCREENSHOT_GUI =
new SettingsRegistry.SettingKeys<>("advanced", "skipPostScreenshotGui", null, false);
}

View File

@@ -26,7 +26,8 @@ public class ScreenshotRenderer implements RenderInfo {
public boolean renderScreenshot() throws Throwable {
try {
//#if MC>=11300
// FIXME
int displayWidthBefore = mc.mainWindow.framebufferWidth;
int displayHeightBefore = mc.mainWindow.framebufferHeight;
//#else
//$$ int displayWidthBefore = mc.displayWidth;
//$$ int displayHeightBefore = mc.displayHeight;
@@ -48,7 +49,9 @@ public class ScreenshotRenderer implements RenderInfo {
mc.gameSettings.hideGUI = hideGUIBefore;
//#if MC>=11300
// FIXME
mc.mainWindow.framebufferWidth = displayWidthBefore;
mc.mainWindow.framebufferHeight = displayHeightBefore;
mc.getFramebuffer().createBindFramebuffer(displayWidthBefore, displayHeightBefore);
//#else
//$$ mc.resize(displayWidthBefore, displayHeightBefore);
//#endif