blob: 8376517d809c218fc9aaa4588f1613a2317c119b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
package de.hype.bbsentials.client;
import com.terraformersmc.modmenu.api.ConfigScreenFactory;
import com.terraformersmc.modmenu.api.ModMenuApi;
import net.fabricmc.loader.api.FabricLoader;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.gui.screen.NoticeScreen;
import net.minecraft.text.Text;
public class ModMenueScreen implements ModMenuApi {
@Override
public ConfigScreenFactory<?> getModConfigScreenFactory() {
if (FabricLoader.getInstance().isModLoaded("cloth-config2"))
return BBsentialsConfigScreemFactory::create;
return parent -> new NoticeScreen(() -> MinecraftClient.getInstance().setScreen(parent), Text.of("BBsentials"), Text.of("BBsentials requires Cloth Config to be able to show the config."));
}
}
|