diff options
| author | Linnea Gräf <nea@nea.moe> | 2025-10-14 23:45:30 +0200 |
|---|---|---|
| committer | Linnea Gräf <nea@nea.moe> | 2025-10-14 23:45:30 +0200 |
| commit | 2ed4f2d23f70ab6da46edf504371cb6b238c802e (patch) | |
| tree | 7d1b49f8263924a5e13d509c45e72aa1f0316c6e /src/compat/configured/java/ConfigValue.kt | |
| parent | 765a38ecc0f855229722354866eaf561a9a6123c (diff) | |
| download | Firmament-2ed4f2d23f70ab6da46edf504371cb6b238c802e.tar.gz Firmament-2ed4f2d23f70ab6da46edf504371cb6b238c802e.tar.bz2 Firmament-2ed4f2d23f70ab6da46edf504371cb6b238c802e.zip | |
fix: delete old integrations for cit resewn, configured, explosive enhancements
Diffstat (limited to 'src/compat/configured/java/ConfigValue.kt')
| -rw-r--r-- | src/compat/configured/java/ConfigValue.kt | 72 |
1 files changed, 0 insertions, 72 deletions
diff --git a/src/compat/configured/java/ConfigValue.kt b/src/compat/configured/java/ConfigValue.kt deleted file mode 100644 index e16c51c..0000000 --- a/src/compat/configured/java/ConfigValue.kt +++ /dev/null @@ -1,72 +0,0 @@ -package moe.nea.firmament.compat.configured - -import com.mrcrayfish.configured.api.IConfigValue -import net.minecraft.text.Text -import moe.nea.firmament.gui.config.ManagedOption - -class ConfigValue<T: Any>(val option: ManagedOption<T>) : IConfigValue<T> { - var value = option.get() - var initialValue = option.get() - - override fun get(): T { - return value - } - - override fun set(p0: T) { - this.value = p0 - } - - override fun getDefault(): T { - return option.default() - } - - override fun isDefault(): Boolean { - // TODO: should this be an option in handlers? - return option == option.default() - } - - override fun isChanged(): Boolean { - return value != initialValue - } - - override fun restore() { - this.value = option.default() - } - - override fun getComment(): Text? { - return null - } - - override fun getTranslationKey(): String? { - return option.rawLabelText - } - - override fun getValidationHint(): Text? { - return null - } - - override fun getName(): String { - return "" - } - - override fun cleanCache() { - - } - - override fun requiresWorldRestart(): Boolean { - return false - } - - override fun requiresGameRestart(): Boolean { - return false - } - - override fun isValid(p0: T): Boolean { - // TODO: should this be validated? - return true - } - - fun saveValue() { - option.set(value) - } -} |
