Inactive [MECH] CivilizedSpawn v1.0 - Keep monsters out of civilized areas! [1185]

Discussion in 'Inactive/Unsupported Plugins' started by sluvine, Mar 12, 2011.

  1. Offline

    sluvine

    CivilizedSpawn - An elegant spawn plugin, for a more civilized age...
    Version: 1.0
    The original plugin for controlling where evil mobs spawn. Now with more configuration!!!
    Downloads

    First and foremost, I'd like to thank ShadowOfLegends, a good friend of mine, without whom this plugin wouldn't exist. I had forgotten just about everything about java and knew nothing about bukkit api until he helped me through it :)

    My players and I didn't like the thought of having to put down giant torch grids to keep monsters away. It looks bad and it isn't even foolproof - mobs still spawn on top of trees since the light doesn't reach the top of the leaves. This plugin forces monsters (and only monsters, animals aren't affected) to check their surroundings before spawning. If any "man-made" blocks are found within a given radius, the spawn is cancelled and they move along to the next potential spawn.

    This allows monsters to spawn outside of "civilized" areas such as cities or well-developed mines, but natural caves, mob spawner dungeons, and the general "wilderness" should be unaffected.

    How It Works:
    1. As long as ignore_animals is set to true, this plugin will not affect the spawning of friendly mobs.
    2. Checks if there is a mob spawner within a 5-block cube of the attempted spawn. If there is, assume spawn is in a dungeon and allow it regardless of surroundings. This feature is now optional (allow_dungeon_spawn) and defaults to true.
    3. Checks the level at the spawn and the level directly beneath it(so mobs can spawn under trees but not on them) in a 5-block radius for LEAVES blocks. If there are at least 4 of them, assume spawn is on top of a tree and cancel it. This feature is now configurable (allow_treetop_spawn) and defaults to false. The number of leaves to check for is also configurable now (minimum_leaves) and defaults to 4.
    4. In order to allow mobs to spawn in abandoned mine shafts, I included an optional feature (ignore_near_cobwebs) that checks for a number of cobwebs (cobweb_limit). If enough are found, then the plugin is ignored in this area.
    5. The best solution I could come up with for allowing mobs to spawn in strongholds was placing check for the height (Y-level) of the spawn point that causes the plugin to ignore spawns below a certain level. This defaults to 55 and is configurable (ignore_below). 55 seemed like a good starting value since sea-level in-game is 63, but there are occasionally above-ground surfaces that are below sea-level but not covered by water.
    6. Once all these checks are passed, the plugin functions by checking a cubic area (block_check_radius, block_check_height). The radius defaults to 15 and the height defaults to 5, so the full area checked is a 31x31x11 cube (including the block at the spawn point being checked). The plugin looks for man-made blocks in this area. The man made blocks are now configurable in a list (detect_block_types).
    7. If Structure Detection is enabled (use_structure_detection), then if the plugin finds a man-made block in the first check, it performs a second check on a smaller area. (struct_detect_radius, struct_detect_height). This configurable value defaults to a radius of 5 and a height of 2, for a total area of 11x11x5 (including the block at the spawn point being checked). If enough blocks are found in this smaller area (struct_detect_threshold, defaults to 3), then the first block is counted in the total. If enough of these "structures" are detected (block_check_threshold, defaults to 10), then the spawn is cancelled.
    8. If Structure Detection is not enable, then the original 31x31x11 check is the only one that occurs. If enough blocks are found (uses block_check_threshold) then the spawn is cancelled.
    9. As of v0.8, the plugin also tracks the total man-made blocks found by the first search (the 31x31x11) area. In order to increase accuracy and decrease the load that having a larger search radius caused, if at least 500 blocks in that area are man-made, the spawn is cancelled. It seems like a lot, but it's only 5% of the total blocks, and I found this to be the optimal number. The value is configurable (hard_cancel_threshold).
    Known Issues:
    • This tends to interfere with above-ground mob grinders since it cancels spawning near man-made blocks. If you make your grinder out of natural blocks, you shouldn't have an issue.
    • Buildings made from smooth stone (the type that occurs naturally) and or sandstone will not be detected by the plugin. This doesn't necessarily mean monsters will spawn there, however. If there are other blocks that the plugin does detect in the area, or a high enough light level, then monsters will not spawn. I am working on a way for the plugin to determine the difference between natural stone and player-placed stone without having to resort to the use of a database.
    Installation:
    Go to the Downloads link above, then pick the version you want to download. The newest stable version is the latest one that I've tested and deemed usable. The older versions are usable too, but might not have some of the newer features. Once you've downloaded the file, simply throw the .jar in your plugins folder! After you run your server for the first time, the CivilizedSpawn folder will generate with the default config.yml inside.

    Configuration:
    Show Spoiler

    Below is the default config.yml with explanations of each variable:
    Code:
    #
    block_check_threshold: 10
    #If use_structure_detection is true, this is the number of man-made block clusters that must be found
    #If use_structure_detection is false, this is the total number of blocks that must be found
    
    ignore_animals: true
    #This determines whether or not the plugin affects animal spawns
    
    struct_detect_radius: 5
    #This is the search radius used by Structure Detection, if enabled
    
    struct_detect_height: 2
     #This is the search height used by Structure Detection, if enabled
    
    hard_cancel_threshold: 500
    #If at least this many blocks are found in the search, the spawn is cancelled
    
    ignore_below: 55
    #The plugin doesn't cancel any spawns lower than this number (use F3 to check the Y values of your town's ground and make sure this number is at least 1 less than the lowest point). It is not recommended to set this higher than 63 (sea level).
    
    cobweb_limit: 1
    #If ignore_near_cobwebs is enabled, this is the number of cobwebs that must be found for the plugin to allow a spawn near man-made blocks
    
    allow_treetop_spawn: false
    #This determines whether or not to allow mobs to spawn on top of trees
    
    block_check_radius: 15
    #This is the search radius of the general search made by the plugin
    
    ignore_near_cobwebs: true
    #If enabled, the plugin will allow mobs to spawn near cobwebs since this is an indicator that the spawn is in an abandoned mineshaft
    
    block_check_height: 5
    #This is the search height of the general search made by the plugin
    
    minimum_leaves: 4
    #This is the smallest amount of leaves that must be present for the treetop spawn canceller to activate
    
    use_structure_detection: true
    #If enabled, the plugin makes a second check around each man-made block that it finds to look for other man-made blocks around it. This prevents players exploiting the plugin by randomly placing man-made blocks to prevent spawns.
    
    struct_detect_threshold: 3
    #When Structure Detection is on, Structure Detection must find at least this many blocks around the first one detected for it to count towards the block_check_threshold
    
    allow_dungeon_spawn: true
    #This allows mobs to spawn near mob spawners
    
    
    #These are the block types that the plugin will search for. Putting things like DIRT, SAND, GRAVEL, or STONE in this list will likely eliminate a lot of spawns that you didn't mean to eliminate. These values must match the names of the materials in the Materials ENUM and can be found here: [URL]http://jd.bukkit.org/apidocs/org/bukkit/Material.html[/URL]
    detect_block_types:
    - WOOD
    - COBBLESTONE
    - DIAMOND_BLOCK
    - BRICK
    - FENCE
    - GOLD_BLOCK
    - IRON_BLOCK
    - LAPIS_BLOCK
    - SNOW_BLOCK
    - COBBLESTONE_STAIRS
    - WOOD_STAIRS
    - WOODEN_DOOR
    - IRON_DOOR
    - STEP
    - DOUBLE_STEP
    - WOOL
    - BED_BLOCK
    - CHEST
    - FENCE_GATE
    - MOSSY_COBBLESTONE
    - SMOOTH_BRICK
    - SMOOTH_STAIRS
    - THIN_GLASS
    - TRAP_DOOR


    Changelog:
    Show Spoiler

    • 1.0
      • Made everything configurable!
      • Updated the plugin to function with new Adventure Update mobs and block types.
      • Added a height limit for the plugin to help keep strongholds populated with mobs.
      • Added cobweb detection to keep abandoned mine shafts populated with evil blue spiders.
      • Did I mention, it's CONFIGURABLE?!
    • 0.8
      • Fixed stupid bugginess by optimizing the search for structures
      • Implemented a combined threshold for proper spawns so that a creature still doesn't spawn in a bare patch in between large buildings like before. However, spaces wider than a 20*20*5 block tetrahedron without man-made blocks will still allow spawns. Build a road or a fountain or something else that looks pretty in the empty space if you're having problems in your towns.
      • Started cleaning things up to make just about every aspect of the plugin end-user customizable. v1.0 should be coming soon with full customization.
    • 0.7.4
      • Actually added wool to the list of materials (I forgot last time >.<)
      • Worked out some bugs with structure detection and increased the search radius to reflect the higher level of specificity required to find structures. The radius was too small once I moved from the 0.5 system to the 0.7 system. I doubled it and the plugin is now working as effectively on my test server as it was with 0.5.2.
      • Made the plugin insanely buggy and laggy! Don't use this one unless FPS over 2 makes you cry.
    • 0.7
      • Added wool, both types of stairs/slabs/doors to the check for structures
      • Improved the structure detection algorithm to check for adjacent blocks rather than just a disorganized group
    • 0.5.2
      • CivilizedSpawn submitted for release on Bukkit forums!
      • fixed empty dungeons due to cobblestone (stops the search if a mob spawner is found nearby) (Verified that this works! Yay! :))
      • changed the way detection works
        • instead of cancelling as soon as a man-made block is found, increments a counter and if that counter exceeds a given level, then cancel.
        • the idea being that the plugin should look for structures, not single blocks.
        • still very open to any suggestions on better methods
      • adjusted search radiuses again
      • started adjusting code to make things configurable
    • 0.5.1
      • added additional check to keep monsters from spawning on trees (this annoyed me, but it'll be able to be turned off once this is configurable)
      • cleaned up extra code
      • commented the code to increase readability
    • 0.5
      • Plugin begins testing!
      • set up basic detection capability

    Todo list:
    Show Spoiler

    • High Priority: Possibly add a specific checks for adjacent blocks instead of just a total number of blocks in a range (to decrease detection of randomly scattered cobbles and focus on structure detection)
    • Find a dungeon on our server to make sure they're working again as of 0.5.2
    • Upload source code for other folks to look at I'll do this if someone requests it...
    • High Priority: Make block types, search radius, allow_tree_spawn true/false, structure_detection true/false, etc. all configurable
    • Look into possible tie-in with World Guard Regions (ability to set no-hostile-spawn zones, no-neutral-spawn zones, and no-any-spawn zones) for larger pop. servers as this will reduce the performance impact
    • Make structure detection work on a separate counter from the search counter.
    • Add slabs, doors, stairs, and wool to the check
    • Any other good ideas that come along!
     
    Pisi-Deff, Digi and Maxwolf Goodliffe like this.
  2. Offline

    mbandit

    I really hope this gets fixed soon, this is one of the plugins that really hurts to not have.
     
  3. Offline

    Tory

    pls fixed <3

    [617]
     
  4. Offline

    Zarius

    Great plugin! Look forward to an update for new CB build.
     
  5. Offline

    Xanadar

  6. Offline

    CHIKINS!!!

    Can you update this to craftbukkit 617?
     
  7. Offline

    killj0y

    Does this work for animals? Say can this keep sheep pigs cows and chickens from spawning in my spawn area?
     
  8. Offline

    Plague

    considered inactive
     
  9. Offline

    sluvine

    Hey guys, I'm really sorry I vanished for so long. Changed jobs and things got a little crazy, but have settled down a bit now and I am going to return to the world of minecraft developing. Give me a few days to get this plugin up to code and hopefully people will still use it!
     
  10. Offline

    sluvine

    I can confirm that this is working with 1060 and I am now developing again... any chance I can get this moved back out of inactive?
     
  11. Offline

    sluvine

    Nearly finished with the next update of this mod... will be taking care of a few of the major issues. After this update, the only real hurdle left will be WorldGuard integration!

    Thanks for your patience, guys. It's so awesome that people are still downloading this even after it was inactive for so long.

    Please let me know if anyone is having issues!
     
  12. Offline

    sluvine

    Hey guys, quick update: I'm nearly done with the config stuff, work has been crazy lately so progress has been slow. I've decided not to release it though until after the next Craftbukkit build is released for MC 1.8 since I'll have to include endermen, poison spiders, smooth stone brick, glass panes, etc., etc. It's going to be a pain but I'm really excited for 1.8 like everyone else so if I am a bit slow in updating, it's because I'm playing 1.8 lol.

    Also, there is no reason for me to believe that 1.8 will be broken by the current version of this plugin unless they changed the way that the monsters spawn. The only downside will be that the new blocks will not trigger the plugin to stop spawning and that the new mobs will not check with the plugin while spawning.
     
  13. Offline

    sluvine

    VERSION 1.0 RELEASED FOR MINECRAFT 1.8/CB 1118!
    • 1.0
      • Made everything configurable!
      • Updated the plugin to function with new Adventure Update mobs and block types.
      • Added a height limit for the plugin to help keep strongholds populated with mobs.
      • Added cobweb detection to keep abandoned mine shafts populated with evil blue spiders.
      • Did I mention, it's CONFIGURABLE?!

    Not sure if you've moved on yet, but the whole plugin is now configurable, so you'd be able to tweak the settings yourself to see what works for your server!

    It is now updated! Let me know if it qualifies as interesting now :p

    This is now an option, just change ignore_animals to false in your config :)

    See above post!

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

    sintri

    Using NoCivilSpawns atm, so if that doesn't work for 1.8 and doesn't get updated, will see. But yes, do place plugins like these as pretty high importance, specially for those who'd rather not torch the entire city just to prevent spawning. At either rate, ncie to see you'e updated.
     
  15. Offline

    sluvine

    It looks like there are messages from early August on the plugin's forum page that have yet to be addressed by the developer, so I would say that unless that changes soon, it's unlikely that it will be updated to include entity spawn events for the new mobs or new block types that will need to be checked for.

    Of course, it's also possible that the dev is just waiting for a recommended build for 1.8.1 to be released. I had my players on my back to convert to 1.8.1, so I went ahead and updated based on build 1118 since that was what was available at the time and the bugs that were present didn't seem to be related to spawn events, which is really the only hook that this plugin uses, so I figured it was stable enough for my purposes.
     
  16. Offline

    sluvine

    Updated for RB 1185. Will add Bukkit Dev page soon.
     
  17. Offline

    Ounitron

    I attempted to use this plugin tonight (Ver. 1185 bukkit), as downloaded, and it did nothing as near as i can tell. I have a large city build almost exclusively of cobblestone (litterally thousands of blocks) and there were mobs everywhere the lighting wouldn't have prevented them. I can give you my list of running plugins, but the old Civspawns mod (no longer supported) still works correctly in my current configuration. Is there any option in the config that needed to be edited to activate this, or perhaps some other common conflict that would disable it?
     
  18. Offline

    atrayan

    Hey, I am interested in seeing the code for this, if you don't mind uploading it.
     
  19. Offline

    sluvine

    I will definitely look into this, I'm not sure what plugins could possibly interfere this, unless they affect the way that bukkit spawns monsters... What else are you running? I can confirm that it's working on my server, if you have a large city that's giving you trouble maybe try increasing the search radius and or height, just not by too much though so as to not overload the server with material type checks.

    When I get some free time, I'll set up a github :)
     
  20. Offline

    w4ssup

    dude make a instruction on how to use this...
     
  21. Offline

    sluvine

    Is the original post not sufficient?
     
  22. Offline

    w4ssup

    nope sorry
     
  23. Offline

    Ounitron

    Tried changing the search parameters, as well as turning off structure detection altogether and trying to get it to simply defend cobblestone wherever it was found, to no avail.
    Running the following mods:
    Authplayer
    Choptree
    Citizens
    Essentials
    GameModeChanger
    MobArena
    ModDamage * currently outdated, but still functional
    NoIce
    NoWeather
    PermissionsBukkit 1.2
    Pickboat
    PlgRailBoost
    PorteCoulissante
    Retractable Bridge
    Spamage
    SuperpermsBridge
    WorldEdit
    XcraftGate
    And example: Creeper, on cobblestone, where he couldn't have just wandered in.
    Creeper.jpg
     
  24. Offline

    sluvine

    Sad day :(

    I will do some research on those other plugins to see if one would interfere. Could you also post your config file for my plugin? I don't think it is something there but it is possible.


    I'll work on a more simplified list of instructions :)
     
  25. Offline

    Ounitron

    the pic above was taken with the default, as it is created by the plugin at startup. Additionally tried the following vaules as a whole
    block_check_threshold: 1
    ...
    block_check_radius: 20
    use_structure_detection: false
    all other values were at default. Result was the same. i'd upload it, but i already reset it to default in an attempt to re-install it.
     
  26. Offline

    SayWhat1

    I'm having the same problem as Ounitron. Though, my town is at y=12, but I set the ignore_below to 0. They all like to spawn on top of my cobble buildings.

    My plugins are:
    CivilizedSpawn
    Dynmap
    eMob
    HeroicDeath
    LavaFurnace
    MagicSpells
    mcMMO
    MineBackup
    Mineral Vein
    MobArena
    SpawnControl
    Spout
    Stargate

    They're all the latest version, running CB 1185.

    Here's my current config:
    Code:
    #Check this plugin's Bukkit page for details on config variables!
    block_check_threshold: 5
    ignore_animals: true
    struct_detect_radius: 5
    struct_detect_height: 4
    hard_cancel_threshold: 500
    ignore_below: 0
    cobweb_limit: 1
    detect_block_types:
    - WOOD
    - COBBLESTONE
    - DIAMOND_BLOCK
    - BRICK
    - FENCE
    - GOLD_BLOCK
    - IRON_BLOCK
    - LAPIS_BLOCK
    - SNOW_BLOCK
    - COBBLESTONE_STAIRS
    - WOOD_STAIRS
    - WOODEN_DOOR
    - IRON_DOOR
    - STEP
    - DOUBLE_STEP
    - WOOL
    - BED_BLOCK
    - CHEST
    - FENCE_GATE
    - MOSSY_COBBLESTONE
    - SMOOTH_BRICK
    - SMOOTH_STAIRS
    - THIN_GLASS
    - TRAP_DOOR
    allow_treetop_spawn: false
    block_check_radius: 20
    ignore_near_cobwebs: true
    block_check_height: 7
    minimum_leaves: 4
    use_structure_detection: false
    struct_detect_threshold: 3
    allow_dungeon_spawn: true
    
    <EDIT> I tried it without MobArena because Ounitron and I had that one in common, but it didn't help. I also tried it without eMob, which lets you disable certain monsters from spawning at all, but there was no change.
     
  27. Offline

    sluvine

    @SayWhat1 @Ounitron

    It seems like the common theme here is that they are spawning on top of cobblestone buildings... or are they doing it elsewhere as well?
     
  28. Offline

    SayWhat1

    They're also spawning inside another building, but two sides of it are smooth stone so I figured that was causing problems. Also in a fenced off 14x12 dirt patch.

    That's not to say they're aren't also spawning randomly around, but most of them spawn in those two places.
     
  29. Offline

    Ounitron

    While i didn't acutely scrutinize it, i had spawns all over the place, including near wood and half blocks. I cannot, however be certain that all of those instances were not wandering mobs. One note, i had a floating island near sky-cap that is essentially a shelf of cobblestone covered with dirt and trees that had no spawns whatsoever on it.
     
  30. Offline

    Paul_VB

    this looks like this could be a perfect plugin for my server, however i cant sem to get it to work right. i have a bunch of emptly lots, there all 14x14 and have double step blocks on the edges with grass in the middle. i intalled this pugin but monsters still spawn on the lots. my config is this

    #Check this plugin's Bukkit page for details on config variables!
    block_check_threshold: 1
    ignore_animals: true
    struct_detect_radius: 15
    struct_detect_height: 4
    hard_cancel_threshold: 1
    ignore_below: 55
    cobweb_limit: 1
    detect_block_types:
    - WOOD
    - COBBLESTONE
    - DIAMOND_BLOCK
    - BRICK
    - FENCE
    - GOLD_BLOCK
    - IRON_BLOCK
    - LAPIS_BLOCK
    - SNOW_BLOCK
    - COBBLESTONE_STAIRS
    - WOOD_STAIRS
    - WOODEN_DOOR
    - IRON_DOOR
    - STEP
    - DOUBLE_STEP
    - WOOL
    - BED_BLOCK
    - CHEST
    - FENCE_GATE
    - MOSSY_COBBLESTONE
    - SMOOTH_BRICK
    - SMOOTH_STAIRS
    - THIN_GLASS
    - TRAP_DOOR
    allow_treetop_spawn: false
    block_check_radius: 25
    ignore_near_cobwebs: true
    block_check_height: 10
    minimum_leaves: 4
    use_structure_detection: false
    struct_detect_threshold: 1
    allow_dungeon_spawn: true

    am i doing somethign wrong here ? :/
     
  31. Offline

    Paul_VB

    yeah this plugin really does nothing for me at the moment. could u please fix it id realoly like this for my server

    actually it laggs my server also :/

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

Share This Page