mojira.dev
MC-269868

The hiding the "can_destroy" component in the tooltip doesn't hide it and causes it to be able to break all blocks

If the "show_in_tooltip" boolean within the "can_break" component is set to "false" or when the "hide_additional_tooltip" compound component is assigned, the "Can Destroy" tooltip is not hidden and shows "Unknown" and the affected tool is able to destroy all blocks in Adventure Mode.

Comments 4

I'm not able to reproduce this; could you provide the exact command you're using?

This command works as expected for me:

/give @s stick[can_break={predicates:[{blocks:dirt}],show_in_tooltip:0}]

Also, note that the hide_additional_tooltip component isn't expected to hide the "Can break" tooltip, as it only hides item-specific information (e.g. potion effects, written book details, etc.).

/give @s iron_axe[can_break={predicates:[{blocks:#logs}],show_in_tooltip:false}]

Was I just typing the command wrong the last time?

#logs needs to be in quotation marks, but otherwise that command works for me. Is it working for you?

Oh, the command was:

/give @s iron_axe[minecraft:can_break={predicates:{blocks:"#logs",show_in_tooltip:false}}]

I just wrong the later command and it worked as expected, able to break only logs in adventure mode while fully hiding "Can Destroy". You may now deem this issue invalid if necessary.

Mypka_Max

(Unassigned)

Unconfirmed

(Unassigned)

24w12a

Retrieved