|
@@ -2,10 +2,8 @@ package me.lortseam.completeconfig.gui;
|
|
|
|
|
|
import lombok.NonNull;
|
|
|
import me.lortseam.completeconfig.data.Config;
|
|
|
-import me.lortseam.completeconfig.gui.cloth.ClothConfigScreenBuilder;
|
|
|
import net.fabricmc.api.EnvType;
|
|
|
import net.fabricmc.api.Environment;
|
|
|
-import net.fabricmc.loader.api.FabricLoader;
|
|
|
import net.minecraft.client.gui.screen.Screen;
|
|
|
|
|
|
import java.util.HashMap;
|
|
@@ -15,7 +13,6 @@ import java.util.Optional;
|
|
|
@Environment(EnvType.CLIENT)
|
|
|
public abstract class ConfigScreenBuilder {
|
|
|
|
|
|
- private static final ConfigScreenBuilder fallback = FabricLoader.getInstance().isModLoaded("cloth-config2") ? new ClothConfigScreenBuilder() : null;
|
|
|
private static final Map<String, ConfigScreenBuilder> builders = new HashMap<>();
|
|
|
|
|
|
/**
|
|
@@ -30,11 +27,7 @@ public abstract class ConfigScreenBuilder {
|
|
|
}
|
|
|
|
|
|
public static Optional<ConfigScreenBuilder> getMain(String modId) {
|
|
|
- ConfigScreenBuilder screenBuilder = builders.get(modId);
|
|
|
- if (screenBuilder != null) {
|
|
|
- return Optional.of(screenBuilder);
|
|
|
- }
|
|
|
- return Optional.ofNullable(fallback);
|
|
|
+ return Optional.ofNullable(builders.get(modId));
|
|
|
}
|
|
|
|
|
|
/**
|