mojira.dev
MC-301423

Item stacks whose contents are both damageable and stackable can be obtained by specifying components in NBT, but cannot be obtained directly using /give

Steps to Reproduce:

/give @s netherite_sword[max_stack_size=99] 99 triggers "Item cannot be both damageable and stackable" error,
but /give @s bundle[bundle_contents=[{id:netherite_sword,count:99,components:{max_stack_size:99}}]] executes successfully

Expected Result:

The bundle command /give @s bundle[bundle_contents=[{id:netherite_sword,count:99,components:{max_stack_size:99}}]]
should also throw "Item cannot be both damageable and stackable" error

Actual Result:

The bundle command successfully gives a stack of 99 netherite swords that should only be obtainable through non-error state execution of the standard /give command

Environment

Windows 11 24H2 Preview
Minecraft 1.21.8

Comments 2

This isn’t exclusive to bundles, /setblock ~ ~ ~ chest{Items:[{id:"minecraft:netherite_sword",count:99,components:{max_stack_size:99}}]} also works. I will confirm and retitle the issue.

The item command works too.

/minecraft:item replace entity @s weapon.mainhand with bundle[bundle_contents=[{id:netherite_sword,components:{max_stack_size:99}}]]

SomSo

(Unassigned)

Confirmed

(Unassigned)

1.21.8, 25w34b

Retrieved