Mobs Attack Villagers

Discussion in 'Plugin Requests' started by Smurfamel, Oct 12, 2019.

Thread Status:
Not open for further replies.
  1. Offline


    Minecraft version: 1.8

    Plugin category: Mobs

    Suggested name: MobsAttackVillagers

    What i want: So basically what i want is spiders/cavespiders, skeletons/witherskeletons, witches, blazes, slime/magma cube, creeper and ghast all mobs listed is what should attack villagers and i also want villagers to run away from the mobs just like zombies.

    Ideas for commands: none needed mobs should always attack.

    Ideas for permissions: none needed

    When I'd like it by: doesn't matter being patient is always good

    Resoluciones likes this.
  2. Offline


  3. Offline


    I am pretty sure you can achieve this with command blocks.
  4. Offline


    I tried before with teams but this doesn't work ever and in 1.8 command blocks aren't as advanced and I need to keep it at 1.8 a plugin for this is the only thing that would work
  5. Offline


    No Problem, I will do it for you. will start working on it now

    Plugin is done, keep in reminder that this file is NOT checked by the bukkit dev team. get it here:
    the source code is available here:
    Basically what this does is:
    Loop every 30 seconds through all worlds. in every world, loop through all entities.
    If the entity is a monster, get all villagers which are 50 blocks near.
    set the monsters target to the villager.
    Tested and works.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: Oct 17, 2019
    Resoluciones likes this.
  6. Offline


    it works just spiders just jump at villagers and they don't actually run at them or attack them and they attack villagers in the daylight and witches and skeletons will just shoot at nothing after the villager has been killed by them and slimes/magma cubes and ghast don't attack the villager at all also villagers aren't scared of any of the mobs and make it where they react to the villager's entity as soon the villager is in their sight if you could instead of 30 seconds its too long zombies are long gone before the other mobs do anything and creepers every 30 seconds only one creeper will attack a villager also if a witch or blaze see a villager all other blazes and witches will ignore closer villagers and just attack the villager the other blaze saw first also endermen shouldn't attack villagers if you could make if a villager looks at a enderman then the enderman will attack.
    Last edited: Oct 17, 2019
  7. Offline


    You cant set the villagers to run away from them. bukkit has no method for that.
  8. Online

    timtower Moderator Moderator

    With NMS you can
  9. Offline


    well with nms for sure you can. But i don't like using nms as it makes the plugin break very easy with a new mc version. I always try to keep my plugins working forever
  10. Online

    timtower Moderator Moderator

    That is the bad part about NMS indeed.
  11. Offline


    Oh that's fine then but I have a list of things that I think might work with bukkit
    1. Ghasts and slimes dont attack villagers i know that they are considered passive mobs so if you make it so they attack also using passive but would that mean
    pigs and sheep etc would attack?
    2. Make it so it's not 30 seconds make it 1 or 0 seconds for them to attack
    3. Spiders only jump and not attacking target I am using 1.8 if it matters
    4. If you could make another plugin file with mobs attacking wolves so both villagers and wolves get attacked
    Last edited: Oct 18, 2019
Thread Status:
Not open for further replies.

Share This Page