소스 검색

Remove static screen builder function

Lortseam 4 년 전
부모
커밋
5c2d4f28f0
1개의 변경된 파일0개의 추가작업 그리고 14개의 파일을 삭제
  1. 0 14
      lib/src/main/java/me/lortseam/completeconfig/gui/ConfigScreenBuilder.java

+ 0 - 14
lib/src/main/java/me/lortseam/completeconfig/gui/ConfigScreenBuilder.java

@@ -34,20 +34,6 @@ public abstract class ConfigScreenBuilder {
         return Optional.ofNullable(fallback);
     }
 
-    /**
-     * Tries to build a screen based on a config. Fails if no main screen builder was specified for the mod and no
-     * fallback builder exists.
-     *
-     * @param parentScreen the parent screen
-     * @param config the config to build the screen of
-     * @return the built screen, if successful
-     */
-    public static Screen tryBuild(Screen parentScreen, Config config) {
-        return getMain(config.getMod().getId()).orElseThrow(() -> {
-            return new UnsupportedOperationException("No screen builder found for mod " + config.getMod().getId());
-        }).build(parentScreen, config);
-    }
-
     /**
      * Builds a screen based on a config.
      *