Update buildscript and update checker

This commit is contained in:
Vincent Lee committed 2016-03-12 16:26:59 -06:00
1 parent 3cc7099ab2
commit 099c02157e
7 files changed
+16 -12

No files matched your search

@@ -27,7 +27,7 @@ public class ThreadVersionChecker extends Thread {
@Override
public void run() {
try {
URL url = new URL("https://raw.githubusercontent.com/Vazkii/Botania/master/version/" + MinecraftForge.MC_VERSION + ".txt");
URL url = new URL("https://raw.githubusercontent.com/williewillus/Botania/MC18/version/" + MinecraftForge.MC_VERSION + ".txt");
BufferedReader r = new BufferedReader(new InputStreamReader(url.openStream()));
VersionChecker.onlineVersion = r.readLine();
r.close();
@@ -45,7 +45,7 @@ public final class VersionChecker {
if(!onlineVersion.isEmpty()) {
EntityPlayer player = Minecraft.getMinecraft().thePlayer;
int onlineBuild = Integer.parseInt(onlineVersion.split("-")[1]);
int clientBuild = LibMisc.BUILD.contains("GRADLE") ? Integer.MAX_VALUE : Integer.parseInt(LibMisc.BUILD);
int clientBuild = LibMisc.BUILD.contains("GRADLE") ? Integer.MIN_VALUE : Integer.parseInt(LibMisc.BUILD);
if(onlineBuild > clientBuild) {
player.addChatComponentMessage(new ChatComponentTranslation("botania.versioning.flavour" + player.worldObj.rand.nextInt(FLAVOUR_MESSAGES)).setChatStyle(new ChatStyle().setColor(EnumChatFormatting.LIGHT_PURPLE)));
player.addChatComponentMessage(new ChatComponentTranslation("botania.versioning.outdated", clientBuild, onlineBuild));