[ADMN] HeavenlyMob v0.3 - Limit or stop mob spawns by type, multi-world compatible [766]

Discussion in 'Inactive/Unsupported Plugins' started by ntwitch, May 5, 2011.

  1. Offline


    Limit or stop mob spawns by type, multi-world compatible

    • Limits mob spawns by type. Can also disable individual mob spawns.
    Amounts are specified in config.yml and are configurable for each world.
    If not specified in the config file, defaults to -1 (no limit)
    To disable a mob type, just set the number to 0.
    • Removes specified mobs from chunks when they are unloaded
    Here is an example config.yml for:
    • A normal world ('world')with limited squids to reduce lag, limited creepers to reduce world damage, and NO EVIL SPY CHICKENS! Global limit: 100
    • A zombie survival world ('zombiesurvival') with only zombies!! and lots of them. Global limit: 100
    • A creative world ('creative') with no creepers, zombies, skeletons, spiders or slimes. Global limit:50
    • Remove squids and slimes on chunk unload (don't despawn normally)
    Sample config.yml (open)

        global: 100
            squid: 30
            creeper: 50
            chicken: 0
        global: 100
            zombie: -1
            creeper: 0
            skeleton: 0
            spider: 0
            squid: 0
            wolf: 0
            cow: 0
            chicken: 0
            pig: 0
            sheep: 0
            slime: 0
        global: 50
            zombie: 0
            creeper: 0
            skeleton: 0
            spider: 0
            slime: 0
    - CraftSquid
    - CraftSlime

    HeavenlyMob @ Github

    1. Place the HeavenlyMob.jar into your plugins directory
    2. Start your server
    3. Edit the config.yml as desired
    4. Issue command: '/hm reload' to reload the config
    • heavenlymob.reload - /hm reload command
    Known bugs:
    • Seems to allow slightly more than specified to spawn. Not sure why this is, but it never gets above 2 times your limit, so just adjust your amount down to compensate. Possibly fixed? Please post your experiences.
    • Due to the way I get the name of the mob type, you can't just put "squid" or "slime" or "ghast" in the unload section of the config.yml, it has to be the proper class name (CraftSquid...etc) Priority: [Low]
    • Uses too much CPU.. scans the list of entities too often. Will have to rewrite part to keep a persistent list. Priority: [High]
    • Ingame commands to adjust maximum numbers, kill all of one mob type, report on number of each type.

    Version 0.1
    • First release
    Version 0.2
    • Auto-generate config.yml
    • Remove specified mobs when a chunk is unloaded
    Version 0.2.1
    • Fixed the auto-generation of config.yml
    • Fixed ConcurrentModificationException (at least, should be fixed. please report if this happens again)
    • Added '/hm reload' command
    Version 0.2.2
    • Fixed a typo that caused it to look for the wrong values in config.yml, causing it to.. not limit mobs at all.
    Version 0.3
    • Added global limit, tested for CB 766
    kadesexton, Soryo and thecoolwolf like this.
  2. Offline


    i cant get this to work at all:eek: i have it in my plugins folder but it isn't showing up in the console at all. am i doing something wrong?
  3. Offline


    Hm I just redownloaded the version I posted and put it in a test server with absolutely nothing else, and it displayed a message in the console just fine. It does not auto-generate the config file at the moment, I should add that to the todo.. But even with the config missing, it will print its message in the console, it just won't limit anything.

    will say this when it doesn't find Permissions (which is not used currently anyway)
    [INFO] [HeavenlyMob] Permissions not found. Defaulting to OP until Permissions is loaded.
    and this if Permissions is found:
    [INFO] [HeavenlyMob] Permissions v2.7 detected!
  4. Offline


    okay i try to re download it and try again (i might just missed it when i was looking though the console cuz i have many plugins:oops:) but make a zip/rar folder with the config in it to make it easy for new users :D
  5. Offline


    From what I understand of it, the spawn function creates mobs in "batches" - you get a clump of cows, and a chunk of chickens, and a selection of sheep, and OH GOD TEN CREEPERS.

    So the limiter would simply inhibit the spawn command if there are that many or greater mobs.
  6. If this works as advertised, I will be very grateful.

    Will this be up to date for the MC updates? (the last one I used is still on b670 and I want at least a 1.5 plugin)

    I will wait till its updated...
  7. Offline


    I know I probably sound stupid, but where do i make the config.yml file?
  8. Offline


    Could you put up an installation guide? I wrote a config.yml put it into a new folder named Heavenlymob then reloaded. nothing happens.
  9. Offline


    Added a zip file to the OP, which includes the sample config.yml.

    Also for plugin folders they need to be named exactly the name as listed in the plugin's plugin.yml file. In the case of this plugin, that would be "HeavenlyMob". And it is case sensitive.

    This works for build 740 which is Minecraft 1.5, and should work for most future builds of CraftBukkit unless they seriously change some stuff around.
  10. Offline


    Thanks ^^
  11. Offline


    Thank you.
  12. Okay, thats awesome!
  13. Offline


    Released 0.2 and updated the OP
  14. Offline


    Trying this out now.
  15. Offline


    I can't seem to get this plugin to work. Looking over the command prompt while the server is loading up the plugin is loaded but it will not limit creatures. (Testing on GoldenTunnels map)

    I do use MultiVerse though and that seems to take control over what I have set in the server properties such as animals=bool and mobs=bool. I'll go read over the posts for MultiVerse and see if there is any mention of this conflicting with spawning control.
  16. Offline


    Doesn't seem to work for me, i put squids at 0 and they were all over the place. I'm using /wxw multiworld. With 4 worlds.

    When i used a neat and orderly yml format, it jumbled all of my text when i looked at it later.
    From this :
    squid: 30
    creeper: 50
    chicken: 0
    - CraftSquid
    - CraftSlime

    To this:
    world: limit: squid: 30 creeper: 50 chicken: 0
    unload:- CraftSquid- CraftSlime

    This forum doesn't let me add 5 spaces but you get the picture.
  17. Offline


    This has been tested on a server with MultiVerse, and it seems to work fine, for all worlds. Can you give me a list of plugins you are running? Also, it won't despawn the mobs until the chunk is unloaded, so any mobs that were there when the chunks were last saved will still be there. If you use a command like WorldEdit's /butcher to wipe all mobs and let them respawn it should apply the limits?

    I have not seen the config.yml get jumbled like that, either. Also, yml standard indent is 4 spaces, not 5, though when I tested a config.yml with 5 spaces it cleanly rewrote it with 4 spaces.. Not sure of the problem here :/
  18. Offline


    Ok ill try 4 spaces, im currently using 5 spaces in permissions 2.72 and it seems to stick at 5. Im using
    -Big brother .
    wxw multiworld managment
    wxw stargates
    phatloots -

    tried with 4 spaces, not having any luck. I'll try deleting the mod; start/stop server, putting mod back in and then starting it.
  19. Offline


    The plugins I use on my server are:
    DynMap (Version 0.15)
    WorldEdit (Version 4.3)
    WorldGuard (Version 5.0-alpha9)

    I tried using /butcher but mobs quickly respawn in the dark areas of the world.
  20. Offline


    You guys use many of the same plugins as I have tested this with.. I can not seem to reproduce these issues :/
  21. Offline


    Hey, I've loaded and replaced the config.yml several times, and every time I do it and reboot my server, the thing replaces my entry with this:

    This is what it was before:
    zombie: 5
    creeper: 2
    skeleton: 10
    spider: 10
    squid: 10
    slime: -1
    - CraftSquid
    - CraftCreeper

    The only other plugin/mod I use is the Wormhole X-treme mod. Can you please help me?
  22. Offline


    Great plugin!

    Thank you :)

    btw: It would be nice have a default config with ALL mobs listed as example.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: May 15, 2016
  23. Offline


    OK I think I might know what the problem is but I'm tired and I have a long day at work tomorrow. I will work on this after that. Expect an update soon.
  24. Offline


    I dont quite understand the unload portion, does using:
    - CraftSquid
    - CraftSlime
    When a chunk unloads, does any Squids and Slimes in the chunk get removed and will need to respawn in the chunk when the chunk is reloaded (and presuming there is enough space in their limits to do so) or they are removed and will -never- respawn again?

    Essentially I dont know much about minecraft (it may already do this, I dont know) but I would like the ability to limit all my mobs to their limits in the config file. And if a chunk gets unloaded (ie players logged off or moved away from the chunk) any mobs in the chunk would despawn, allowing the mob to respawn somewhere else. Effectively allowing more 'active' mobs as opposed to ones that get spawned in a friggin hole in the ground and then never see any players.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: May 15, 2016
  25. Offline


    Your first idea is correct. When the chunk is unloaded, it will scan the entities within that chunk for the types listed in the "unload" portion of the config, and remove them. Then, when the chunk is loaded again, they will respawn if there is space in their limits.

    You can add any type to there, not just the squids and slimes, it's just intended especially for them since they don't seem to despawn properly. If you add every mob type, it will behave as you hope.
  26. Offline


    This plugin is just what I needed :D I wanted to remove those buggy slimes and the rest of the features are also handy. Just to be sure the mob limit is per chunk right? So if I set Chicken: 5 there will be a max of 5 Chickens spawned in every chunk?

    Great Plugin! I hope it will be kept up to date and working flawlessly! :p
  27. Offline


    I just recently added this to my server because we have a nether and i did not want to completely rid of the mobs in the nether cause lots of people liked them, But i did limit everything so it would stay around 260 mobs, but whenever i use //butcher command (other plugin) it shows how many mobs i have just killed, and its around 350-400 mobs, i get no errors, but this is irritating considering our servers processor is currently not so hot. Any help?
  28. Offline


    Thank you ntwitch, exactly what I am after in a mob control plugin :)
  29. Offline


    Updated to 0.2.1, adding the /hm reload command and fixing a few bugs. read OP for details.

    The limit is per world.

    I'm thinking this has to do with the way minecraft spawns mobs in groups. I'm working on constantly checking the entity list and culling mobs when they are over the limit. Adjust your limits down a bit further, and it should reduce the total number of mobs for now.

Share This Page