记录类 InsertingContents
java.lang.Object
java.lang.Record
net.neoforged.neoforge.common.util.InsertingContents
- 所有已实现的接口:
ComponentContents
-
嵌套类概要
从接口继承的嵌套类/接口 net.minecraft.network.chat.ComponentContents
ComponentContents.Type<T extends ComponentContents>
-
字段概要
字段修饰符和类型字段说明static final com.mojang.serialization.MapCodec
<InsertingContents> private final int
index
记录组件的字段。private static final ThreadLocal
<Deque<TranslatableContents>> static final ComponentContents.Type
<InsertingContents> -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明final boolean
指示某个其他对象是否“等于”此对象。final int
hashCode()
返回此对象的哈希代码值。int
index()
返回index
记录组件的值。static void
static boolean
pushTranslation
(TranslatableContents contents) final String
toString()
返回此记录类的字符串表示形式。type()
<T> Optional
<T> visit
(FormattedText.ContentConsumer<T> visitor) <T> Optional
<T> visit
(FormattedText.StyledContentConsumer<T> visitor, Style style) 从接口继承的方法 net.minecraft.network.chat.ComponentContents
resolve
-
字段详细资料
-
index
private final int indexindex
记录组件的字段。 -
CODEC
-
TYPE
-
TRANSLATION_STACK
-
-
构造器详细资料
-
InsertingContents
public InsertingContents(int index) 创建InsertingContents
记录类的实例。- 参数:
index
-index
记录组件的值
-
-
方法详细资料
-
pushTranslation
-
popTranslation
@Internal public static void popTranslation() -
visit
- 指定者:
visit
在接口中ComponentContents
-
visit
- 指定者:
visit
在接口中ComponentContents
-
type
- 指定者:
type
在接口中ComponentContents
-
toString
返回此记录类的字符串表示形式。此表示形式包含类的名称,后跟每个记录组件的名称和值。 -
hashCode
public final int hashCode()返回此对象的哈希代码值。此值派生自每个记录组件的哈希代码。 -
equals
指示某个其他对象是否“等于”此对象。如果两个对象属于同一个类,而且所有记录组件都相等,则这两个对象相等。 此记录类中的所有组件都使用 '==' 进行比较。 -
index
public int index()返回index
记录组件的值。- 返回:
index
记录组件的值
-