Skip to content

Commit

Permalink
🐛 Fix issues with tool component
Browse files Browse the repository at this point in the history
  • Loading branch information
misode committed Jan 21, 2025
1 parent 6b1404d commit 288aced
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion java/server/world/item/mod.mcdoc
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ dispatch minecraft:data_component[repairable] to struct Repairable{
}

struct ToolRule {
blocks: (#[id="block"] string | [#[id="block"] string] | #[id(registry="block")] string),
blocks: (#[id(registry="block",tags="allowed")] string | [#[id="block"] string]),
/// Overrides the default mining speed.
speed?: float,
/// 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.
Expand All @@ -326,6 +326,7 @@ dispatch minecraft:data_component[tool] to struct Tool {
/// Amount of durability to remove each time a block is broken with this tool. Must be a non-negative integer.
damage_per_block?: int,
/// If `false`, players cannot break blocks while holding this tool in creative mode. Defaults to `true`.
#[since="1.21.5"]
can_destroy_blocks_in_creative?: boolean,
}

Expand Down

0 comments on commit 288aced

Please sign in to comment.