mojira.dev
MC-270794

Unbreakable items can't have a max_stack_size component

Recently a change was made to max_stack_size and max_damage components so that they are now mutually exclusive, which takes into account the item's base durability (for example for a wooden pickaxe).

Even if you add the unbreakable component to this item, so it no longer has durability, you can still not add a max_stack_size to it, even though it would make sense if it could.

Attachments

Comments 4

Adding the unbreakable component won't remove max_damage from the item though, if you want a pickaxe with max_stack_size you'd need to remove the max_damage component from the item.

To my knowledge, with simple commands it's currently not possible to remove components; you need to use more advanced methods like loot item functions to get rid of the max_damage component.

I've provided an example data pack:

[media]

. Run /loot give @s loot mojira:unbreakable_stackable to try it out; it'll give you a diamond sword with max stack size 42.

I don't know why that makes this report invalid though, still seems like an issue.

It's invalid because what this bug report is about, namely "Unbreakable items can't have a max_stack_size component" – it's just not true, unbreakable items can have a max_stack_size component.

PeChips

(Unassigned)

Unconfirmed

(Unassigned)

1.20.5 Pre-Release 2

Retrieved