记录类 ToolAction
java.lang.Object
java.lang.Record
net.minecraftforge.common.ToolAction
-
字段概要
字段修饰符和类型字段说明private static final Map
<String, ToolAction> static final com.mojang.serialization.Codec
<ToolAction> private final String
name
记录组件的字段。 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明final boolean
指示某个其他对象是否“等于”此对象。static ToolAction
Gets or creates a new ToolAction for the given name.static Collection
<ToolAction> Returns all registered actions.final int
hashCode()
返回此对象的哈希代码值。name()
Returns the name of this tool actionfinal String
toString()
返回此记录类的字符串表示形式。
-
字段详细资料
-
name
name
记录组件的字段。 -
CODEC
-
ACTIONS
-
-
构造器详细资料
-
ToolAction
Useget(String)
to get or create a ToolAction
-
-
方法详细资料
-
getActions
Returns all registered actions. This collection can be kept around, and will update itself in response to changes to the map. SeeConcurrentHashMap.values()
for details. -
get
Gets or creates a new ToolAction for the given name. -
name
Returns the name of this tool action -
toString
返回此记录类的字符串表示形式。此表示形式包含类的名称,后跟每个记录组件的名称和值。 -
hashCode
public final int hashCode()返回此对象的哈希代码值。此值派生自每个记录组件的哈希代码。 -
equals
指示某个其他对象是否“等于”此对象。如果两个对象属于同一个类,而且所有记录组件都相等,则这两个对象相等。 此记录类中的所有组件都使用Objects::equals(Object,Object)
进行比较。
-