mirror of
https://github.com/Lucaslah/WeatherChanger.git
synced 2026-01-06 21:47:52 +00:00
First progress on forge support
- add forge module - github actions build and release - aim for all-in-one jar supporting both fabric and forge **NOTICE** Forge support is not currently working. Signed-off-by: Lucas Petrino <nsx1lucas@gmail.com>
This commit is contained in:
@@ -20,8 +20,10 @@ import java.util.Objects;
|
||||
public class WeatherChanger {
|
||||
private static final Gson gson = new GsonBuilder().setPrettyPrinting().create();
|
||||
private static WcMode currentMode = WcMode.OFF;
|
||||
private static WeatherChangerPlatform platform;
|
||||
|
||||
public static void init() {
|
||||
public static void init(WeatherChangerPlatform platform) {
|
||||
WeatherChanger.platform = platform;
|
||||
boolean fileCreated = false;
|
||||
File configPath = getConfigFile();
|
||||
|
||||
@@ -39,7 +41,7 @@ public class WeatherChanger {
|
||||
loadConfig();
|
||||
}
|
||||
|
||||
KeybindingManager keybindingManager = WeatherChangerExpectPlatform.getKeybindingManager();
|
||||
KeybindingManager keybindingManager = platform.getKeybindingManager();
|
||||
|
||||
keybindingManager
|
||||
.add(new ToggleClearKey())
|
||||
@@ -96,7 +98,7 @@ public class WeatherChanger {
|
||||
}
|
||||
|
||||
private static File getConfigFile() {
|
||||
return WeatherChangerExpectPlatform.getConfigDirectory().resolve("weather-changer.json").toFile();
|
||||
return platform.getConfigDirectory().resolve("weather-changer.json").toFile();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user