[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

    ntwitch

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

    Features:
    • 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)

    Code:
    world:
        global: 100
        limits:
            squid: 30
            creeper: 50
            chicken: 0
    zombiesurvival:
        global: 100
        limits:
            zombie: -1
            creeper: 0
            skeleton: 0
            spider: 0
            squid: 0
            wolf: 0
            cow: 0
            chicken: 0
            pig: 0
            sheep: 0
            slime: 0
    creative:
        global: 50
        limits:
            zombie: 0
            creeper: 0
            skeleton: 0
            spider: 0
            slime: 0
    unload:
    - CraftSquid
    - CraftSlime
    


    HeavenlyMob.jar
    HeavenlyMob @ Github

    Installation:
    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
    Permissions:
    • 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]
    Todo:
    • Ingame commands to adjust maximum numbers, kill all of one mob type, report on number of each type.
    Changelog:

    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

    Shuan

    I just did what you said, it helps a small bit, but i still am edging into the 350-400 mobs at times. Though what i did notice is that the more players i have online at a time the more animals that spawn, and stay spawned
     
  3. Offline

    Kalais

    My map is currently on world2. However, when I save the config with world2 it adds a world1 and makes all the mobs on world2 -1.
     
  4. Offline

    ntwitch

    Hm. Are you using Multiverse or similar and have a world1 loaded? I have tested this on a server with a 'world6' and never had it try to write a world1. Can you give me more info?
     
  5. Offline

    tassox33

    My heavenly mob seems to not be jumbling the config file after i deleted and re-installed ( :
     
  6. Offline

    ntwitch

    Version 0.2.2 is out... fixed a stupid typo where I was setting "world.limits.mobtybe" but looking for "world.limit.mobtype"

    Please redownload!
     
  7. Offline

    6y7t8h

    It would be great if this worked, but unfortunately, the limit goes over 3x what it should be.

    EDIT: didn't see new version, testing now

    EDIT2: the download isn't a jar >.>
     
  8. Offline

    tassox33

    The download isn't in the place it used to be. Do we get it from get hub?
     
  9. Offline

    ntwitch

    Apologies, I was very tired when I updated the OP, and forgot to fix the link :(

    Updated to 0.3. Tested and compatible with CB 766. Added global limit (per world)

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

    Sphax

    Would it be possible to add a coeff to the spawn of the mobs ?
    For example, we could set the zombie spawn to 2 and the spiders to 0,5 and Creeper to 0. Then we would get 2x more Zombies and 2x times less Spiders and no Creepers...
     
  11. Offline

    Kainzo

    Cripples servers too much. Brings the tick rate for my server with average of 40ish players from 12 ticks to 1.9 ticks.

    Until plugins have a better way to manage mobs - I'd advise using this.
     
  12. Offline

    ntwitch

    Next version with the persistent list should work with a lot less load. I haven't had much time to work on it though :/

    For now, if you use the global limit only, it should be easier on servers. The global limit just checks the total numbers and will immediately cancel and return, no scanning involved.

    If MC wants to spawn more mobs, bukkit will be constantly sending CREATURE_SPAWN events, and as you say, there's not much I can do about that until we have better plugin controls for mob spawning.

    And you have the latest version? I copied it to a temp variable, it shouldn't be iterating over the same instance of a list any more. Honestly I think Java is being a little too picky here, since it's not making any changes, just reading the list ;)
     
  13. Yes, always lastest.

    I have switched to globals only after running into major tickrate issues. Even with globals only, this plugin slaughters tickrate, something is very broken.
     
  14. Offline

    ntwitch

    :/ Must just be all the CREATURE_SPAWN events.. I guess this will work ok on a small server with few players on at a time, but not a busy server. I will rewrite it once there is better control over mob spawns..

    When writing it, I tried to keep an eye towards efficiency, returning as soon as possible when I know an event will be canceled or allowed (such as the way the global limit is implemented). But since MC server is constantly trying to spawn mobs even that little bit of code is being called constantly.

    I wish I could do more, but with the little control over mob spawn we have, I guess this is it. I'd like to remind everyone that I've been programming in java for only 2 weeks now, so I hope I haven't made any serious newbie mistakes :p
     
  15. Offline

    Kainzo

    I will say - I don't believe its the code in this plugin causing the tick rate issues - I believe its something that needs to be done thru the actual server jar - since there arent the appropriate hooks at the moment to limit in the proper manner.
    bukkit devs would have more incite on this than I.
     
  16. Offline

    Draconicus

    THANK YOU THANK YOU THANK YOU THANK YOU


    I have been dying for a new mob control plugin! No more squid/ghast doom! Real control per-world!
     
  17. Offline

    WolfKitOF

    Dungeons don't appear to be working
     
  18. Offline

    Shuan

    Just added the update to my 766 server, Does not seem to work at all, in fact it has disabled ALL mob spawning
     
  19. i have a 766 server and everything is working fine for me :)
     
  20. Offline

    sintri

    Well suppose bit more of a minecraft/bukkit problem, but this plugin does cause "[WARNING] Can't keep up! Did the system time change, or is the server overloaded?" messages on pure water worlds. And by pure water worlds, I do mean pure water world. Course the alternative to this would be letter squids spawn and create an infinite loop of lag.

    Though, nevermind, thought wormhole x-treme worlds would be able to stop spawns as a config, cept it still spams the message every 5-6 secs

    Edit: Well not entirely that much time to do testing, but complete forgot performance tweak came with a mob control, used that to disable spawns and seems to work without spamming messages.
     
  21. Offline

    Jdbye

    This plugin worked nicely for a while but at some point stopped mobs from spawning completely and I didn't realize because there were zero errors, until I removed it and mobs started spawning again. Deleting the config file did not help. I'm pretty sure it was the latest version, but I'm not certain since I removed it.
     
  22. ok... quick question about how this runs...

    the setting for global: ###### ... that is for the total number of mobs on the server at one time (entire world). right?
    So the individual mob settings (such as chicken: 10 )... does that mean that there are only 10 chickens on the world at any given time?

    If so, what about dogs/wolves? If i want wild wolves to be rare, but not stop spawning once they've all been tamed, is that possible? (if i set dogs to 10, does that mean there will only be 10 dogs at a single time?)

    Sorry for being such a noob :/
    Just trying to make the server more 'survival'... which is too easy when you have 12 pigs spawning every 10 steps, and have to go for 10 minutes in the dark to get to any zeds (but find creepers without looking)
     
  23. Offline

    RedValkyrie

    Just FYI, something broke in 1.6_6.
     
  24. Offline

    RobotGymnast

    Would it be much trouble to get a static link?
     
  25. Offline

    sintri

    Yes, seems something is a-foot/loft/loof here.
     
  26. Offline

    Kainzo

    The prevention for monsters/entities is not working correctly - I don't believe the hooks are in. So thats why it may not be working correctly.
     
  27. Offline

    Matsuro

    can this be used to spawn ghasts and zombie pigmen outside the nether? can i use this to spawn giants?
    thanks
     
  28. work together you can make it to WorldGuard, so you can make spawn in certain regions only specific monsters?
     
  29. This plugin still active? updating to 860?
     
  30. Offline

    TelephoneKiosk

    Please update this.
     

Share This Page