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:
parent
0067d3edce
commit
c2a7fe4019
4 changed files with 24 additions and 12 deletions
|
@ -45,7 +45,17 @@
|
|||
ISaveFormat isaveformat1 = GuiMainMenu.this.field_146297_k.func_71359_d();
|
||||
WorldInfo worldinfo1 = isaveformat1.func_75803_c("Demo_World");
|
||||
if (worldinfo1 != null) {
|
||||
@@ -283,7 +290,10 @@
|
||||
@@ -268,6 +275,9 @@
|
||||
|
||||
this.field_146297_k.func_110434_K().func_110577_a(field_194400_H);
|
||||
func_146110_a(j + 88, 67, 0.0F, 0.0F, 98, 14, 128.0F, 16.0F);
|
||||
+
|
||||
+ net.minecraftforge.client.ForgeHooksClient.renderMainMenu(this, this.field_146289_q, this.field_146294_l, this.field_146295_m);
|
||||
+
|
||||
GlStateManager.func_179094_E();
|
||||
GlStateManager.func_179109_b((float)(this.field_146294_l / 2 + 90), 70.0F, 0.0F);
|
||||
GlStateManager.func_179114_b(-20.0F, 0.0F, 0.0F, 1.0F);
|
||||
@@ -283,7 +293,10 @@
|
||||
s = s + ("release".equalsIgnoreCase(this.field_146297_k.func_184123_d()) ? "" : "/" + this.field_146297_k.func_184123_d());
|
||||
}
|
||||
|
||||
|
@ -57,7 +67,7 @@
|
|||
this.func_73731_b(this.field_146289_q, "Copyright Mojang AB. Do not distribute!", this.field_193979_N, this.field_146295_m - 10, -1);
|
||||
if (p_73863_1_ > this.field_193979_N && p_73863_1_ < this.field_193979_N + this.field_193978_M && p_73863_2_ > this.field_146295_m - 10 && p_73863_2_ < this.field_146295_m) {
|
||||
func_73734_a(this.field_193979_N, this.field_146295_m - 1, this.field_193979_N + this.field_193978_M, this.field_146295_m, -1);
|
||||
@@ -299,6 +309,7 @@
|
||||
@@ -299,6 +312,7 @@
|
||||
if (this.func_183501_a()) {
|
||||
this.field_183503_M.func_73863_a(p_73863_1_, p_73863_2_, p_73863_3_);
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -70,6 +70,10 @@
|
|||
"commands.forge.tracking.no_data": "No data has been recorded yet.",
|
||||
|
||||
|
||||
"forge.update.beta.1": "%sWARNING: %sForge Beta",
|
||||
"forge.update.beta.2": "Major issues may arise, verify before reporting.",
|
||||
"forge.update.newversion": "New Forge version available: %s",
|
||||
|
||||
"forge.configgui.clumpingThreshold.tooltip": "Controls the number threshold at which Packet51 is preferred over Packet52.",
|
||||
"forge.configgui.clumpingThreshold": "Packet Clumping Threshold",
|
||||
"forge.configgui.disableVersionCheck.tooltip": "Set to true to disable Forge's version check mechanics. Forge queries a small json file on our server for version information. For more details see the ForgeVersion class in our github.",
|
||||
|
|
Loading…
Reference in a new issue