I'm trying to make a zombie attack another particular zombie. I've looked online and found solutions for pre 1.13 but none have worked for me in 1.13. What would be the simplest way to achieve this?
They can always attack only one entity at a time, that I know. Let's say there is a skeleton whom I want to have fight a group of 2 zombies. Using the UUID method (as for as I understand) I can only make the skeleton want to fight 1 of the 2 zombies. After finishing that first zombie it wouldn't go after the next one. Is there a way to ensure that after the first zombie it is then going to attack the second zombie? (without letting the second zombie attack the skeleton first)
They can always attack only one entity at a time, that I know. Let's say there is a skeleton whom I want to have fight a group of 2 zombies. Using the UUID method (as for as I understand) I can only make the skeleton want to fight 1 of the 2 zombies. After finishing that first zombie it wouldn't go after the next one. Is there a way to ensure that after the first zombie it is then going to attack the second zombie? (without letting the second zombie attack the skeleton first)
Thanks a lot for your help so far btw!
I found a way to switch to the next entity but there is one problem, there can be only one entity with the UUUIDMost:1L and UUIDLeast:0L at a time.
The UUID is like a unique id for every entity in the game. There can't be 2 entities with the same id so that's why all of your zombies that will fight the skeleton needed to have different UUIDs. And because of that, you will have to make one system for every entity.
I used this:
execute as @e[tag=target] at @s unless entity @e[tag=owner,distance=..5] run tag @e[tag=canThrow,distance=..5] add throw
execute as @e[tag=throw,tag=!owner] at @s run execute as @e[tag=target,distance=..5] at @s run summon minecraft:snowball ~ ~4 ~ {owner:{L:0L,M:1L},Tags:["snowball"]}
execute as @e[tag=throw] at @s if entity @e[tag=snowball,distance=..10] run tag @s add owner
This system checks if there is a snowball owner near the skeleton and if there isn't, it chooses another nearby zombie to be the owner.
Now the problem is in the second command, you have to change the UUIDMost and UUIDLeast to the UUID of the entity that will fight with the skeleton and there is no automatic way of doing that so you will have to clone this a couple of times (one for each zombie, see picture)
Like I showed in the picture, if you have 3 zombies, make 3 command block chains with the upper commands and just change the UUID in the command to the UUID of the entity
Example:
zombie 1 has UUIDMost:1L and UUIDLeast:0L
zombie 2 has UUIDMost:2L and UUIDLeast:0L
zombie 3 has UUIDMost:3L and UUIDLeast:0L
as long as one number of the id is different, there will be no conflicts
and now change the commands to fit each zombie:
so for zombie 1, the second command looks like this:
execute as @e[tag=throw,tag=!owner] at @s run execute as @e[tag=target,distance=..5] at @s run summon minecraft:snowball ~ ~4 ~ {owner:{L:0L,M:1L},Tags:["snowball"]}
for the second zombie:
execute as @e[tag=throw,tag=!owner] at @s run execute as @e[tag=target,distance=..5] at @s run summon minecraft:snowball ~ ~4 ~ {owner:{L:0L,M:2L},Tags:["snowball"]}
and the third zombie
execute as @e[tag=throw,tag=!owner] at @s run execute as @e[tag=target,distance=..5] at @s run summon minecraft:snowball ~ ~4 ~ {owner:{L:0L,M:3L},Tags:["snowball"]}
Thanks for the reply, I'm going to test this when I'm back home on monday. I have a question though as I don't fully understand the tags you used. I guess the skeleton has the 'target' tag I guess. The 'snowball', 'owner' and 'throw' tags I also understand but what about the 'canThrow' tag? Cause it's only mentioned once. I don't understand how that one works. It says it wants to add the tag 'throw' to an entity with the tag 'canThrow', but the 'canThrow' tag is never given to an enitity in these commands. Do all the zombies have this tag maybe?
Thanks for the reply, I'm going to test this when I'm back home on monday. I have a question though as I don't fully understand the tags you used. I guess the skeleton has the 'target' tag I guess. The 'snowball', 'owner' and 'throw' tags I also understand but what about the 'canThrow' tag? Cause it's only mentioned once. I don't understand how that one works. It says it wants to add the tag 'throw' to an entity with the tag 'canThrow', but the 'canThrow' tag is never given to an enitity in these commands. Do all the zombies have this tag maybe?
Sorry, I forgot to tell you that all zombie that will fight should have a tag called "can throw". This way the system knows which zombies can attack the skeleton.
Thanks for the download! I've just tried it and the skeleton doesn't get aggro at the second or third zombie by the commands changing the owner of the snowball but because he is attacked by them himself. If you give the zombies no AI then the skeleton stops attacking after killing the first zombie. Am I using it wrong or did you maybe miss to add something in this world download?
Thanks for the download! I've just tried it and the skeleton doesn't get aggro at the second or third zombie by the commands changing the owner of the snowball but because he is attacked by them himself. If you give the zombies no AI then the skeleton stops attacking after killing the first zombie. Am I using it wrong or did you maybe miss to add something in this world download?
I have no idea, it worked when I spawned all 3 zombies at the same time
I've got my own prototype to work! 2v2 zombie/skeleton vs zombie/skeleton. By freezing their AI in between kills and re-aggroing each mob against the remaining opponent. I really wish I got yours to work cause I would like to make it work without freezing. Still, I'm pretty proud I got mine to work
I've got my own prototype to work! 2v2 zombie/skeleton vs zombie/skeleton. By freezing their AI in between kills and re-aggroing each mob against the remaining opponent. I really wish I got yours to work cause I would like to make it work without freezing. Still, I'm pretty proud I got mine to work
I'm trying to make a zombie attack another particular zombie. I've looked online and found solutions for pre 1.13 but none have worked for me in 1.13. What would be the simplest way to achieve this?
You can do this by summoning a snowball above the zombie and setting the owner of the snowball to be another zombie.
However, you have to summon a zombie with a specific UUID first.
Summon a zombie:
and summon another zombie (this one will attack the first one):
and now summon a snowball above the target:
To make the snowball invisible, you could use a resource pack to replace the texture with something transparent.
Command block engineer // Developer // #TeamTrees
Thanks, that works like a charm. Will this also work with other mobs like skeletons, creepers, spiders and pigmen?
And another question: is there a way to make the owner of the snowball a "/team" instead of an individual enitity?
I'm trying to make a team based arena battle between mobs.
I don't know if it will work on other mobs, but it should work on all basic mobs like zombies, skeletons, spiders...
And no, unfortunately, you can only use this with an individual entity.
Command block engineer // Developer // #TeamTrees
Alright, thanks for the info. It seems to work fine for zombies, skeletons, spiders and creepers. I've yet to try other ones but I will.
Do you know if there is even a situation or possibility at all in the game where a mob is aggro towards multiple other entities?
What do you mean by multiple entities? a zombie or skeleton can only attack one entity at a time and then moves on to the next one that's in range.
Command block engineer // Developer // #TeamTrees
They can always attack only one entity at a time, that I know. Let's say there is a skeleton whom I want to have fight a group of 2 zombies. Using the UUID method (as for as I understand) I can only make the skeleton want to fight 1 of the 2 zombies. After finishing that first zombie it wouldn't go after the next one. Is there a way to ensure that after the first zombie it is then going to attack the second zombie? (without letting the second zombie attack the skeleton first)
Thanks a lot for your help so far btw!
I found a way to switch to the next entity but there is one problem, there can be only one entity with the UUUIDMost:1L and UUIDLeast:0L at a time.
The UUID is like a unique id for every entity in the game. There can't be 2 entities with the same id so that's why all of your zombies that will fight the skeleton needed to have different UUIDs. And because of that, you will have to make one system for every entity.
I used this:
This system checks if there is a snowball owner near the skeleton and if there isn't, it chooses another nearby zombie to be the owner.
Now the problem is in the second command, you have to change the UUIDMost and UUIDLeast to the UUID of the entity that will fight with the skeleton and there is no automatic way of doing that so you will have to clone this a couple of times (one for each zombie, see picture)
Like I showed in the picture, if you have 3 zombies, make 3 command block chains with the upper commands and just change the UUID in the command to the UUID of the entity
Example:
zombie 1 has UUIDMost:1L and UUIDLeast:0L
zombie 2 has UUIDMost:2L and UUIDLeast:0L
zombie 3 has UUIDMost:3L and UUIDLeast:0L
as long as one number of the id is different, there will be no conflicts
and now change the commands to fit each zombie:
so for zombie 1, the second command looks like this:
for the second zombie:
and the third zombie
I hope this makes sense.
not sure if it will work tough
Command block engineer // Developer // #TeamTrees
Thanks for the reply, I'm going to test this when I'm back home on monday. I have a question though as I don't fully understand the tags you used. I guess the skeleton has the 'target' tag I guess. The 'snowball', 'owner' and 'throw' tags I also understand but what about the 'canThrow' tag? Cause it's only mentioned once. I don't understand how that one works. It says it wants to add the tag 'throw' to an entity with the tag 'canThrow', but the 'canThrow' tag is never given to an enitity in these commands. Do all the zombies have this tag maybe?
Sorry, I forgot to tell you that all zombie that will fight should have a tag called "can throw". This way the system knows which zombies can attack the skeleton.
Command block engineer // Developer // #TeamTrees
I can't seem to get it to work, could you maybe make a world download for this?..
I don't think I understand the distance=..5 thing either.
Here you go: https://www.dropbox.com/sh/i8u1weulkmnvs4x/AAD-QyELC3gkGdGpsJdd_-dva?dl=0
Command block engineer // Developer // #TeamTrees
Thanks for the download! I've just tried it and the skeleton doesn't get aggro at the second or third zombie by the commands changing the owner of the snowball but because he is attacked by them himself. If you give the zombies no AI then the skeleton stops attacking after killing the first zombie. Am I using it wrong or did you maybe miss to add something in this world download?
I have no idea, it worked when I spawned all 3 zombies at the same time
Command block engineer // Developer // #TeamTrees
I've got my own prototype to work! 2v2 zombie/skeleton vs zombie/skeleton. By freezing their AI in between kills and re-aggroing each mob against the remaining opponent. I really wish I got yours to work cause I would like to make it work without freezing. Still, I'm pretty proud I got mine to work
Good job
Command block engineer // Developer // #TeamTrees