diff options
| author | shedaniel <daniel@shedaniel.me> | 2019-12-10 23:31:09 +0800 |
|---|---|---|
| committer | shedaniel <daniel@shedaniel.me> | 2019-12-10 23:31:09 +0800 |
| commit | 977350c12271246c2f220761fb33d58bab872357 (patch) | |
| tree | 4de8f3bf4186d532fc9cb3ef130c1e63fff27bd3 /src/main/java/me/shedaniel/rei/impl/ConfigObjectImpl.java | |
| parent | 1b055888a74e68f5a287068428dc80196558fc98 (diff) | |
| download | RoughlyEnoughItems-977350c12271246c2f220761fb33d58bab872357.tar.gz RoughlyEnoughItems-977350c12271246c2f220761fb33d58bab872357.tar.bz2 RoughlyEnoughItems-977350c12271246c2f220761fb33d58bab872357.zip | |
Semi working favorites
Diffstat (limited to 'src/main/java/me/shedaniel/rei/impl/ConfigObjectImpl.java')
| -rw-r--r-- | src/main/java/me/shedaniel/rei/impl/ConfigObjectImpl.java | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/src/main/java/me/shedaniel/rei/impl/ConfigObjectImpl.java b/src/main/java/me/shedaniel/rei/impl/ConfigObjectImpl.java index e2e3d44e5..a4a11343b 100644 --- a/src/main/java/me/shedaniel/rei/impl/ConfigObjectImpl.java +++ b/src/main/java/me/shedaniel/rei/impl/ConfigObjectImpl.java @@ -12,6 +12,10 @@ import me.sargunvohra.mcmods.autoconfig1u.shadowed.blue.endless.jankson.Comment; import me.shedaniel.rei.api.ConfigObject; import me.shedaniel.rei.api.annotations.Internal; import me.shedaniel.rei.gui.config.*; +import net.minecraft.client.util.InputUtil; + +import java.util.ArrayList; +import java.util.List; @Deprecated @Internal @@ -21,18 +25,15 @@ public class ConfigObjectImpl implements ConfigObject, ConfigData { @ConfigEntry.Category("!general") @ConfigEntry.Gui.TransitiveObject @DontApplyFieldName - private General general = new General(); - + public General general = new General(); @ConfigEntry.Category("appearance") @ConfigEntry.Gui.TransitiveObject @DontApplyFieldName private Appearance appearance = new Appearance(); - @ConfigEntry.Category("modules") @ConfigEntry.Gui.TransitiveObject @DontApplyFieldName private Modules modules = new Modules(); - @ConfigEntry.Category("technical") @ConfigEntry.Gui.TransitiveObject @DontApplyFieldName @@ -198,12 +199,27 @@ public class ConfigObjectImpl implements ConfigObject, ConfigData { return appearance.snapToRows; } + @Override + public boolean isFavoritesEnabled() { + return general.favoritesEnabled; + } + + @Override + public InputUtil.KeyCode getFavoriteKeybind() { + return general.favoriteKeybind; + } + public static class General { + @ConfigEntry.Gui.Excluded + public List<String> favorites = new ArrayList<>(); @Comment("Declares whether cheating mode is on.") private boolean cheating = false; @Comment("Declares whether REI is visible.") @ConfigEntry.Gui.Excluded private boolean overlayVisible = true; + private boolean favoritesEnabled = true; + @AddInFrontKeyCode + private InputUtil.KeyCode favoriteKeybind = InputUtil.Type.KEYSYM.createFromCode(65); } public static class Appearance { |
