[MECH]AntiMobSpawn v2.0 - Stop certain creatures spawning on certain types of block [953]

Discussion in 'Inactive/Unsupported Plugins' started by Sam_Lex, Apr 11, 2011.

  1. AntiMobSpawn - The Pest Controlling Plugin
    Version: 2.0v

    Ever been making a house out of trees and having to leave torches EVERYWHERE to stop those pesky creepers from destroying the place. Or maybe you want to stop monsters from spawning inside your chicken farm? Well this plugin lets you do just that! By selecting the block Ids that you don't want mobs to spawn on, you can say goodbye to those pesky creepers

    Features:
    • Stops monsters from spawning on the specified blocks
    • Can choose which creatures are stopped
    • Every option can be selected per-World!
    How to use:

    When the plugin is first loaded, a new properties file(called AntiMobSpawn.properties) is created inside it's own folder. There are a number of options inside the file that can be changed. There is a default world whose settings are used if you don't want to have per-World settings, or if the world the spawn is trying to happen on is not in the file. Then there is all the worlds listed that were present when the file was created. If a new world is added, the settings will need to be added manually, or just the default settings from the file will be used. There is also fall-back defaults that are used if there is an exception while getting data from the file.

    Generated Configuration File (open)

    #Properties File for the Bukkit plugin, AntiMobSpawn
    #Generated at 11:52 AM on Sunday, 3 July 2011
    #All selected values MUST be within apostrophes ('')

    #Setting to enable multi-world support. If false, all worlds will follow the default world settings
    multi: 'true'

    #The default world
    Default:
    #Select whether to block spawns on all block types
    all blocks: 'false'
    #List of blocks to stop spawns on. Each number must be within it's own apostrophes ('') with a single ending apostrophe
    blocks: '18' '46''
    #Select which creatures the plugin should stop from spawning. True to stop them, false not to
    chicken: 'false'
    cow: 'false'
    creeper: 'true'
    ghast: 'true'
    giant: 'true'
    monster: 'true'
    pig: 'false'
    pig zombie: 'true'
    sheep: 'false'
    skeleton: 'true'
    slime: 'true'
    spider: 'true'
    squid: 'false'
    wolf: 'false'
    zombie: 'true'

    world:
    #Select whether to block spawns on all block types
    all blocks: 'false'
    #List of blocks to stop spawns on. Each number must be within it's own apostrophes ('') with a single ending apostrophe
    blocks: '18' '46''
    #Select which creatures the plugin should stop from spawning. True to stop them, false not to
    chicken: 'false'
    cow: 'false'
    creeper: 'true'
    ghast: 'true'
    giant: 'true'
    monster: 'true'
    pig: 'false'
    pig zombie: 'true'
    sheep: 'false'
    skeleton: 'true'
    slime: 'true'
    spider: 'true'
    squid: 'false'
    wolf: 'false'
    zombie: 'true'

    world_nether:
    #Select whether to block spawns on all block types
    all blocks: 'false'
    #List of blocks to stop spawns on. Each number must be within it's own apostrophes ('') with a single ending apostrophe
    blocks: '18' '46''
    #Select which creatures the plugin should stop from spawning. True to stop them, false not to
    chicken: 'false'
    cow: 'false'
    creeper: 'true'
    ghast: 'true'
    giant: 'true'
    monster: 'true'
    pig: 'false'
    pig zombie: 'true'
    sheep: 'false'
    skeleton: 'true'
    slime: 'true'
    spider: 'true'
    squid: 'false'
    wolf: 'false'
    zombie: 'true'

    Download AntiMobSpawn(DropBox)
    Source(Github)

    Changelog:
    Version 2.0:
    • The properties file has been completely changed. Options are clearly labelled and the formatting will work with Notepad
    • MultiWorld support!
    • Ability to choose which creatures are affected
    Version 1.1:
    • Added support for multiple blocks to be selected in the properties file (by default, 0 and 18 are in the file, but for some reason, notepad does not add the line separator, so when editing the file, please use a different text editor as notepad displays it all as one big line of numbers, that if replicated, won't work)(if this is confusing, please ask and I will try to explain it better :))
    Version 1.0:
    • Released AntiMobSpawn plugin
    ToDo:
    • Add support for selection cuboids that no mobs can spawn in (idea from PsychoNecrosis)-
    • Allow selection of that types of spawn are affected
    • Add command to reload settings without using /reload (idea by spunkiie)
    Note: This plugin only affects nature spawn. Spawns caused by spawners, beds, lightning, eggs and other plugins will not be affected!

    I would like to say thank you to squirrelo for the idea
     
  2. Offline

    Sleaker

  3. I know about that one, I found out to late :( I was only following this request
     
  4. Offline

    PsychoNecrosis

    It'd be really nice to be able to select a cuboid-like area and just turn off mob spawning between those two points - regardless of if they are spawning due to low light or via a spawner. Any idea if that's possible?
     
  5. That's probably very possible. So would that be an add-on to this plugin, so monsters couldn't spawn on the selected block or in the cuboid area, or would it be a separate plugin?
     
  6. Offline

    PsychoNecrosis

    That's entirely up to you, Sam_Lex :)

    Reason why I thought of it is that I have a structure that has blocks in the millions, and is low lit. Ridiculous amounts of mobs = god killing lag.

    Personally I'd prefer it to stop mobs spawning within the cuboid, rather than on the block within the cuboid.

    Then again I'd assume it'd be less taxing to stop spawns within a cuboid rather than looking for the block type over and over. I'm not familiar with the workings of bukkit or MC, so I can't offer any suggestions there :p
     
  7. Well, I'll look in to adding it in the next update I do for AntiMobSpawn. It'll fit in nicely with the other thing I'm planning on adding, which is allowing multiple blocks to be added to the list of blocks that monsters can't spawn on :)
     
  8. Offline

    PsychoNecrosis

    Sweet! Looking forwards to it :)

    I tried other non spawners, like CivilizedSpawns and NoCivilizedSpawns, which sort of do the same thing, but they do area checking. When that's done in a huge building, it started making my console unhappy with can't keep up errors :p

    Guess that's something you'll have to look out for in your testing with large cuboids, eh?
     
  9. Yeah. I having made one plugin, and almost finished another, I know that writing a plugin is easy... when compared to testing it and fixing the one gizillian billion error that come up that make no sense at all :(
     
  10. I'm going to wait till the Minecraft 1.5 version of Bukkit is out before finishing the updates for this because I don't know what kind of changes are going to be in the new version and I don't want to have to make to much for myself :) I should be finshed the updates within a couple of days :)
     
  11. Offline

    PsychoNecrosis

    Oh, for the cuboid thing, you might want to look into hooking it into WorldEdit's cuboid selection.
    Just food for thought :)
     
  12. I have released version 1.1 of AntiMobSpawn. Unfortunately, it only includes multi-block selection, not the cuboid idea yet, sorry about that. I will get to work on the cuboid thing as soon as I can, but I have exams soon but hopefully I can get it done before the exams :)

    EDIT: And thanks for the idea about hooking into WorldEdit. I've come up with my own idea, but if it doesn't work, I'll try that :)
     
  13. Offline

    Maoman

    This is a great mod, super, super useful. Solves my particular problem of wanting monsters outside but hating them in caves, so I just tell it not to spawn them on smooth stone, cobblestone, or plain dirt. Then they'll spawn outside on grass and sand, but not in caves! Woot.

    The only thing id life it if you changed was where the properties file is made. This is literally the ONLY plugin I have tried (and ive tried at least 40) that saved the properties file somewhere other than right next to the .jar file in the plugins folder. Confused me for a minute and had to look for it. I don't know if you have a reason for it, overlooked it, or just plain didn't think about it, but do you think you could fix it? Thanks!
     
  14. Thanks for the feedback :) I'm planning to address the properties file properly in the next update (although it'll be in a few weeks). The reason it's where it is, is cause that's where it's easiest to put it, but in the next update I am doing to move it in to the plugin folder. Also I'm going to change to layout of the properties file :)
     
  15. Offline

    Maxis010

    Just a heads up, the reason your line breaks are NOT being read by windows is likely you aren't running a windows server, Linux uses the line break /n while windows looks for /n/r, notepad can't understand /n on it's own
     
  16. Thanks for the heads up. I don't really mind that notepad doesn't understand /n, I was just warning people so that they didn't mess up the files :)
     
  17. Offline

    Brandi

    what about colored wool just type 35 or (lime wool) 35,5
    so when i type 35 is any woolcolor a no-mob-spawn-block?
     
  18. Sorry for the delay in an answer Brandi. I think that putting 35 will stop mob spawns on any wool, not just a certain colour. I you want, I can look into allowing different colours to be no-spawn blocks?

    Tested in recommended craftbukkit version 766. Works as far as I can tell :) Didn't get a chance to test it in version 740 but it works in 733 and 760 so I would guess that if there is anyone how doesn't want to upgrade for what ever reason, this will still work :)

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

    mjhasbach

    When this plugin is loaded, there is no AntiMobSpawnBlocks file being created in either plugins/ or plugins/AntiMobSpawn/.

    CB766.
     
  20. Yeah, I'm going to sort that in the next update, at the moment it creates the file in the same directory as the craftbukkit jar file.
     
  21. Offline

    crispae

    Hey Sam, Have you tested your plugin in 1.6 with the nether enabled? My use for the plugin will be to stop zombie pigmen spawning on cobblestone, stone (or any 'normal' world blocks). I tried another plugin, NoSpawn, which created a separate, multi-world setup.
     
  22. No, I haven't tested the plugin is the new version, yet. I am hoping to bring out the update to this plugin in a few days, so it will get tested while that is being developed :)
     
  23. Sorry for the delay in the update. I've recently started my Highers at school and haven't had much time to work on the plugin. The school holidays are soon, so I will definitely have the updates out within a fortnight :)
     
  24. The update for this plugin will be out very soon. I am so very sorry for the massive delay there has been. I just need to finish a few things off then I will be able to post the updated version here :)

    Finally, released Version 2.0! This brings a new properties file! Multiworld support! And settings for creature types to be stopped! Now to get to work on the area selection stuff...

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

    bk1138

    School must come first, so no worries from me :)

    Is the update for b953 and MC 1.7.2?
     
  26. Yeah, and it adds some new features (see Changelog for details :) )
     
  27. Offline

    spunkiie

    @Sam_Lex

    Can i RELOAD the plugin with a command ? (without restarting the server or using /reload)
     
  28. No. To be honest, I hadn't thought of that. I'll add in the next update :)
     
  29. Offline

    spunkiie

    Can't wait.

    Have a 300+ server and this plugin is doing its job very well :D
     
  30. Offline

    ಠ_ಠ

    All mobs still spawn... I dont want hostile mobs spawning... Config:


    Code:
    #Properties File for the Bukkit plugin, AntiMobSpawn
    #Generated at 11:07 PM on Friday, 15 July 2011
    #All selected values MUST be within apostrophes ('')
    
    #Setting to enable multi-world support. If false, all worlds will follow the default world settings
    multi: 'false'
    
    #The default world
    Default:
    #Select whether to block spawns on all block types
        all blocks: 'false'
    #List of blocks to stop spawns on. Each number must be within it's own apostrophes ('') with a single ending apostrophe
        blocks: '18' '46''
    #Select which creatures the plugin should stop from spawning. True to stop them, false not to
        chicken: 'false'
        cow: 'false'
        creeper: 'true'
        ghast: 'true'
        giant: 'true'
        monster: 'true'
        pig: 'false'
        pig zombie: 'true'
        sheep: 'false'
        skeleton: 'true'
        slime: 'true'
        spider: 'true'
        squid: 'false'
        wolf: 'false'
        zombie: 'true'
    
    world:
    #Select whether to block spawns on all block types
        all blocks: 'true'
    #List of blocks to stop spawns on. Each number must be within it's own apostrophes ('') with a single ending apostrophe
        blocks:
    #Select which creatures the plugin should stop from spawning. True to stop them, false not to
        chicken: 'false'
        cow: 'false'
        creeper: 'true'
        ghast: 'true'
        giant: 'true'
        monster: 'true'
        pig: 'false'
        pig zombie: 'true'
        sheep: 'false'
        skeleton: 'true'
        slime: 'true'
        spider: 'true'
        squid: 'false'
        wolf: 'false'
        zombie: 'true'
    
    world_nether:
    #Select whether to block spawns on all block types
        all blocks: 'false'
    #List of blocks to stop spawns on. Each number must be within it's own apostrophes ('') with a single ending apostrophe
        blocks: '18' '46''
    #Select which creatures the plugin should stop from spawning. True to stop them, false not to
        chicken: 'false'
        cow: 'false'
        creeper: 'true'
        ghast: 'true'
        giant: 'true'
        monster: 'true'
        pig: 'false'
        pig zombie: 'true'
        sheep: 'false'
        skeleton: 'true'
        slime: 'true'
        spider: 'true'
        squid: 'false'
        wolf: 'false'
        zombie: 'true'
    
    Help?
     

Share This Page