diff options
author | Wyvest <45589059+Wyvest@users.noreply.github.com> | 2022-08-08 16:51:20 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-08 08:51:20 +0100 |
commit | 799c389fdb993e363d71d268e0df9ae9f0a0c8a1 (patch) | |
tree | c359d90a7c4c0b4c486939f87da44bcdc2573738 /src | |
parent | fe2d5604ceeff5378b94b1d6f129516a2a66cbc1 (diff) | |
download | OneConfig-799c389fdb993e363d71d268e0df9ae9f0a0c8a1.tar.gz OneConfig-799c389fdb993e363d71d268e0df9ae9f0a0c8a1.tar.bz2 OneConfig-799c389fdb993e363d71d268e0df9ae9f0a0c8a1.zip |
fix config not saving properly (#87)
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/cc/polyfrost/oneconfig/internal/config/compatibility/forge/ForgeCompat.java | 39 |
1 files changed, 36 insertions, 3 deletions
diff --git a/src/main/java/cc/polyfrost/oneconfig/internal/config/compatibility/forge/ForgeCompat.java b/src/main/java/cc/polyfrost/oneconfig/internal/config/compatibility/forge/ForgeCompat.java index fc5ca5e..afa5436 100644 --- a/src/main/java/cc/polyfrost/oneconfig/internal/config/compatibility/forge/ForgeCompat.java +++ b/src/main/java/cc/polyfrost/oneconfig/internal/config/compatibility/forge/ForgeCompat.java @@ -1,10 +1,12 @@ package cc.polyfrost.oneconfig.internal.config.compatibility.forge; +import cc.polyfrost.oneconfig.config.Config; import cc.polyfrost.oneconfig.config.data.Mod; import cc.polyfrost.oneconfig.config.data.ModType; import cc.polyfrost.oneconfig.config.migration.Migrator; import org.jetbrains.annotations.Nullable; +import java.lang.reflect.Field; import java.util.HashMap; public class ForgeCompat { @@ -14,18 +16,49 @@ public class ForgeCompat { public ForgeCompatMod(String name, ModType modType, @Nullable String modIcon, @Nullable Migrator migrator) { super(name, modType, modIcon, migrator); + config = new Config(this, "") { + @Override + public void initialize() { + + } + + @Override + public void save() { + + } + + @Override + public void load() { + + } + + @Override + public void openGui() { + compatMods.get(mod).run(); + } + + @Override + public Object getDefault(Field field) { + return null; + } + + @Override + public void reset() { + + } + }; } public ForgeCompatMod(String name, ModType modType, @Nullable String modIcon) { - super(name, modType, modIcon); + this(name, modType, modIcon, null); } public ForgeCompatMod(String name, ModType modType, @Nullable Migrator migrator) { - super(name, modType, migrator); + this(name, modType, null, migrator); } public ForgeCompatMod(String name, ModType modType) { - super(name, modType); + this(name, modType, null, null); } } } |