Can anyone help me? I need to make a minecart not get pushed for a parkour map. I tried knockback resistance, no AI and invincible. It all didn't work.
/execute as @e[type=minecart] run data merge entity @s {Motion:[0.0,0.0,0.0]}
I explain it to you, you are taking away the movement to ALL the entities of type wagon. If you want to remove the movement to some specific wagons, you will have to do it by means of labels.
So, you create a wagon that has a label, in this example I will put "stop". Command:
/summon minecart ~ ~ ~ {Tags:["stop"]}
Now, in the entity selector of the command above (A), you specify that you choose only the minecarts that have the "stop" label in the following way:
/execute as @e[type=minecart,tag=stop] run data merge entity @s {Motion:[0.0,0.0,0.0]}
execute as all entit
And that's it, that's all! I hope I have helped you, greetings!
Sorry for my bad English, had to use a translator, my native language is Spanish.
Edit 30 minutes later: By the way, this method is the simplest, BUT, if a player is riding in the minecart, this is ON a rail and the player press a key of movement, the minecart will move. If you want to avoid this, you will have to make a constant tp to the minecart so that it always remains in the same block. Command:
/execute as @e[type=minecart,tag=stop] at @s run tp @s X Y Z
Just replace <X> <Y> <Z> with the coordinates where you want the minecart to stay.
Beware !, this will move ALL the minecarts with the "stop" tag to those coordinates, so if you want to include several minecarts, be sure to change the tags to for example "stop1", "stop2", "stop3" ... and so on, and the same with the tp command. Example:
-Minecart with the tag "stop1" will have to be in 0 0 0
/execute as @e[type=minecart,tag=stop1] at @s run tp @s 0 0 0
-Minecart with the tag "stop2" will have to be in 1 1 1
/execute as @e[type=minecart,tag=stop2] at @s run tp @s 1 1 1
I hope it serves you and you understand me, I tried to explain myself as best as possible. Let me know if you need anything!
Can anyone help me? I need to make a minecart not get pushed for a parkour map. I tried knockback resistance, no AI and invincible. It all didn't work.
I can! Look, here's the command (A).
/execute as @e[type=minecart] run data merge entity @s {Motion:[0.0,0.0,0.0]}
I explain it to you, you are taking away the movement to ALL the entities of type wagon. If you want to remove the movement to some specific wagons, you will have to do it by means of labels.
So, you create a wagon that has a label, in this example I will put "stop". Command:
/summon minecart ~ ~ ~ {Tags:["stop"]}
Now, in the entity selector of the command above (A), you specify that you choose only the minecarts that have the "stop" label in the following way:
/execute as @e[type=minecart,tag=stop] run data merge entity @s {Motion:[0.0,0.0,0.0]}
execute as all entit
And that's it, that's all! I hope I have helped you, greetings!
Sorry for my bad English, had to use a translator, my native language is Spanish.
Edit 30 minutes later: By the way, this method is the simplest, BUT, if a player is riding in the minecart, this is ON a rail and the player press a key of movement, the minecart will move. If you want to avoid this, you will have to make a constant tp to the minecart so that it always remains in the same block. Command:
/execute as @e[type=minecart,tag=stop] at @s run tp @s X Y Z
Just replace <X> <Y> <Z> with the coordinates where you want the minecart to stay.
Beware !, this will move ALL the minecarts with the "stop" tag to those coordinates, so if you want to include several minecarts, be sure to change the tags to for example "stop1", "stop2", "stop3" ... and so on, and the same with the tp command. Example:
-Minecart with the tag "stop1" will have to be in 0 0 0
/execute as @e[type=minecart,tag=stop1] at @s run tp @s 0 0 0
-Minecart with the tag "stop2" will have to be in 1 1 1
/execute as @e[type=minecart,tag=stop2] at @s run tp @s 1 1 1
I hope it serves you and you understand me, I tried to explain myself as best as possible. Let me know if you need anything!
Thank you so much i needed this for my parkour map for 9 block jumps
I actually needed that Rusink so thank you aswell
This is a generic signature for a guy with a generic username.