A lot of major changes were made to Minecraft in 1.13, and I think the biggest is the command system and format. I used to be pretty good at commands, but I’ve had a little bit of confusion with some of the changes that have been made. I tried to search for other threads or websites about what I need help with, but I couldn’t find anything, since most issues that people post about seem to be big issues or bugs that come naturally with the new update.
So here’s my question:
How do you test for entities NOT within a certain radius? It used to be that you could use /testfor @a[r=!5] or @a[rm=5] or something like that, and then you could incorporate that into another command, like /kill @a[r=!5]. In 1.13, however, testfor is no longer a command, but furthermore, “r” is no longer a valid argument, and it seems to have been replaced with “distance”. The “distance” argument seems to be a bit different from “r”, however, even if they do pretty much the same thing; “distance” seems to be more of an exact distance, so something like /kill @a[distance=5] would kill any players EXACTLY 5 blocks away. I saw something about @a[distance=..5] testing for anyone within a 5-block radius, instead of exactly 5 blocks away, no less, no more, but @a[distance=!..5] doesn’t seem to be a valid argument, and neither is just @a[distance=!5].
So how do you test for entities NOT within a radius using “distance” or some other argument or command? I looked at all the changes to commands that have been made in 1.13, but just the arguments and how things have been added or changed doesn’t seem to be much help, since it doesn’t explain how the new command system is actually used, it just explains what order certain arguments go in and such.
@e[distance=5..] selects all entities that are more than 5 blocks away.
And to testfor, you do: 'execute if entity @e[distance=5..]'
I will suggest though to not use any redstone with command blocks anymore, simply because it's unnecessary and it's more efficient to use only command blocks/functions. But that's for you to decide ofcourse.
@e[distance=5..] selects all entities that are more than 5 blocks away.
And to testfor, you do: 'execute if entity @e[distance=5..]'
I will suggest though to not use any redstone with command blocks anymore, simply because it's unnecessary and it's more efficient to use only command blocks/functions. But that's for you to decide ofcourse.
Thanks! That seems to work! I'm still a little confused on what the meaning of the ".." is, but at least I know how to use them better. Hopefully I can adjust to the new command system, since I was so used to the old one.
A lot of major changes were made to Minecraft in 1.13, and I think the biggest is the command system and format. I used to be pretty good at commands, but I’ve had a little bit of confusion with some of the changes that have been made. I tried to search for other threads or websites about what I need help with, but I couldn’t find anything, since most issues that people post about seem to be big issues or bugs that come naturally with the new update.
So here’s my question:
How do you test for entities NOT within a certain radius? It used to be that you could use /testfor @a[r=!5] or @a[rm=5] or something like that, and then you could incorporate that into another command, like /kill @a[r=!5]. In 1.13, however, testfor is no longer a command, but furthermore, “r” is no longer a valid argument, and it seems to have been replaced with “distance”. The “distance” argument seems to be a bit different from “r”, however, even if they do pretty much the same thing; “distance” seems to be more of an exact distance, so something like /kill @a[distance=5] would kill any players EXACTLY 5 blocks away. I saw something about @a[distance=..5] testing for anyone within a 5-block radius, instead of exactly 5 blocks away, no less, no more, but @a[distance=!..5] doesn’t seem to be a valid argument, and neither is just @a[distance=!5].
So how do you test for entities NOT within a radius using “distance” or some other argument or command? I looked at all the changes to commands that have been made in 1.13, but just the arguments and how things have been added or changed doesn’t seem to be much help, since it doesn’t explain how the new command system is actually used, it just explains what order certain arguments go in and such.
If you could help, that would be great! Thanks!
Memelord and general minecraft enthusiast
@e[distance=5..] selects all entities that are more than 5 blocks away.
And to testfor, you do: 'execute if entity @e[distance=5..]'
I will suggest though to not use any redstone with command blocks anymore, simply because it's unnecessary and it's more efficient to use only command blocks/functions. But that's for you to decide ofcourse.
Thanks! That seems to work! I'm still a little confused on what the meaning of the ".." is, but at least I know how to use them better. Hopefully I can adjust to the new command system, since I was so used to the old one.
Once again, thanks for your help!
Memelord and general minecraft enthusiast
I'm glad I could help
The double dots are an indication of a region. for example:
'4..8' means 'everything from 4 up to 8'
'..8' means 'everything below or equal to 8'
'8..' means 'everything above or equal to 8'
Oh! That makes sense! I understand now!
Thanks so much!
Memelord and general minecraft enthusiast