#How do I run a command ONLY if a player is within the radius of the specific entity.

1 messages · Page 1 of 1 (latest)

worn violet
#

like an execute as tyhe mob that you are detecting is nere the player then run the command with targets @p[r]

lost lichen
#

try ```/execute if entity @s at @e[type=cow,r=5] run give * apple

#

@worn violet

#

If you've got any more questions feel free to ask.

worn violet
#

levitation for ridable flying entites

lost lichen
#

hmm

#

I believe that can be done with effects if Im not mistaken, give me a couple minutes

#

/effect @e[type=horse] levitation (seconds) (strength) (hide_particles) so therefor the command would be /effect @e[type=horse] levitation 1000 100 true

worn violet
#

like where you lokk up it geos up

lost lichen
#

That would be a tp command then

worn violet
#

no

#

like levitation whithif the player looks up he get levitation onley if he has clay on his head

worn violet
#

execute @a[rxm=-90,rx=-25] at @s ~~~ effect @e[type=minecraft:pig,r=3] levitation 1 6 true
execute @a[rxm=-25,rx=-15] at @s ~~~ effect @e[type=minecraft:pig,r=3] levitation 1 3 true
execute @a[rxm=-15,rx=-5] at @s ~~~ effect @e[type=minecraft:pig,r=3] levitation 1 2 true
execute @a[rxm=-5,rx=20] at @s ~~~ effect @e[type=minecraft:pig,r=3] levitation 1 1 true
execute @a[rxm=20,rx=35] at @s ~~~ effect @e[type=minecraft:pig,r=3] slow_falling 1 1 true
execute as @a[rxm=35,rx=90] at @s ~~~ effect @e[type=minecraft:pig,r=3] clear
like this almost

coarse sierra
#

?flying entities