[INACTIVE] NoCivilSpawns v1.4.7 - allow/deny mob spawns in areas + world specific opts +whitelist

Discussion in 'Inactive/Unsupported Plugins' started by Sleaker, Apr 6, 2011.

  1. Offline

    Sleaker

    NoCivilSpawns:
    Version: v1.4.7
    Cancels spawning of creatures on trees, or inside player-made areas like CivilizedSpawns.

    WARNING: Because of Minecraft's Architecture and how it creates entity spawns, this plugin is highly discouraged for Production-Level servers and those which regularly run more than 15 users online at a time. Using NoCivilSpawns on high pop servers will most likely result in massive Tic degradation and an unstable server. You have been warned.

    Download: See Warning!
    Source Code
    Install:
    Download the NoCivilSpawns.jar and place it in your /plugins/ directory.

    See source code page for the readme on configuration options​
     
  2. Offline

    Xanadar

    :D THANK YOU!

    Note: Looking for the .jar, I see only the folders and files you edited.
     
  3. Offline

    Sleaker

    It was working only as a Save-Link-As. I changed to a dropbox link now so it should auto-download when you click the link instead.
     
  4. Offline

    Xanadar

    Ah! Rock on, thanks. :)
     
  5. Offline

    sintri

    Was gonna say doesn't work, but apparently the list didn't include glass, planks, or chests. Haven't had much problems with mobs spawning near cobble since most of those are lit up properly.
     
  6. Offline

    Sleaker

    Fixed that, added those block IDs the the blacklist.
     
  7. Offline

    sintri

    Seems working without any issues atm, plus haven't crashed yet so that's a good thing lol.
     
  8. Offline

    rhadiem

    Nice thanks for the fork!

    Could you add an option for say 50x50 or even 100x100 for player blocks, or would that be too laggy? Perhaps just 1 block type at that range? (say a gold block?) that we can bury for more rural areas we don't want spawns?

    Also, I'd like the option of not having critters spawn in a larger area also, to keep those pesky pigs out of my royal garden! haha

    Perhaps even make no monsters around diamond blocks, and no critters around gold blocks for 100 x 100 x 10 units? I imagine that would be better on cpu than doing a huge player block tally for that area.
     
  9. Offline

    Sleaker

    Each iteration of blocks makes the search exponentially longer. going from a 21x21x5 to a 23x23x5 is 450 more blocks (20% increase). attempting to go higher and higher will most likely end up killing your server as the function is called per spawn..
    A 50x50x5 area is 5.5 times larger than the current 21x21x5, and the 100x100x10 is 45 times larger.
    So expanding the selection (regardless of the number of blocks you look for) increases search time. The testing of each block is the same regardless of the array size (It uses a hashset). so smaller arrays take just as long as larger ones.
     
  10. Offline

    Lodran

    @Sleaker, the spawn area for a mob spawner is a 9x9x3 box centered on the spawner.
     
  11. Offline

    Sleaker

    @Lodran, ah thanks for the tip. I'll fix the initial area check.
     
  12. Offline

    nala3

    could you make so if it finds even a single diamond iron or gold block in that radius it will also see it as a player-made place?
     
  13. Offline

    Sleaker

    I'm adding some configuration options in the next version along with a quick find option that checks a 1 block radius for 1 block off a smaller list (different than the iron). I'll add an option to cancel the spawn if it finds a gold/daimond/iron block in the long check.
     
  14. Offline

    rhadiem

    Sounds great. I'd love to include no creatures as an option for that also. Thanks for doing this! (and yeah I get your point about exponentially longer time for those big areas, wasn't sure how it was done)

    Edit: I see you already plan this.. thanks! I forsee this mod being quite useful indeed.
     
  15. Hey, love the Idea. But I have one feature request: Could you implement a function for an exemption block?
    We have a really big mob spawner running on our server. Of course this wouldn't work anymore, because its made of cobblestone, glass, stairs etc. So if we could define a blocktype, which, if detected, disables the spawn-check, that would be great for such situations. It could be a Diamond Block or anything else we would put in a config file. I think that's an easy and simple solution for mobspawners. Given that it won't increase the server load to much.
     
  16. Offline

    Sleaker

    mobspawner detection is already in... since a mob spawner is a block type the plugin detects if there is a mob spawner nearby. Do you use a non-mobspawner block to add mobs to the game or something?
     
  17. No, sorry, I didn't mean a mobspawner as a block, but a building with spawn-floors and a trap in the middle.
     
  18. Offline

    haldavid

    Is there any way to add exemptions? I have an adoption center (WolfPound plugin) and it doesn't work to spawn friendly wolves in town.

    I don't want to just throw a diamond block down, because then bad mobs could spawn around the building in town.

    Great mod though.
     
  19. Offline

    Sleaker

    Hald, that's a good idea. I'll work on adding a creature whitelist to the config
     
  20. Offline

    haldavid

    Yay, thanks.
     
  21. Offline

    JDD

    Sleaker, as I said previously in sluvine's plugin civilizedspawn.

    Civilizedspawn would not work for me I tried. We have 5 of these castles and they are quite large and important hubs for our players. Any thoughts?
     
  22. Offline

    Sleaker

    the issue is that these are naturally occuring, and it would pretty much destroy world spawning if I attempted to add any kind of block detection for those blocks. What it can do is detect a goldblock in a 21 block area. If you placed a gold block below your streets (if the street is 1 block thick) every 20 blocks it should disable any spawning.

    The other option is to use residence (though I'm waiting till 2.0 comes out to put it back into my world because of config errors) and disable monsters inside the 'town' area.
     
  23. Offline

    Soryo

    is it possible to make the config file a little easier to read? If the format can't be changed, can you put an example in the file? I realize that you have an example above, but the format is different so I'm not sure how to change it exactly. Whitlisting animals and such.

    Maybe it's just mine, but the formatting for the config file is just one long continuous line... sorry, I'm bad with these things... I'm not very good with computers :(
     
  24. Offline

    Sleaker

    if you're on windows don't use Notepad to edit the configuration file, get Notepad++ . notepad has a nasty habit of stripping line breaks on certain file encodings. If you're not getting a neat file format like my example above, then switch to a different editor.

    The Configuration file is standard for Bukkit plugins and uses the built in configuration manager for it. Changing it to something different would require a lot more work, and if you're running a server you really *should* learn to use the .yml configuration style as most plugins use it.
     
  25. Offline

    haldavid

    No joy still. Using the 1.3.1 NoCivilSpawns, I still can't get a wolf to spawn in town with WolfPound (http://forums.bukkit.org/threads/fun-wolfpound-v0-9-adopt-a-wolf-today-612.10755/)

    If I walk 21 blocks outside of town, I can spawn wolves.

    I added the whitelisting exactly like your example config:

    Code:
    goldblocker: false
    quicktest: false
    daimondenabler: false
    whitelist:
        - WOLF
    (Btw daimond is a typo for diamond)
     
  26. Offline

    Sleaker

    Ah thanks, thought I had corrected all the typos. I think I tracked down the problem, was trying to compare CreatureType with a String, fix should be up in a few minutes.

    @haldavid - alright should be working now, let me know if it is still denying them.

    EDIT: ah realized the first 'fix' wasn't right - detection should be "Wolf" now not all uppercase.
     
  27. Offline

    haldavid

    Got it working with this config:

    Code:
    whitelistmobs:
        - WOLF
        - Wolf
    goldblocker: false
    quicktest: false
    diamondenabler: false
    monstersonly: true
    blacklistmobs: null
    Wasn't sure if it was supposed to be caps or not, so I did both, haha.

    On a side note, even with "monstersonly:true," it still doesn't spawn normal animals in town unless specifically whitelisted.

    Thanks for the fast updates!
     
  28. Offline

    Sleaker

    hmm. But it works with the whitelisting now?
     
  29. Offline

    haldavid

    I was able to spawn a wolf using the /adopt command and my players were able to spawn wolves at the sign store provided by that plugin.
     
  30. Offline

    Soryo

    thanks sooo much! this notepad++ is awesome!
    also.... I thought there was more to the config file for some reason.... haha.... but now that I'm not 80% asleep my brain is working a LITTLE better. But my muddled mind remembers there being a looong line in the config file... which was confusing me. I think it's cause i was exploring the permissions as well....

    Anyway, thanks for the tip about notepad! I love it
     

Share This Page