diff options
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(); } |
