/* * Copyright (c) Forge Development LLC and contributors * SPDX-License-Identifier: LGPL-2.1-only */ package net.minecraftforge.client; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.screens.Screen; import net.minecraftforge.fml.ModList; import net.minecraftforge.fml.IExtensionPoint; import net.minecraftforge.forgespi.language.IModInfo; import java.util.Optional; import java.util.function.BiFunction; import java.util.function.Function; public class ConfigGuiHandler { /** * @param screenFunction A function that takes the {@link Minecraft} client instance and the mods screen as * arguments and returns your config screen to show when the player clicks the config button * for your mod on the mods screen. *
You should call {@link Minecraft#setScreen(Screen)} with the provided client instance * and mods screen for the action of your close button.
*/ public record ConfigGuiFactory(BiFunctionYou should call {@link Minecraft#setScreen(Screen)} with the provided mods screen * for the action of your close button, using {@link Screen#minecraft} to get the client * instance.
*/ public ConfigGuiFactory(Function