mirror of
https://github.com/PuzzleMC/Puzzle.git
synced 2025-12-16 11:55:09 +01:00
Final changes for 1.0.0
This commit is contained in:
@@ -1,18 +1,19 @@
|
||||
package net.puzzlemc.core;
|
||||
|
||||
import net.fabricmc.loader.api.FabricLoader;
|
||||
import net.puzzlemc.core.config.PuzzleConfig;
|
||||
import net.puzzlemc.core.util.UpdateChecker;
|
||||
import net.fabricmc.api.ClientModInitializer;
|
||||
|
||||
public class PuzzleCore implements ClientModInitializer {
|
||||
|
||||
public final static String version = "Puzzle B0";
|
||||
public final static String version = "Puzzle "+ FabricLoader.getInstance().getModContainer("puzzle").get().getMetadata().getVersion();
|
||||
public final static String name = "Puzzle";
|
||||
public final static String id = "puzzle";
|
||||
public final static String website = "https://github.com/PuzzleMC/Puzzle";
|
||||
public static String updateURL = website; //+"download";
|
||||
public static String updateURL = "https://modrinth.com/mod/puzzle";
|
||||
|
||||
public final static String UPDATE_URL = "https://raw.githubusercontent.com/PuzzleMC/Puzzle-Versions/main/puzzle_versions.json";
|
||||
public final static String UPDATE_CHECKER_URL = "https://raw.githubusercontent.com/PuzzleMC/Puzzle-Versions/main/puzzle_versions.json";
|
||||
|
||||
@Override
|
||||
public void onInitializeClient() {
|
||||
|
||||
@@ -29,7 +29,7 @@ public class UpdateChecker {
|
||||
|
||||
public static void init() {
|
||||
CompletableFuture.supplyAsync(() -> {
|
||||
try (Reader reader = new InputStreamReader(new URL(PuzzleCore.UPDATE_URL).openStream())) {
|
||||
try (Reader reader = new InputStreamReader(new URL(PuzzleCore.UPDATE_CHECKER_URL).openStream())) {
|
||||
return GSON.<Map<String, String>>fromJson(reader, UPDATE_TYPE_TOKEN);
|
||||
} catch (MalformedURLException error) {
|
||||
logger.log(Level.ERROR, "Unable to check for updates because of connection problems: " + error.getMessage());
|
||||
@@ -48,7 +48,7 @@ public class UpdateChecker {
|
||||
logger.log(Level.INFO, "Please update immediately!");
|
||||
}
|
||||
} else {
|
||||
logger.log(Level.WARN, "A problem with the database occured, could not check for updates.");
|
||||
logger.log(Level.WARN, "A problem with the database occurred, could not check for updates.");
|
||||
}
|
||||
}, MinecraftClient.getInstance());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user