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
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
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: https://jenkins.jeter.de/job/MobsVsVillagers/ the source code is available here: https://github.com/TheJeterLP/MobsVsVillagers 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.
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.
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
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