mirror of
https://github.com/Lucaslah/WeatherChanger.git
synced 2026-01-10 21:17:51 +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:
@@ -3,15 +3,11 @@ package me.lucaslah.weatherchanger.fabric;
|
||||
import me.lucaslah.weatherchanger.WeatherChanger;
|
||||
import net.fabricmc.api.ClientModInitializer;
|
||||
import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientLifecycleEvents;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
public class WeatherChangerFabric implements ClientModInitializer {
|
||||
public static final Logger LOGGER = LogManager.getLogger("weather-changer");
|
||||
|
||||
@Override
|
||||
public void onInitializeClient() {
|
||||
WeatherChanger.init();
|
||||
WeatherChanger.init(new WeatherChangerPlatformImpl());
|
||||
ClientLifecycleEvents.CLIENT_STOPPING.register(client -> WeatherChanger.shutdown());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,16 +1,19 @@
|
||||
package me.lucaslah.weatherchanger.fabric;
|
||||
|
||||
import me.lucaslah.weatherchanger.WeatherChangerPlatform;
|
||||
import me.lucaslah.weatherchanger.keybinding.KeybindingManager;
|
||||
import net.fabricmc.loader.api.FabricLoader;
|
||||
|
||||
import java.nio.file.Path;
|
||||
|
||||
public class WeatherChangerExpectPlatformImpl {
|
||||
public static Path getConfigDirectory() {
|
||||
public class WeatherChangerPlatformImpl implements WeatherChangerPlatform {
|
||||
@Override
|
||||
public Path getConfigDirectory() {
|
||||
return FabricLoader.getInstance().getConfigDir();
|
||||
}
|
||||
|
||||
public static KeybindingManager getKeybindingManager() {
|
||||
@Override
|
||||
public KeybindingManager getKeybindingManager() {
|
||||
return new FabricKeybindingManager();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user