diff options
| author | shedaniel <daniel@shedaniel.me> | 2019-12-15 21:25:49 +0800 |
|---|---|---|
| committer | shedaniel <daniel@shedaniel.me> | 2019-12-15 21:25:49 +0800 |
| commit | c961a0c3995d58137ff9dece986bd092a358f3b6 (patch) | |
| tree | 52204d92ccc74e9dbfb084ae366d9cb6de04af0a /src/main/java/me/shedaniel/rei/REIModMenuEntryPoint.java | |
| parent | fca848e6b4e5e78bd2bec39f5fa91be18d6316b3 (diff) | |
| download | RoughlyEnoughItems-c961a0c3995d58137ff9dece986bd092a358f3b6.tar.gz RoughlyEnoughItems-c961a0c3995d58137ff9dece986bd092a358f3b6.tar.bz2 RoughlyEnoughItems-c961a0c3995d58137ff9dece986bd092a358f3b6.zip | |
3.2.22 Favorites
Close #127
Diffstat (limited to 'src/main/java/me/shedaniel/rei/REIModMenuEntryPoint.java')
| -rw-r--r-- | src/main/java/me/shedaniel/rei/REIModMenuEntryPoint.java | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/main/java/me/shedaniel/rei/REIModMenuEntryPoint.java b/src/main/java/me/shedaniel/rei/REIModMenuEntryPoint.java index fdb0ec1d9..5c04233d2 100644 --- a/src/main/java/me/shedaniel/rei/REIModMenuEntryPoint.java +++ b/src/main/java/me/shedaniel/rei/REIModMenuEntryPoint.java @@ -9,8 +9,7 @@ import io.github.prospector.modmenu.api.ModMenuApi; import me.shedaniel.rei.api.ConfigManager; import net.minecraft.client.gui.screen.Screen; -import java.util.Optional; -import java.util.function.Supplier; +import java.util.function.Function; public class REIModMenuEntryPoint implements ModMenuApi { @@ -19,14 +18,9 @@ public class REIModMenuEntryPoint implements ModMenuApi { return "roughlyenoughitems"; } - @SuppressWarnings("deprecation") @Override - public Optional<Supplier<Screen>> getConfigScreen(Screen screen) { - return Optional.of(() -> getScreen(screen)); - } - - public Screen getScreen(Screen parent) { - return ConfigManager.getInstance().getConfigScreen(parent); + public Function<Screen, ? extends Screen> getConfigScreenFactory() { + return parent -> ConfigManager.getInstance().getConfigScreen(parent); } } |
