记录类 ConfigScreenHandler.ConfigScreenFactory
java.lang.Object
java.lang.Record
net.minecraftforge.client.ConfigScreenHandler.ConfigScreenFactory
- 记录组件:
screenFunction
- A function that takes theMinecraft
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
Minecraft.setScreen(Screen)
with the provided client instance and mods screen for the action of your close button.
- 封闭类:
ConfigScreenHandler
public static record ConfigScreenHandler.ConfigScreenFactory(BiFunction<Minecraft,Screen,Screen> screenFunction)
extends Record
implements IExtensionPoint<ConfigScreenHandler.ConfigScreenFactory>
-
嵌套类概要
从接口继承的嵌套类/接口 net.minecraftforge.fml.IExtensionPoint
IExtensionPoint.DisplayTest
-
字段概要
字段 -
构造器概要
构造器构造器说明ConfigScreenFactory
(BiFunction<Minecraft, Screen, Screen> screenFunction) 创建ConfigScreenFactory
记录类的实例。ConfigScreenFactory
(Function<Screen, Screen> screenFunction) -
方法概要
修饰符和类型方法说明final boolean
指示某个其他对象是否“等于”此对象。final int
hashCode()
返回此对象的哈希代码值。返回screenFunction
记录组件的值。final String
toString()
返回此记录类的字符串表示形式。
-
字段详细资料
-
screenFunction
screenFunction
记录组件的字段。
-
-
构造器详细资料
-
ConfigScreenFactory
- 参数:
screenFunction
- A function that takes the mods screen as an argument and returns your config screen to show when the player clicks the config button for your mod on the mods screen.You should call
Minecraft.setScreen(Screen)
with the provided mods screen for the action of your close button, usingScreen.minecraft
to get the client instance.
-
ConfigScreenFactory
创建ConfigScreenFactory
记录类的实例。- 参数:
screenFunction
-screenFunction
记录组件的值
-
-
方法详细资料
-
toString
返回此记录类的字符串表示形式。此表示形式包含类的名称,后跟每个记录组件的名称和值。 -
hashCode
public final int hashCode()返回此对象的哈希代码值。此值派生自每个记录组件的哈希代码。 -
equals
指示某个其他对象是否“等于”此对象。如果两个对象属于同一个类,而且所有记录组件都相等,则这两个对象相等。 此记录类中的所有组件都使用Objects::equals(Object,Object)
进行比较。 -
screenFunction
返回screenFunction
记录组件的值。- 返回:
screenFunction
记录组件的值
-