Skip to content

Commit ed18645

Browse files
committed
Improve loading plugin
- Split init code - Use LibraryManager to find libraries folder - Make sure VanillaFix is first on classpath (latest mixin version)
1 parent ad6b9a0 commit ed18645

7 files changed

Lines changed: 149 additions & 159 deletions

File tree

build.gradle

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,8 @@ processResources {
9898
jar {
9999
classifier "thin"
100100
manifest.attributes(
101-
"FMLCorePluginContainsFMLMod": "true",
102-
"TweakClass": "org.spongepowered.asm.launch.MixinTweaker",
103101
"FMLCorePlugin": "org.dimdev.vanillafix.VanillaFixLoadingPlugin",
104-
"ForceLoadAsMod": "true",
102+
"FMLCorePluginContainsFMLMod": "true",
105103
"FMLAT": "vanillafix_at.cfg"
106104
)
107105
}

src/main/java/org/dimdev/utils/ProfileFinder.java

Lines changed: 0 additions & 39 deletions
This file was deleted.

src/main/java/org/dimdev/vanillafix/LoadingConfig.java

Lines changed: 12 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -5,41 +5,28 @@
55
import java.io.File;
66

77
public class LoadingConfig {
8+
public boolean bugFixes = true;
9+
public boolean crashFixes = true;
10+
public boolean modSupport = true;
11+
public boolean profiler = true;
12+
public boolean textureFixes = true;
13+
public boolean blockstates = true;
14+
public boolean dynamicResources = true;
15+
public boolean improvedLaunchWrapper = true;
816

9-
private Configuration config;
10-
11-
public boolean bugFixes;
12-
public boolean crashFixes;
13-
public boolean modSupport;
14-
public boolean profiler;
15-
public boolean textureFixes;
16-
public boolean blockstates;
17-
public boolean dynamicResources;
18-
19-
public void init(File file) {
17+
public LoadingConfig(File file) {
2018
if (!file.exists()) {
21-
bugFixes = true;
22-
crashFixes = true;
23-
modSupport = true;
24-
profiler = true;
25-
textureFixes = true;
26-
blockstates = true;
27-
dynamicResources = true;
2819
return;
2920
}
30-
if (config == null) {
31-
config = new Configuration(file);
32-
reload();
33-
}
34-
}
3521

36-
public void reload() {
22+
Configuration config = new Configuration(file);
3723
bugFixes = config.get("fixes", "bugFixes", true).getBoolean();
3824
crashFixes = config.get("fixes", "crashFixes", true).getBoolean();
3925
modSupport = config.get("fixes", "modSupport", true).getBoolean();
4026
profiler = config.get("fixes", "profiler", true).getBoolean();
4127
textureFixes = config.get("fixes", "textureFixes", true).getBoolean();
4228
blockstates = config.get("fixes", "blockstates", true).getBoolean();
43-
dynamicResources = config.get("fixes", "dynamicresources", true).getBoolean();
29+
dynamicResources = config.get("fixes", "dynamicResources", true).getBoolean();
30+
improvedLaunchWrapper = config.get("fixes", "improvedLaunchWrapper", true).getBoolean();
4431
}
4532
}

0 commit comments

Comments
 (0)