Data component format/tool
Minecraft Wiki article. Categories: Top-level_data_pages
📌 Mirrored from Minecraft Wiki
This article is reproduced from Data component format/tool on the Minecraft Wiki. Mirrored from revision 2910648. It is licensed CC BY-NC-SA 3.0 by the Minecraft Wiki contributors — not under the Codex’s CC BY-SA 4.0, and it may not be used commercially. Edits belong upstream, not here.
- [NBT Compound / JSON Object] minecraft:tool: If set, this item is considered as a tool.
- [Float] default_mining_speed: The default mining speed of this tool, used if no rules override it. Defaults to 1.0.
- [Int] damage_per_block: The amount of durability to remove each time a block is broken with this tool. Must be a non-negative integer. Defaults to 1.
- [Boolean] can_destroy_blocks_in_creative: Whether players can break blocks while holding this tool in Creative mode. Defaults to
true. - [NBT List / JSON Array] rules: A list of rules for the blocks that this tool has a special behavior with. If a field is overridden by multiple matched rules, the one that comes first in the list is chosen.
- [NBT Compound / JSON Object]: A single rule.
- [String][NBT List / JSON Array] blocks: The blocks to match with. Can be a block ID or a block tag with a
#, or a list of block IDs. - [Float] speed: If the blocks match, overrides the default mining speed. Optional.
- [Boolean] correct_for_drops: If the blocks match, overrides whether or not this tool is considered correct to mine at its most efficient speed, and to drop items if the block's loot table requires it. If not set by any rules, defaults to
false. Optional.
- [String][NBT List / JSON Array] blocks: The blocks to match with. Can be a block ID or a block tag with a
- [NBT Compound / JSON Object]: A single rule.
- [NBT Compound / JSON Object] minecraft:tool: If set, this item is considered as a tool.
Sources
- Data component format/tool — Minecraft Wiki, CC BY-NC-SA 3.0, revision 2910648.