Is it possible. According to this post, a Player is not saved with the MinecartRideable entity in the region files, when the Player entity is a passenger to it. How can I select a MinecartRideable with/without a Player inside of it then? Note that the RootVehicle
tag won't work as I am looking for a MinecartRideable with a Player not a Player in a MinecartRideable.
1
3
The MinecartRideable closest to the player riding a minecart is the one he's riding in. You can simply add a tag to that minecart after checking if a player is riding one.
/scoreboard players tag @a[tag=inCart] remove inCart
/scoreboard players tag @e[type=MinecartRideable,tag=thisCart] remove thisCart
/scoreboard players tag @a add inCart {RootVehicle:{Entity:{id:MinecartRideable}}}
/execute @a[tag=inCart] ~ ~ ~ /scoreboard players tag @e[type=MinecartRideable,r=1,c=1] add thisCart