To detect if a player riding a boat, I use this command:
/data get entity @s RootVehicle
This works when one player is in a boat, but when a second player enters, this tag doesn't exist anymore. I get the following error message:
Can't get RootVehicle: tag doesn't exist
Only players as second rider do not work, other entities (like zombies, pigs, sheep) work fine.
Linked issues
relates to 1
Attachments
Comments 5
Who's saying anything about the Passengers tag? I'm talking about the RootVehicle tag of the players. Players should store the entity they are riding in their RootVehicle tag right? Well that tag doesn't exist if there are 2 players in the boat, which make no sense to me.
Probably WAI, but it could change if there are too much issue with the RootVehicle
implementation.
RootVehicle
was made so that when a player disconnect, the entity the player is riding also despawn. I fail to see how this could work well if both players had a RootVehicle
compound of the same boat.
This imply the sad truth that with RootVehicle
, you can't detect things correctly when 2 players are on the same boat.
WAI, the
Passengers
tag does not store players. Players store the entity themselves in theRootVehicle
tag.