Package net.xun.armory.api.item.tools
Enum Class ToolType
- All Implemented Interfaces:
Serializable,Comparable<ToolType>,Constable,PieceType
Enumerates the five standard tool types in Minecraft with associated metadata.
This enum defines the complete set of craftable tools, each with:
- A registration suffix for automatic naming
- The corresponding vanilla Minecraft tool class
base_name + suffix.
Important: The iteration order of values is fixed as:
[SWORD, AXE, PICKAXE, HOE, SHOVEL]. This order must be respected when using
array-based configuration methods like
ToolSet.Builder.withToolStats(float[], float[]).
Example Naming: For base name "iron":
| ToolType | Full Name | Vanilla Class |
|---|---|---|
| SWORD | iron_sword | SwordItem |
| AXE | iron_axe | AxeItem |
| PICKAXE | iron_pickaxe | PickaxeItem |
| HOE | iron_hoe | HoeItem |
| SHOVEL | iron_shovel | ShovelItem |
- Since:
- 1.0.0
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionGets the registration suffix for this tool type.Class<? extends net.minecraft.world.item.Item> Gets the vanilla Minecraft tool class for this tool type.static ToolTypeReturns the enum constant of this class with the specified name.static ToolType[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
SWORD
Sword tool type -
AXE
Axe tool type -
PICKAXE
Pickaxe tool type -
HOE
Hoe tool type -
SHOVEL
Shovel tool type
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
getNameSuffix
Gets the registration suffix for this tool type.This suffix is concatenated with the base name to form the complete registry ID for the tool.
- Specified by:
getNameSuffixin interfacePieceType- Returns:
- the registration suffix, never
null
-
getVanillaClass
Gets the vanilla Minecraft tool class for this tool type.This class is used by
DefaultToolCustomizerto create standard tool instances and can be used for type checking or reflection.- Returns:
- the vanilla tool class for this type, never
null
-