mirror of
https://github.com/PuzzleMC/Puzzle.git
synced 2025-12-16 20:05:09 +01:00
First steps to 1.0.0
- Fix modmenu compat - Better Puzzle settings button based on MidnightLib - Partially fix puzzle-splashscreen
This commit is contained in:
@@ -6,7 +6,7 @@ import net.fabricmc.api.ClientModInitializer;
|
||||
|
||||
public class PuzzleCore implements ClientModInitializer {
|
||||
|
||||
public final static String version = "Puzzle A1";
|
||||
public final static String version = "Puzzle R1";
|
||||
public final static String name = "Puzzle";
|
||||
public final static String id = "puzzle";
|
||||
public final static String website = "https://github.com/PuzzleMC/Puzzle";
|
||||
|
||||
@@ -13,7 +13,7 @@ import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.util.*;
|
||||
|
||||
// MidnightConfigLite v0.1.0
|
||||
// MidnightConfigLite v0.2.0
|
||||
// Just writing and parsing of config files
|
||||
|
||||
/** Based on https://github.com/Minenash/TinyConfig
|
||||
@@ -21,13 +21,8 @@ import java.util.*;
|
||||
|
||||
public class MidnightConfigLite {
|
||||
|
||||
private static final List<EntryInfo> entries = new ArrayList<>();
|
||||
|
||||
protected static class EntryInfo {
|
||||
Field field;
|
||||
Object defaultValue;
|
||||
Object value;
|
||||
String tempValue;
|
||||
}
|
||||
|
||||
public static final Map<String,Class<?>> configClass = new HashMap<>();
|
||||
@@ -48,15 +43,6 @@ public class MidnightConfigLite {
|
||||
}
|
||||
try { gson.fromJson(Files.newBufferedReader(path), config); }
|
||||
catch (Exception e) { write(modid); }
|
||||
|
||||
for (EntryInfo info : entries) {
|
||||
if (info.field.isAnnotationPresent(Entry.class))
|
||||
try {
|
||||
info.value = info.field.get(null);
|
||||
info.tempValue = info.value.toString();
|
||||
} catch (IllegalAccessException ignored) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void write(String modid) {
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
"name": "Puzzle",
|
||||
"description": "Unites optifine replacement mods in a clean & vanilla-style gui",
|
||||
"authors": [
|
||||
"Motschen",
|
||||
"TeamMidnightDust"
|
||||
"PuzzleMC",
|
||||
"Motschen"
|
||||
],
|
||||
"contact": {
|
||||
"homepage": "https://www.midnightdust.eu/",
|
||||
@@ -26,7 +26,7 @@
|
||||
},
|
||||
"custom": {
|
||||
"modmenu": {
|
||||
"parent": "puzzle-core"
|
||||
"parent": "puzzle"
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user