2

So I was just asking if it was possible that items on the ground got random damage values or that when you pick them up your items gets a value. My goal is that I want the player to only be able to have 1 item per slot. I think this is possible by changing the damage value on the items so that they can't stack. But they all need to be random or not the same number for that to happen. I tried with taging every slot in my inventory to a seperate tag name and then the tag name would give it a damage value but I could not find a to get the command blocks to give the items a damage value. There is a way and it's to give each and every item in every slot a diffrent tag but that would take a very verrry long time. So any ideas?

  • are you trying to just randomly assign damage values? or are you just trying to limit a player to one item per inventory slot? – Nick S Jul 11 '18 at 18:37
  • Also, are you on bukkit, spigot, or just regular minecraft? are you using spc? – Nick S Jul 11 '18 at 18:43
  • Im playing on the latest minecraft version 1.12.2 the normal version. And my GOAL is to limit a player to one item/block per inv slot and I think the solution to that problem is by changing the damage value of the item/block. – Erram Jul 11 '18 at 18:53
  • you may change the item damage of ALL items of a certain type (i.e all stone swords) but no way to turn individual items' damage around. I would recommend looking at some mod tools, many come pre-baked with the command maxstacksize – Nick S Jul 11 '18 at 19:05
  • Why do you think that damage values are the solutions? Either you get different blocks (like stone->diorite) or you change the duration of tools, which already don't stack. – Fabian Röling Jul 12 '18 at 8:45
2

This command prevents items from stacking. If you put it into a repeating command block, then items should no longer stack, as soon as they were dropped at least once (it will not break stacks that already exist as stacks)

/execute as @e[type=item] run data modify entity @s Item.tag.PreventStacking set from entity @s UUIDMost

Note: I use Minecraft 1.14.2 and this command may not work in older versions

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.