Lortseam 4 years ago
parent
commit
7d9d1788d2

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

@@ -11,6 +11,13 @@ import java.util.Optional;
 
 public interface ConfigScreenBuilder {
 
+    /**
+     * Returns a new instance of the default screen builder, if present.
+     *
+     * <p>More specifically, if installed, the {@link ClothConfigScreenBuilder} is used by default.
+     *
+     * @return the default screen builder or an empty value if absent
+     */
     static Optional<ConfigScreenBuilder> getDefault() {
         if (FabricLoader.getInstance().isModLoaded("cloth-config2")) {
             return Optional.of(new ClothConfigScreenBuilder());
@@ -18,6 +25,13 @@ public interface ConfigScreenBuilder {
         return Optional.empty();
     }
 
+    /**
+     * Builds a screen based on a config.
+     *
+     * @param parentScreen the parent screen
+     * @param config the config to build the screen of
+     * @return the built screen
+     */
     @Environment(EnvType.CLIENT)
     Screen build(Screen parentScreen, Config config);
 

+ 3 - 0
src/main/java/me/lortseam/completeconfig/gui/cloth/ClothConfigScreenBuilder.java

@@ -20,6 +20,9 @@ import java.util.ArrayList;
 import java.util.List;
 import java.util.function.Supplier;
 
+/**
+ * A screen builder based on the Cloth Config API.
+ */
 @Environment(EnvType.CLIENT)
 public class ClothConfigScreenBuilder implements ConfigScreenBuilder {