mojira.dev
MC-270665

Previously damageable items with the damage component removed do not support higher max_stack_size component

1. Launch the game with the output log enabled.

2. Give yourself an undamageable stone sword with a max stack size set to 64 using the following command:

/loot give @s loot {"pools":[{"rolls":1,"entries":[{"type":"minecraft:item","name":"minecraft:stone_sword","functions":[{"function":"minecraft:set_components","components":{"!minecraft:damage":{},"minecraft:max_stack_size":64}}]}]}]}

❌ Note that the output says the below and the stone sword has received no modifications.

Failed to apply component patch '{minecraft:max_stack_size=>64, !minecraft:damage}' to item: 'Item cannot be both damageable and stackable'

This should not be the case, as the item is not in fact damageable, as the damage component has been entirely removed from the item.

Comments 2

It's max_damage that max_stack_size is incompatible with

Ah. That's a little unintuitive. Should've read changelog closer. Please close this as invalid, replacing !damage with !max_damage works. 

CreeperMagnet_

(Unassigned)

Unconfirmed

(Unassigned)

1.20.5 Pre-Release 1

Retrieved