-4

This question already has an answer here:

I made a Tri-Dimensional "duper" for dragon eggs, and they get sent through the end and back to the overworld. A repeating command block at spawn then teleports @e[type=item] to ~ ~1 ~ where a hopper awaits above the command block to send the eggs to a large chest storage system, the problem?

It teleports ANY item. Is there any way to specify which item to teleport? I want specifically only dragon eggs to teleport above the command block.

EDIT: Not a dupe of How to test for a dropped item in Minecraft?

Reason: They are asking for the equal of /testfor or /execute. I simply wished to teleport an item. Different Questions. Also, this dupe was marked nearly 5/6 months after the question was answered.

People please read the contents of a post before marking it as a duplicate, and also read the date.

marked as duplicate by aytimothy, galacticninja, Joachim, user232393, Wondercricket Sep 22 at 22:58

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 1
    You'll find the answer with only a little more research. You can list additional selectors in your arguments. Maybe one of these might help? minecraft.gamepedia.com/Commands#Target_selector_arguments – Slurpee Apr 19 at 7:33
  • @Slurpee Nope, I thought of trying @e[type=item,id=dragon_egg] or @e[type=item,name=dragon_egg] but both didnt work – TaylorS Apr 19 at 7:37
  • For now Ill have to work with x,y,z and distance detecting... – TaylorS Apr 19 at 7:39
  • Hmmmmm I also tried @e[type=item,nbt={id="dragon_egg"}] but that didnt seem to cut it either... sadface – TaylorS Apr 19 at 7:45
  • You need to check for the NBT, there is no "id" selector argument. – Fabian Röling Apr 19 at 10:38
1

Answered by a friend:

For 1.13/1.14, you can filter by item ID:

/teleport @e[type=item,nbt={Item:{id:"minecraft:dragon_egg"}}] ~ ~1 ~

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