We've split up the commands, scripting and mods, and add ons category! Please be sure you get your thread in the right place.

91

Mob target command

6 Comments

Please sign in to leave a comment.

Sorted by oldest
  • 4
    Registered User commented
    Comment actions Permalink

    I love watching mobs fighting each other, but the only way to get them to fight is to:

    1. Build a wither,

    2. Name a vindicator Johnny, or

    3. Use natural hostility (such as skeletons vs wolves).

    I have spawned hundreds of mobs in the hope that they fight, and while I have seen some great battles, I have only ever seen three creepers explode.  Also, I have never been able to get ghasts, guardians or drowned to fight in the battles because vindicators named Johnny and withers have a hard time attacking them.

    In conclusion, I support and approve of this suggestion.

  • 6
    Registered User commented
    Comment actions Permalink

    and if you added the ! like "/mobtarget Minecraft:skeleton [!Minecraft:villager]" it would attack everything except for the villager.

  • 2
    Registered User commented
    Comment actions Permalink

    If this command affects natural hostilities, it might be a better idea to move that functionality away from a single command and toward datapack entity_type tags, where every hostile/neutral mob would have a tags that specify the mobs that they are naturally hostile and neutral towards. Then you could edit those entity_type tags with a datapack, which is a much more organized way of implementing the same feature.

  • 2
    Registered User commented
    Comment actions Permalink

    I like this idea. I think the format would be more customizable, and fit into vanilla better if it were /mobtarget @e [type=(attacking mob type)] [type=(attacked mob type)]. Then you could also do /mobtarget @e [name=(attacking mob name given by name tag)] [name=(attacked mob name given by name tag)]. Also like someone else said you could do /mobtarget @e [type=(attacking mob type)] [type=!(excluded mob type)] to make a mob attack all mobs besides the ones you exclude. You could have command blocks set up to easily make a mob attack all mobs besides a group of different mobs.

  • 1
    Registered User commented
    Comment actions Permalink

    I always wanted something like this . hope it gets added 👍

  • 0
    Registered User commented
    Comment actions Permalink

    Not quite related, but neutral mobs like zombified piglins have the AngryAt NBT tag, whereas normal piglins have the "Brain" -> "memories" -> "minecraft:angry_at" -> "value" NBT tag. Both allow to set the mob's target as long as its UUID is known. Unfortunately, there's nothing like that for regular hostile mobs. Otherwise, one could use a command like /data modify entity @e[type=zombie,limit=1,sort=nearest] AngryAt set from entity @e[type=piglin,limit=1,sort=nearest] UUID. However, one could only set a single target this way. The team functionality has so many shortcomings that can't be relied on to make epic fights between mob groups and even if teams would be fixed, using /data would still be very cumbersome. Having a straightforward way to make mobs be hostile to each other would be a great addition to custom maps.