diff options
| author | Unknown <shekwancheung0528@gmail.com> | 2019-08-18 19:19:14 +0800 |
|---|---|---|
| committer | Unknown <shekwancheung0528@gmail.com> | 2019-08-18 19:19:14 +0800 |
| commit | 866a775b643b1d729ccaf79e5e1772d481046246 (patch) | |
| tree | 0babf3420f349a93a2bc4ebbdc09fa7c44bfc748 /src/main/java/me/shedaniel/rei/utils/ClothScreenRegistry.java | |
| parent | d02fc1b8dbccefb88c50e4a8780fb8212960041b (diff) | |
| download | RoughlyEnoughItems-866a775b643b1d729ccaf79e5e1772d481046246.tar.gz RoughlyEnoughItems-866a775b643b1d729ccaf79e5e1772d481046246.tar.bz2 RoughlyEnoughItems-866a775b643b1d729ccaf79e5e1772d481046246.zip | |
Close #140
Diffstat (limited to 'src/main/java/me/shedaniel/rei/utils/ClothScreenRegistry.java')
| -rw-r--r-- | src/main/java/me/shedaniel/rei/utils/ClothScreenRegistry.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/main/java/me/shedaniel/rei/utils/ClothScreenRegistry.java b/src/main/java/me/shedaniel/rei/utils/ClothScreenRegistry.java index dfda85b2b..df4cb4c0c 100644 --- a/src/main/java/me/shedaniel/rei/utils/ClothScreenRegistry.java +++ b/src/main/java/me/shedaniel/rei/utils/ClothScreenRegistry.java @@ -12,6 +12,7 @@ import me.shedaniel.rei.api.ConfigManager; import me.shedaniel.rei.gui.config.ItemCheatingMode; import me.shedaniel.rei.gui.config.ItemListOrderingConfig; import me.shedaniel.rei.gui.config.RecipeScreenType; +import me.shedaniel.rei.gui.config.SearchFieldLocation; import me.zeroeightsix.fiber.exception.FiberException; import me.zeroeightsix.fiber.tree.ConfigValue; import net.minecraft.client.gui.screen.Screen; @@ -57,6 +58,14 @@ public class ClothScreenRegistry { .setSaveConsumer(var -> configValue.setValue((ItemCheatingMode) var)) .setErrorSupplier(var -> error((List) configValue.getConstraints(), var, ItemCheatingMode.class)) .build(); + }).registerConfigEntryFunction(SearchFieldLocation.class, o -> { + ConfigValue<SearchFieldLocation> configValue = (ConfigValue<SearchFieldLocation>) o; + return configEntryBuilder.startEnumSelector("config.roughlyenoughitems." + configValue.getName(), SearchFieldLocation.class, configValue.getValue()) + .setDefaultValue(configValue.getDefaultValue()) + .setTooltip(splitLine(configValue.getComment())) + .setSaveConsumer(var -> configValue.setValue((SearchFieldLocation) var)) + .setErrorSupplier(var -> error((List) configValue.getConstraints(), var, SearchFieldLocation.class)) + .build(); }).build().getScreen(); } |
