Bring back the forge beta warning. Use a check to see if the forge minor version is zero, as ForgeVersion.getStatus() is not implemented

This commit is contained in:
ichttt committed 2019-01-27 19:50:59 +01:00
1 parent 0067d3edce
commit c2a7fe4019
4 files changed
+24 -12

No files matched your search

@@ -296,11 +296,9 @@ public class ForgeHooksClient
//RenderingRegistry.registerBlockHandler(RenderBlockFluid.instance);
}
private static int updatescrollcounter = 0;
public static String renderMainMenu(GuiMainMenu gui, FontRenderer font, int width, int height, String splashText)
public static void renderMainMenu(GuiMainMenu gui, FontRenderer font, int width, int height)
{
VersionChecker.Status status = ForgeVersion.getStatus();
if (status == BETA || status == BETA_OUTDATED)
if (ForgeVersion.getVersion().getMinorVersion() == 0)
{
// render a warning at the top of the screen,
String line = I18n.format("forge.update.beta.1", TextFormatting.RED, TextFormatting.RESET);
@@ -310,7 +308,7 @@ public class ForgeHooksClient
}
String line = null;
switch(status)
switch(ForgeVersion.getStatus())
{
//case FAILED: line = " Version check failed"; break;
//case UP_TO_DATE: line = "Forge up to date"}; break;
@@ -325,8 +323,6 @@ public class ForgeHooksClient
// if we have a line, render it in the bottom right, above Mojang's copyright line
gui.drawString(font, line, width - font.getStringWidth(line) - 2, height - (2 * (font.FONT_HEIGHT + 1)), -1);
}
return splashText;
}
public static ISound playSound(SoundManager manager, ISound sound)
@@ -23,6 +23,8 @@ import net.minecraftforge.fml.VersionChecker;
import net.minecraftforge.fml.loading.JarVersionLookupHandler;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.apache.maven.artifact.versioning.ArtifactVersion;
import org.apache.maven.artifact.versioning.DefaultArtifactVersion;
import javax.annotation.Nullable;
@@ -34,7 +36,7 @@ public class ForgeVersion
// This is Forge's Mod Id, used for the ForgeMod and resource locations
public static final String MOD_ID = "forge";
private static final String forgeVersion;
private static final ArtifactVersion forgeVersion;
private static final String forgeSpec;
private static final String forgeGroup;
@@ -48,7 +50,7 @@ public class ForgeVersion
if (group == null) {
group = "net.minecraftforge"; // If all else fails, Our normal group
}
forgeVersion = vers;
forgeVersion = new DefaultArtifactVersion(vers);
forgeSpec = spec;
forgeGroup = group;
LOGGER.debug(CORE, "Found Forge version {}", forgeVersion);
@@ -56,7 +58,7 @@ public class ForgeVersion
LOGGER.debug(CORE, "Found Forge group {}", forgeGroup);
}
public static String getVersion()
public static ArtifactVersion getVersion()
{
return forgeVersion;
}