Package net.neoforged.neoforge.common
Class ToolAction
java.lang.Object
net.neoforged.neoforge.common.ToolAction
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final Map
<String, ToolAction> static com.mojang.serialization.Codec
<ToolAction> private final String
-
Constructor Summary
ModifierConstructorDescriptionprivate
ToolAction
(String name) Useget(String)
to get or create a ToolAction -
Method Summary
Modifier and TypeMethodDescriptionstatic ToolAction
Gets or creates a new ToolAction for the given name.static Collection
<ToolAction> Returns all registered actions.name()
Returns the name of this tool actiontoString()
-
Field Details
-
actions
-
CODEC
-
name
-
-
Constructor Details
-
ToolAction
Useget(String)
to get or create a ToolAction
-
-
Method Details
-
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
-