Class ToolSet
java.lang.Object
net.xun.lib.common.api.item.tools.ToolSet
Represents a complete set of tools (sword, axe, pickaxe, shovel, hoe) with configurable attributes.
Use the nested
ToolSet.Builder to configure and create tool sets with consistent properties.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder for constructingToolSetinstances with flexible configuration. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedToolSet(String name, net.minecraft.world.item.Tier tier, EnumMap<ToolType, Float> attackDamage, EnumMap<ToolType, Float> attackSpeed, Supplier<net.minecraft.world.item.Item.Properties> propertiesSupplier, ToolConfigurator configuration, AttributeHelper attributeHelper) -
Method Summary
Modifier and TypeMethodDescriptionList<net.minecraft.world.item.Item> getAll()Retrieves all registered tool items in this set.Supplier<net.minecraft.world.item.AxeItem> getAxe()Gets the axe item from this tool set.Supplier<net.minecraft.world.item.HoeItem> getHoe()Gets the hoe item from this tool set.Retrieves all tool items in this set for registration purposes.getName()Gets the base name of this tool set.Supplier<net.minecraft.world.item.PickaxeItem> Gets the pickaxe item from this tool set.Supplier<net.minecraft.world.item.ShovelItem> Gets the shovel item from this tool set.Supplier<net.minecraft.world.item.SwordItem> getSword()Gets the sword item from this tool set.
-
Constructor Details
-
ToolSet
protected ToolSet(String name, net.minecraft.world.item.Tier tier, EnumMap<ToolType, Float> attackDamage, EnumMap<ToolType, Float> attackSpeed, Supplier<net.minecraft.world.item.Item.Properties> propertiesSupplier, ToolConfigurator configuration, AttributeHelper attributeHelper)
-
-
Method Details
-
getItemsForRegistration
public Map<net.minecraft.resources.ResourceLocation,Supplier<? extends net.minecraft.world.item.Item>> getItemsForRegistration()Retrieves all tool items in this set for registration purposes.- Returns:
- Map of
ResourceLocationkeys toSupplierproviders for tool items
-
getName
Gets the base name of this tool set.- Returns:
- The base name of this tool set
-
getSword
Gets the sword item from this tool set.- Returns:
- Supplier providing the registered
SwordItem
-
getAxe
Gets the axe item from this tool set.- Returns:
- Supplier providing the registered
AxeItem
-
getPickaxe
Gets the pickaxe item from this tool set.- Returns:
- Supplier providing the registered
PickaxeItem
-
getHoe
Gets the hoe item from this tool set.- Returns:
- Supplier providing the registered
HoeItem
-
getShovel
Gets the shovel item from this tool set.- Returns:
- Supplier providing the registered
ShovelItem
-
getAll
Retrieves all registered tool items in this set.- Returns:
- List containing all tool items
-