I need to change the count of an unstackable item entity (e.g., a shulker box). This used to work in pre-1.20.5, but with the changes in stacking, it does not work now.

I am trying to regain the same behavior, so the items cannot be stacked after being unstacked.

execute at @e[type=item,nbt={Item:{count:1}}] if block ~ ~-1.5 ~ hopper run data modify entity @e[type=item,distance=..1,limit=1] Item.count set value 2
  • You need to use components to modify the stack limit and probably for other things as well. I would recommend watching Slicedlime's 1.20.5 technical news video, but it is not released yet. :D Commented Apr 24 at 6:14
  • @FabianRöling I tried that and it kind of, but it doesn't recreate the same behavior as it did pre-1.20.5
    – aidancomi
    Commented Apr 25 at 2:33


You must log in to answer this question.

Browse other questions tagged .