AnswerBun.com

How do I summon an item that has an owner and a pickup delay of -1?

Arqade Asked by Samuel Joseph on July 23, 2020

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?

One Answer

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.

Answered by ExpertCoder14 on July 23, 2020

Add your own answers!

Related Questions

Valorant Install Size

2  Asked on April 15, 2021 by iwan-plays

 

How to clear huge area in Minecraft

2  Asked on April 15, 2021 by shayne-cahalan

   

Would this be considered a bug

2  Asked on April 15, 2021 by samik-shyamsukha-kms

   

Xbox One and Xbox 360 same account

1  Asked on April 15, 2021

   

Stuck in the end

1  Asked on April 15, 2021 by ohsoinspire

   

Why are my Minecraft maps not showing up?

1  Asked on April 15, 2021 by carolinareaper03

 

How do I mail a postcard?

2  Asked on April 15, 2021 by redriderx

 

Do Ghasts spawn near portals in the overworld?

4  Asked on April 15, 2021 by williham-totland

 

How can I perform a super shoot in Hat Trick Hero 2?

1  Asked on April 15, 2021 by bruno-estrazulas

 

Ask a Question

Get help from others!

© 2022 AnswerBun.com. All rights reserved. Sites we Love: PCI Database, MenuIva, UKBizDB, Menu Kuliner, Sharing RPP, SolveDir