How do I add passengers to entity in minecraft 1.9?
Not summon but add so I tried
/entitydata @e[type=ArmorStand] {Passengers:[{id:Cow}]}
But it doesn't work
Best Answer
You cannot do this directly for pre-existing entities. Passengers (and Riding before it) is only parsed when the mob is loaded/spawned. The /entitydata command does not have access to this functionality.
Passengers is not actually a valid tag for entity NBT merging/creation via commands. Instead, the /summon command manually checks if you specified a list tag named "Passengers" in your input to handle instantiating new entities, while the remainder of your input is handled automatically by the target entity's NBT-reading functions. The /entitydata command itself makes no use of the tag, so it is essentially ignored as the NBT-reading functions from the entity classes will not read that tag.
/summon
/summon Zombie ~ ~1 ~ {Passengers:[{id:"Cow"}],IsBaby:1b}
The CommandSummon class looks for the "Passengers" tag, finds it, and instantiates the new entity. All the input data is then sent to the EntityZombie class, which finds that IsBaby is a valid tag but does not find that Passengers is a valid tag (hence it being ignored).
/entitydata
/entitydata @e[type=Zombie] {Passengers:[{id:"Cow"}],IsBaby:0b}
The CommandEntityData class does not look for the "Passengers" tag. The input data (after merging with the zombie's pre-existing data) is sent to the same NBT-reading function in the EntityZombie class that /summon was sending its data to. Same as before, it finds IsBaby is valid while Passengers is invalid.
The reason you see Passengers in the command's last output data is because it shows you what it was provided before verification. If the entity already had passengers and you did not try to change them, it's because the output shown is taken from the NBT-writing function (used for storing entities to chunk files), which does write the host's passengers into a Passengers list. But since the NBT-reading functions do not look for this tag, it will be ignored even in that case.
You will instead need to create a new entity and delete the old one.
/kill @e[type=ArmorStand]
/summon ArmorStand ~ ~1 ~ {Passengers:[{id:"Cow"}]}
Pictures about "How do I add passengers to entity in minecraft 1.9?"



How do you use a passenger tag?
EntityData Command in Minecraft Java Edition (PC/Mac) entity is the entity you want to target. It can be either the UUID for an entity or you can use the @e target selector to target all entities or a type of entity.How do you use the entity command in Minecraft?
You can summon an entity (or mob) whenever you want using the /summon command in Minecraft....Summon Command in Minecraft Java Edition (PC/Mac)How do you summon a player in Minecraft?
Bedrock Edition can use @r to target non-player entities via the type selector argument; in Java Edition, to select a random entity, use @e[sort=random] instead. In Bedrock Edition, @r can only target entities who are alive.LAUNCH ENTITIES - Set Motion NBT From Rotation! || Minecraft Commands
Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.
Images: zydeaosika, zydeaosika, zydeaosika, zydeaosika
