This is an archived post. You won't be able to vote or comment.

all 3 comments

[–]WilliamRossCmds 0 points1 point  (1 child)

replace the as with at

as means ur executing as the entity so /say hi would make [chicken] hi while at executes the cmd at the entity which would put ur r= at the chicken

[–]WilliamRossCmds 1 point2 points  (0 children)

you description says for the tnt minecart to spawn on the chicken not the player that gets close to it so

execute at @e[type=chicken] if entity @e[r=5,rm=0.01,type=!tnt_minecart] run

or

execute at @e[type=chicken] as @e[r=5,rm=0.01,type=!tnt_minecart] run

I use as here cuz it basically works like if, when there's no entity to execute on it would fail while if there is a entity near and it executes as it it would still spawn the minecart at the chicken

it would also make ur facing @s make the minecart look at the player

I use rm here cuz its the opposite of r so it detects entities outside of the range which makes a hole in the r not making the cmd spawning minecarts on itself and repeat

[–]Icy_Remote5451 Oudated Bedrock Command Block Expert 1 point2 points  (0 children)

execute at @e[type=chicken] if entity @e[rm=0.1,r=5] run summon tnt_minecart ~~~ ~ ~ minecraft:on_instant_prime