How do I test in Minecraft whether I'm sitting in a lore (in a Minecart) with an execute command?
I'm assuming you're playing in the Java version, so here's the command:
/ execute if entity @p [nbt = {RootVehicle: {Entity: {id: "minecraft: minecart"}}}]
This checks whether the next player is sitting in a cart. You can also improve the whole thing by checking whether the next player is sitting in a cart with a tag:
Generate the lore with the tag "Lore":
/ summon minecart ~ ~ ~ {Tags: ["Lore"]}
Checking whether there's a player in Lore, which has the tag "Lore":
/ execute if entity @p [nbt = {RootVehicle: {Entity: {id: "minecraft: minecart", tags: ["Lore"]}}}]
To check, you take the command in a repeating, always active command block and place a Redstone comparator on it. When this is activated, someone has got into the cart.
Lg and I hope I could help.
Yes I play in the Java version And yes you could help me!