0

I am trying to make an item that has no pickup delay, and also a different item that has an owner. The commands I have tried are:

/summon item ~ ~-1 ~ {Item:{id:"minecraft:stone",Count:1b},PickupDelay:-1}

and

/summon item ~ ~-1 ~ {Item:{id:"minecraft:stone",Count:1b},Owner:playerx}

Is there a different format for the nbt tags for owner and pickup delay?

  • Well, what about these commands is not working? The commands seem fine at first glance, so if you could provide details of what is not working, we should be able to pinpoint your issue faster. – ExpertCoder14 Jul 20 at 3:16
0

Owner is not a TAG_String, it is a TAG_Int_Array that represents the entity’s UUID. Therefore, you can’t just type a player name. You’ll have to get the UUID values from the player you want and copy them to the item entity.

Use a command chain to run the following:

  1. Summon an item. The 0s are placeholders for where we will use commands to fill in the real UUID.

    /summon minecraft:item ~ ~ ~ {Item:{id:"minecraft:stone",Count:1b},Owner:[I;0,0,0,0],Tags:["itemToModify"]}
    
  2. Replace the first UUID value with the one from the player.

    /data modify entity @e[tag=itemToModify,limit=1] Owner[0] set from entity playerx UUID[0]
    
  3. Replace the second UUID value with the one from the player.

    /data modify entity @e[tag=itemToModify,limit=1] Owner[1] set from entity playerx UUID[1]
    
  4. Replace the third UUID value with the one from the player.

    /data modify entity @e[tag=itemToModify,limit=1] Owner[2] set from entity playerx UUID[2]
    
  5. Replace the fourth UUID value with the one from the player.

    /data modify entity @e[tag=itemToModify,limit=1] Owner[3] set from entity playerx UUID[3]
    
  6. Remove the tag.

    /tag @e[tag=itemToModify,limit=1] remove itemToModify
    

I haven’t tested this yet. If you spot something wrong about this solution or it doesn’t work, let me know in the comments below.

| improve this answer | |

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.