diff options
| author | shedaniel <daniel@shedaniel.me> | 2021-01-05 12:47:39 +0800 |
|---|---|---|
| committer | shedaniel <daniel@shedaniel.me> | 2021-01-05 12:47:39 +0800 |
| commit | f5b59076cece9e95e76158b17b64fec27616b68b (patch) | |
| tree | b0714ad0affed45ff2aa6250e48d6d8db8a1e294 /runtime/src/main/java/me/shedaniel/rei/impl/ConfigManagerImpl.java | |
| parent | 5385aa5bda42b586f6da45f17f1b3309e0bc900a (diff) | |
| download | RoughlyEnoughItems-f5b59076cece9e95e76158b17b64fec27616b68b.tar.gz RoughlyEnoughItems-f5b59076cece9e95e76158b17b64fec27616b68b.tar.bz2 RoughlyEnoughItems-f5b59076cece9e95e76158b17b64fec27616b68b.zip | |
Configs for syntax highlighting
Signed-off-by: shedaniel <daniel@shedaniel.me>
Diffstat (limited to 'runtime/src/main/java/me/shedaniel/rei/impl/ConfigManagerImpl.java')
| -rw-r--r-- | runtime/src/main/java/me/shedaniel/rei/impl/ConfigManagerImpl.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/runtime/src/main/java/me/shedaniel/rei/impl/ConfigManagerImpl.java b/runtime/src/main/java/me/shedaniel/rei/impl/ConfigManagerImpl.java index 90a99b45f..20761c828 100644 --- a/runtime/src/main/java/me/shedaniel/rei/impl/ConfigManagerImpl.java +++ b/runtime/src/main/java/me/shedaniel/rei/impl/ConfigManagerImpl.java @@ -57,10 +57,8 @@ import me.shedaniel.rei.gui.ContainerScreenOverlay; import me.shedaniel.rei.gui.TransformingScreen; import me.shedaniel.rei.gui.WarningAndErrorScreen; import me.shedaniel.rei.gui.config.RecipeScreenType; -import me.shedaniel.rei.gui.config.entry.FilteringEntry; -import me.shedaniel.rei.gui.config.entry.NoFilteringEntry; -import me.shedaniel.rei.gui.config.entry.RecipeScreenTypeEntry; -import me.shedaniel.rei.gui.config.entry.ReloadPluginsEntry; +import me.shedaniel.rei.gui.config.SyntaxHighlightingMode; +import me.shedaniel.rei.gui.config.entry.*; import me.shedaniel.rei.gui.credits.CreditsScreen; import me.shedaniel.rei.impl.filtering.FilteringRule; import me.shedaniel.rei.impl.filtering.rules.ManualFilteringRule; @@ -172,6 +170,9 @@ public class ConfigManagerImpl implements ConfigManager { Collections.singletonList(new RecipeScreenTypeEntry(220, new TranslatableComponent(i13n), getUnsafely(field, config, RecipeScreenType.UNSET), getUnsafely(field, defaults), type -> setUnsafely(field, config, type))) , (field) -> field.getType() == RecipeScreenType.class, ConfigObjectImpl.UseSpecialRecipeTypeScreen.class); guiRegistry.registerAnnotationProvider((i13n, field, config, defaults, guiProvider) -> + Collections.singletonList(new SearchFilterSyntaxHighlightingEntry( new TranslatableComponent(i13n), getUnsafely(field, config, SyntaxHighlightingMode.COLORFUL), getUnsafely(field, defaults), type -> setUnsafely(field, config, type))) + , (field) -> field.getType() == SyntaxHighlightingMode.class, ConfigObjectImpl.UseSpecialSearchFilterSyntaxHighlightingScreen.class); + guiRegistry.registerAnnotationProvider((i13n, field, config, defaults, guiProvider) -> REIHelper.getInstance().getPreviousContainerScreen() == null || Minecraft.getInstance().getConnection() == null || Minecraft.getInstance().getConnection().getRecipeManager() == null ? Collections.singletonList(new NoFilteringEntry(220, getUnsafely(field, config, new ArrayList<>()), getUnsafely(field, defaults), list -> setUnsafely(field, config, list))) : |
