Interface ToolCustomizer
- All Known Implementing Classes:
AbstractHitEffectCustomizer
Implementations of this interface provide fine-grained control over tool item
creation, enabling custom tool classes, modified attribute application, or
additional properties beyond standard tool behavior. The DEFAULT
implementation simply delegates to the piece's own factory via
ToolPieceType.createItem(ToolContext, Item.Properties).
- Since:
- 1.0.0
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ToolCustomizerThe default customizer that simply uses the piece's own factory. -
Method Summary
Modifier and TypeMethodDescriptiondefault net.minecraft.world.item.Itemcreate(ToolPieceType piece, ToolContext context, net.minecraft.world.item.Item.Properties properties) Creates a fully configured tool item instance for the given piece.
-
Field Details
-
DEFAULT
The default customizer that simply uses the piece's own factory.This instance does not override
create(net.xun.armory.api.item.tools.ToolPieceType, net.xun.armory.api.item.tools.ToolContext, net.minecraft.world.item.Item.Properties), so it inherits the default method defined below, which callsToolPieceType.createItem(net.xun.armory.api.item.tools.ToolContext, net.minecraft.world.item.Item.Properties).
-
-
Method Details
-
create
default net.minecraft.world.item.Item create(ToolPieceType piece, ToolContext context, net.minecraft.world.item.Item.Properties properties) Creates a fully configured tool item instance for the given piece.Implementations may delegate to the piece's factory or construct custom items. The provided
propertieshave already been processed by both global and per‑piece property modifiers; they are ready to be passed to the item constructor.- Parameters:
piece- the tool piece type (nevernull)context- the tool context providing tier, stats, and modifiers (nevernull)properties- the final item properties (already modified) (nevernull)- Returns:
- the created item, never
null - Throws:
NullPointerException- if any argument isnull
-