Skip to content

Commit

Permalink
push to 1.12.1
Browse files Browse the repository at this point in the history
  • Loading branch information
zPeanut committed Feb 1, 2022
1 parent ab38c2b commit 30c362f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ apply plugin: 'org.spongepowered.mixin'
// Only edit below this line, the above code adds & enables the necessary things for Forge to be setup.

// The jar version number that will be output when building.
version = '1.12.0'
version = '1.12.1'
// https://maven.apache.org/guides/mini/guide-naming-conventions.html
group = 'me.peanut.hydrogen'
// The jar name that will be output when building.
Expand Down
12 changes: 9 additions & 3 deletions src/main/java/me/peanut/hydrogen/Hydrogen.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import me.peanut.hydrogen.command.CommandManager;
import me.peanut.hydrogen.settings.SettingsManager;

import java.awt.*;
import java.io.*;

public class Hydrogen {
Expand All @@ -37,8 +38,8 @@ public class Hydrogen {
public static final String devs[] = {"zPeanut", "UltramoxX"};
public static final String prefix = "§7[§9" + name + "§7]";

public static String version = "1.12";
public static final String semantic_version = "1.12.0";
public static String version = "1.12.1";
public static final String semantic_version = "1.12.1";

public static final String github = "https://github.com/zpeanut/hydrogen/";
public static final String release = github + "releases/";
Expand All @@ -60,7 +61,7 @@ public class Hydrogen {
public boolean outdated;
public boolean panic = false;
public boolean firstStart;
public boolean isStableBuild = true;
public boolean isStableBuild = false;
public String newversion;

public boolean hasNewFiles;
Expand All @@ -71,22 +72,26 @@ public Hydrogen() {

public void startClient() {
MinecraftForge.EVENT_BUS.register(new EventWorldListener());

directory = new File(Minecraft.getMinecraft().mcDataDir, name);
if (!this.directory.exists()) {
this.firstStart = true;
directory.mkdir();
}

if(new File(directory, "modules.json").exists() || new File(directory, "settings.json").exists() || new File(directory, "clickgui.json").exists()) {
hasNewFiles = true;
} else {
Utils.log("Old Files detected! Will be deleted after game shutdown.");
}

if(!isStableBuild) {
// get commit dates
HTTPUtil.getCurrentCommitDate();
// add git commit hash to version
version += String.format(" §7| %s", HTTPUtil.getCurrentCommitHash());
}

moduleManager = new ModuleManager();
settingsManager = new SettingsManager();
keybindManager = new KeybindUtil();
Expand Down Expand Up @@ -166,6 +171,7 @@ public void stopClient() {

public void isOutdated() {
String version = HTTPUtil.getWebsiteLine("https://raw.githubusercontent.com/zPeanut/Resources/master/semversion-hydrogen");
Utils.log(version);
Semver semver = new Semver(version);
if (semver.isGreaterThan(semantic_version)) {
outdated = true;
Expand Down

0 comments on commit 30c362f

Please sign in to comment.