-
Bug
-
Resolution: Duplicate
-
None
-
1.20.6, 24w21b
-
None
-
Unconfirmed
-
(Unassigned)
The item use statistic for Shears is hardcoded to only increase upon breaking certain blocks.
This causes it to increase even when a custom tool component is used making those blocks inefficient for mining with the shears, and more importantly causes it to not increase for blocks other than the hardcoded ones.
This can even be seen with the default tool component, as Glow Lichen is listed in the default tool component of Shears and has a speed boost, but is not part of the hardcoded blocks that increment item use.
Steps to reproduce:
- Obtain regular Shears
- Break a Glow Lichen block
- Observe that the Item Use statistic for Shears does not increase despite the tool component indicating Glow Lichen is an efficient use of the item
Alternate steps to reproduce:
- Use a command to obtain Shears with a custom tool component that does not include White Wool, for example
/give @s shears[minecraft:tool={default_mining_speed:2.0,damage_per_block:1,rules:[{blocks:"minecraft:obsidian",speed:50}]}]
- Break a block that the custom tool component includes, for example Obsidian when using the command above
- Observe that the Item Use statistic for Shears does not increase despite the tool component indicating that block is an efficient use of the item
- Break a White Wool block
- Observe that the Item use statistic for Shears does increase despite the tool component indicating that White Wool is not an efficient use of the item
This behaviour is inconsistent with other items and is unintuitive.
This is caused by the blocks that increment the statistic being hardcoded in the `ShearsItem#mineBlock` method. An image is attached showing this method (albeit in Yarn mappings where it is named `postMine`).
(Furthermore it shows that the minecraft:fire block tag is used to determine which blocks cause the shears to take durability damage, which also seems unintuitive and should probably be a separate tag that contains the fire tag, but that's probably a separate issue...)
- duplicates
-
MC-128079 Statistic for using shears doesn't increase when mining certain blocks
- Open