My friends and I are trying to make realistic aquariums in 1.9 using commands with no mods or plugins to do this for us. How could I spawn different kinds on fish on invisible squids? Thanks!
I have already tried /summon Item ~ ~+1 ~ {Item:{id:minecraft:fish},Count:1,{Riding:{id:"Squid"}}
-
2Have you tried anything yourself? We might be able to find a solution faster if we know what you've already attempted.– rivermontCommented May 18, 2016 at 14:57
-
Minecraft-speaking, what's a fish?– MrLemonCommented May 18, 2016 at 15:08
-
1@MrLemon probably an item– AngelicaCommented May 18, 2016 at 16:10
-
its an item you get when catching. I thought i wouldn't need to specify that in my question– DatOneLeftyCommented May 18, 2016 at 16:37
-
1@DatOneLefty uhh... good point. I was focussing on entities, I forgot about items together.– MrLemonCommented May 18, 2016 at 17:02
2 Answers
The Riding
compound tag has been removed in 1.9. The Passengers
list tag takes its place, except the stack order is reversed (in that the host entity is the one in the /summon
syntax, rather than the one at the lowest depth of Riding
).
The Count
tag must also be placed inside the Item
compound.
/summon Squid ~ ~+1 ~ {Passengers:[{id:"Item",Item:{id:minecraft:fish,Count:1}}]}
Although this has already been answered, I would like to extend Skylinerw's answer.
/summon Squid ~ ~ ~ {Passengers:[{id:"Item",Item:{id:minecraft:fish,Count:1,Age:-32768,PickupDelay:32767}}]}
What "Age" is the despawn time of the item. By putting -32768, we do not allow it to despawn.
What "PickupDelay" is the delay of picking up the dropped item. A simple proof of concept is to drop an item below your feet. There would be a short delay before you pick it up. By putting 32767, we do not allow it to be picked up.