How can I keep mobs from being too close together with /spreadplayers and /execute?
up vote
2
down vote
favorite
I want to summon multiple Slimes, then make sure that they are never in the same block. (If it's not possible to keep them from being in the same block, having them be at least 1 block from each other would work too.)
To do this I tried nesting execute commands like this:
execute @e[type=Slime,name=explore1] ~ ~ ~ execute @e[type=Slime,name=explore1,r=0,c=1] ~ ~ ~ spreadplayers ~.5 ~.5 0 1 false @e[type=Slime,name=explore1,r=1,c=1]
But that didn't work. I also tried
execute @e[type=Slime,name=explore1] ~ ~ ~ spreadplayers ~.5 ~.5 0 1 false @e[type=Slime,name=explore1,c=1,r=0]
I figured the r=0
tag might be off but I also tried with r=1
and it still didn't work.
The first command groups all the Slimes together and randomly teleports them, and the second command just does nothing.
Any ideas on how to do this?
minecraft minecraft-commands
bumped to the homepage by Community♦ 4 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
up vote
2
down vote
favorite
I want to summon multiple Slimes, then make sure that they are never in the same block. (If it's not possible to keep them from being in the same block, having them be at least 1 block from each other would work too.)
To do this I tried nesting execute commands like this:
execute @e[type=Slime,name=explore1] ~ ~ ~ execute @e[type=Slime,name=explore1,r=0,c=1] ~ ~ ~ spreadplayers ~.5 ~.5 0 1 false @e[type=Slime,name=explore1,r=1,c=1]
But that didn't work. I also tried
execute @e[type=Slime,name=explore1] ~ ~ ~ spreadplayers ~.5 ~.5 0 1 false @e[type=Slime,name=explore1,c=1,r=0]
I figured the r=0
tag might be off but I also tried with r=1
and it still didn't work.
The first command groups all the Slimes together and randomly teleports them, and the second command just does nothing.
Any ideas on how to do this?
minecraft minecraft-commands
bumped to the homepage by Community♦ 4 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
up vote
2
down vote
favorite
up vote
2
down vote
favorite
I want to summon multiple Slimes, then make sure that they are never in the same block. (If it's not possible to keep them from being in the same block, having them be at least 1 block from each other would work too.)
To do this I tried nesting execute commands like this:
execute @e[type=Slime,name=explore1] ~ ~ ~ execute @e[type=Slime,name=explore1,r=0,c=1] ~ ~ ~ spreadplayers ~.5 ~.5 0 1 false @e[type=Slime,name=explore1,r=1,c=1]
But that didn't work. I also tried
execute @e[type=Slime,name=explore1] ~ ~ ~ spreadplayers ~.5 ~.5 0 1 false @e[type=Slime,name=explore1,c=1,r=0]
I figured the r=0
tag might be off but I also tried with r=1
and it still didn't work.
The first command groups all the Slimes together and randomly teleports them, and the second command just does nothing.
Any ideas on how to do this?
minecraft minecraft-commands
I want to summon multiple Slimes, then make sure that they are never in the same block. (If it's not possible to keep them from being in the same block, having them be at least 1 block from each other would work too.)
To do this I tried nesting execute commands like this:
execute @e[type=Slime,name=explore1] ~ ~ ~ execute @e[type=Slime,name=explore1,r=0,c=1] ~ ~ ~ spreadplayers ~.5 ~.5 0 1 false @e[type=Slime,name=explore1,r=1,c=1]
But that didn't work. I also tried
execute @e[type=Slime,name=explore1] ~ ~ ~ spreadplayers ~.5 ~.5 0 1 false @e[type=Slime,name=explore1,c=1,r=0]
I figured the r=0
tag might be off but I also tried with r=1
and it still didn't work.
The first command groups all the Slimes together and randomly teleports them, and the second command just does nothing.
Any ideas on how to do this?
minecraft minecraft-commands
minecraft minecraft-commands
edited Mar 7 '16 at 15:05
asked Mar 6 '16 at 23:30
A.J. Ruckman
1037
1037
bumped to the homepage by Community♦ 4 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ 4 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
The following command should work:
execute @e[type=Slime,name=explore1] ~ ~ ~ spreadplayers ~ ~ 2 3 false @e[type=Slime,rm=0,r=1,name=explore1]
All slimes will try to spread nearby (r=1
) slimes that aren't themselves (rm=0
) a maximum of 3 blocks around them.
Just be aware thatrm=0
will not be able to target entities at the exact same coordinates as the slime, so if two are at the same location then they will not be targeted./spreadplayers
itself can end up placing slimes at the same location.
– Skylinerw
Mar 7 '16 at 18:11
@Skylinerw Yep, when I was testing it though it didn't seem an issue in practice, as the slimes immediately push each other apart slightly then get teleported (though it could be a problem if OP has them with NoAI).
– SirBenet
Mar 7 '16 at 18:31
I'm afraid this isn't working for me @colorfusion, the slimes never stop being spread around... I was usingNoAI
but it still doesn't work with it off.
– A.J. Ruckman
Mar 7 '16 at 20:01
Update: It works withNoAI
off andrm=1
+r=2
in the last command, but that's not completely ideal; I really need the slimes to haveNoAI
. Any ideas?
– A.J. Ruckman
Mar 7 '16 at 20:04
@A.J.Ruckman Do you need to constantly check if slimes are on top of each other, or just when you summon/manually move them? There's another possible solution either way, but which one works best depends on what you're actually using the slimes for (why do they need to be never close together?).
– SirBenet
Mar 7 '16 at 21:09
|
show 1 more comment
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
The following command should work:
execute @e[type=Slime,name=explore1] ~ ~ ~ spreadplayers ~ ~ 2 3 false @e[type=Slime,rm=0,r=1,name=explore1]
All slimes will try to spread nearby (r=1
) slimes that aren't themselves (rm=0
) a maximum of 3 blocks around them.
Just be aware thatrm=0
will not be able to target entities at the exact same coordinates as the slime, so if two are at the same location then they will not be targeted./spreadplayers
itself can end up placing slimes at the same location.
– Skylinerw
Mar 7 '16 at 18:11
@Skylinerw Yep, when I was testing it though it didn't seem an issue in practice, as the slimes immediately push each other apart slightly then get teleported (though it could be a problem if OP has them with NoAI).
– SirBenet
Mar 7 '16 at 18:31
I'm afraid this isn't working for me @colorfusion, the slimes never stop being spread around... I was usingNoAI
but it still doesn't work with it off.
– A.J. Ruckman
Mar 7 '16 at 20:01
Update: It works withNoAI
off andrm=1
+r=2
in the last command, but that's not completely ideal; I really need the slimes to haveNoAI
. Any ideas?
– A.J. Ruckman
Mar 7 '16 at 20:04
@A.J.Ruckman Do you need to constantly check if slimes are on top of each other, or just when you summon/manually move them? There's another possible solution either way, but which one works best depends on what you're actually using the slimes for (why do they need to be never close together?).
– SirBenet
Mar 7 '16 at 21:09
|
show 1 more comment
up vote
0
down vote
The following command should work:
execute @e[type=Slime,name=explore1] ~ ~ ~ spreadplayers ~ ~ 2 3 false @e[type=Slime,rm=0,r=1,name=explore1]
All slimes will try to spread nearby (r=1
) slimes that aren't themselves (rm=0
) a maximum of 3 blocks around them.
Just be aware thatrm=0
will not be able to target entities at the exact same coordinates as the slime, so if two are at the same location then they will not be targeted./spreadplayers
itself can end up placing slimes at the same location.
– Skylinerw
Mar 7 '16 at 18:11
@Skylinerw Yep, when I was testing it though it didn't seem an issue in practice, as the slimes immediately push each other apart slightly then get teleported (though it could be a problem if OP has them with NoAI).
– SirBenet
Mar 7 '16 at 18:31
I'm afraid this isn't working for me @colorfusion, the slimes never stop being spread around... I was usingNoAI
but it still doesn't work with it off.
– A.J. Ruckman
Mar 7 '16 at 20:01
Update: It works withNoAI
off andrm=1
+r=2
in the last command, but that's not completely ideal; I really need the slimes to haveNoAI
. Any ideas?
– A.J. Ruckman
Mar 7 '16 at 20:04
@A.J.Ruckman Do you need to constantly check if slimes are on top of each other, or just when you summon/manually move them? There's another possible solution either way, but which one works best depends on what you're actually using the slimes for (why do they need to be never close together?).
– SirBenet
Mar 7 '16 at 21:09
|
show 1 more comment
up vote
0
down vote
up vote
0
down vote
The following command should work:
execute @e[type=Slime,name=explore1] ~ ~ ~ spreadplayers ~ ~ 2 3 false @e[type=Slime,rm=0,r=1,name=explore1]
All slimes will try to spread nearby (r=1
) slimes that aren't themselves (rm=0
) a maximum of 3 blocks around them.
The following command should work:
execute @e[type=Slime,name=explore1] ~ ~ ~ spreadplayers ~ ~ 2 3 false @e[type=Slime,rm=0,r=1,name=explore1]
All slimes will try to spread nearby (r=1
) slimes that aren't themselves (rm=0
) a maximum of 3 blocks around them.
answered Mar 7 '16 at 17:36
SirBenet
25k34575
25k34575
Just be aware thatrm=0
will not be able to target entities at the exact same coordinates as the slime, so if two are at the same location then they will not be targeted./spreadplayers
itself can end up placing slimes at the same location.
– Skylinerw
Mar 7 '16 at 18:11
@Skylinerw Yep, when I was testing it though it didn't seem an issue in practice, as the slimes immediately push each other apart slightly then get teleported (though it could be a problem if OP has them with NoAI).
– SirBenet
Mar 7 '16 at 18:31
I'm afraid this isn't working for me @colorfusion, the slimes never stop being spread around... I was usingNoAI
but it still doesn't work with it off.
– A.J. Ruckman
Mar 7 '16 at 20:01
Update: It works withNoAI
off andrm=1
+r=2
in the last command, but that's not completely ideal; I really need the slimes to haveNoAI
. Any ideas?
– A.J. Ruckman
Mar 7 '16 at 20:04
@A.J.Ruckman Do you need to constantly check if slimes are on top of each other, or just when you summon/manually move them? There's another possible solution either way, but which one works best depends on what you're actually using the slimes for (why do they need to be never close together?).
– SirBenet
Mar 7 '16 at 21:09
|
show 1 more comment
Just be aware thatrm=0
will not be able to target entities at the exact same coordinates as the slime, so if two are at the same location then they will not be targeted./spreadplayers
itself can end up placing slimes at the same location.
– Skylinerw
Mar 7 '16 at 18:11
@Skylinerw Yep, when I was testing it though it didn't seem an issue in practice, as the slimes immediately push each other apart slightly then get teleported (though it could be a problem if OP has them with NoAI).
– SirBenet
Mar 7 '16 at 18:31
I'm afraid this isn't working for me @colorfusion, the slimes never stop being spread around... I was usingNoAI
but it still doesn't work with it off.
– A.J. Ruckman
Mar 7 '16 at 20:01
Update: It works withNoAI
off andrm=1
+r=2
in the last command, but that's not completely ideal; I really need the slimes to haveNoAI
. Any ideas?
– A.J. Ruckman
Mar 7 '16 at 20:04
@A.J.Ruckman Do you need to constantly check if slimes are on top of each other, or just when you summon/manually move them? There's another possible solution either way, but which one works best depends on what you're actually using the slimes for (why do they need to be never close together?).
– SirBenet
Mar 7 '16 at 21:09
Just be aware that
rm=0
will not be able to target entities at the exact same coordinates as the slime, so if two are at the same location then they will not be targeted. /spreadplayers
itself can end up placing slimes at the same location.– Skylinerw
Mar 7 '16 at 18:11
Just be aware that
rm=0
will not be able to target entities at the exact same coordinates as the slime, so if two are at the same location then they will not be targeted. /spreadplayers
itself can end up placing slimes at the same location.– Skylinerw
Mar 7 '16 at 18:11
@Skylinerw Yep, when I was testing it though it didn't seem an issue in practice, as the slimes immediately push each other apart slightly then get teleported (though it could be a problem if OP has them with NoAI).
– SirBenet
Mar 7 '16 at 18:31
@Skylinerw Yep, when I was testing it though it didn't seem an issue in practice, as the slimes immediately push each other apart slightly then get teleported (though it could be a problem if OP has them with NoAI).
– SirBenet
Mar 7 '16 at 18:31
I'm afraid this isn't working for me @colorfusion, the slimes never stop being spread around... I was using
NoAI
but it still doesn't work with it off.– A.J. Ruckman
Mar 7 '16 at 20:01
I'm afraid this isn't working for me @colorfusion, the slimes never stop being spread around... I was using
NoAI
but it still doesn't work with it off.– A.J. Ruckman
Mar 7 '16 at 20:01
Update: It works with
NoAI
off and rm=1
+ r=2
in the last command, but that's not completely ideal; I really need the slimes to have NoAI
. Any ideas?– A.J. Ruckman
Mar 7 '16 at 20:04
Update: It works with
NoAI
off and rm=1
+ r=2
in the last command, but that's not completely ideal; I really need the slimes to have NoAI
. Any ideas?– A.J. Ruckman
Mar 7 '16 at 20:04
@A.J.Ruckman Do you need to constantly check if slimes are on top of each other, or just when you summon/manually move them? There's another possible solution either way, but which one works best depends on what you're actually using the slimes for (why do they need to be never close together?).
– SirBenet
Mar 7 '16 at 21:09
@A.J.Ruckman Do you need to constantly check if slimes are on top of each other, or just when you summon/manually move them? There's another possible solution either way, but which one works best depends on what you're actually using the slimes for (why do they need to be never close together?).
– SirBenet
Mar 7 '16 at 21:09
|
show 1 more comment
Thanks for contributing an answer to Arqade!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgaming.stackexchange.com%2fquestions%2f257914%2fhow-can-i-keep-mobs-from-being-too-close-together-with-spreadplayers-and-execu%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown