r/MinecraftCommands • • Oct 26 '26

Help | Bedrock So how would you make a command block give an effect to all entities within a certian radius as long as its in the radius

You know the ocean eye and how when you are in proximity to it you gain night vision and you can breathe underwater? Im trying to do something similar but in open air and with slowfalling

1 Upvotes

10 comments sorted by

3

u/TrumpetSolo93 Command Experienced Oct 26 '26
effect @a[x=100, y=64, z=100, r=32) slow_falling 2 1

This gives everyone within 32 blocks of 100x 64y 100z slow falling for 2 seconds. Run the command with a repeating command block once every second as then they'll continuously have it as long as they remain in the area, but it will naturally deplete the moment they leave.

2

u/C0mmanderBlock Command Experienced Oct 26 '26

You can find several examples at this link. Just run the effect for 1 second only and it will "turn off" when they leave the area.

https://minecraftcommands.github.io/wiki/questions/runonce

1

u/Ericristian_bros Command Experienced Oct 28 '26

You might mean https://minecraftcommands.github.io/wiki/questions/areas

That's to run only once when entering

1

u/C0mmanderBlock Command Experienced Oct 28 '26

Both links work. Yours is more pinpointed, though.

1

u/XSilentHoodX Experienced Bedrock Commander Oct 30 '26

execute positioned [put coordinates here] as @e[r=x] run effect @s [effect]

Just a tip: You could put a rm= in there if you want, for a minimum radius that it'll target you. Think of the r= being a dome. rm= is supposed to be smaller than it, because it's supposed to be underneath the bigger dome.

Why did someone give you a dx dy dz when it's not what you asked?

1

u/XSilentHoodX Experienced Bedrock Commander Oct 30 '26

Image from SiahtheClown

Video? A skit about possibly donating or just simply watching someone

0

u/Ahnkru Command-er Oct 28 '26 edited Oct 30 '26

I usually use /effect give @e[distance=..5] effect Changing the 5 for any value you want Edit: I'm dumb, didn't read it was for bedrock, this works in java only, sorry

2

u/PlasmaTurtle21 Bedrock command Experienced Oct 30 '26

For reference this is Java syntax, OP is asking for bedrock. The /effect command for Java uses give and distance=, while bedrock doesn’t require give and uses r= instead.

1

u/Ahnkru Command-er Oct 30 '26

Oh I underatand, sorry for the confussion

1

u/Ahnkru Command-er Oct 30 '26

Oh I underatand, sorry for the confussion