Inactive [MECH] MobRepellent v0.7.2 - Build a structure that stops mobs from spawning in an area [1.2.3-R0.2]

Discussion in 'Inactive/Unsupported Plugins' started by WillPall, Aug 27, 2011.

  1. Offline

    WillPall

    MobRepellent allows players to construct "repellers" that will prevent hostile mobs from spawning within a certain distance. This is useful for cities and other settlements where mass amounts of torches are not aesthetically pleasing and cannot guarantee that mobs won't spawn.
    Get it!

    Download v0.7.2 for CB-1.2.3-R0.2 - Source (github)
    Download the sample config.yml file (place it in your plugins/MobRepellent directory)

    How do I use MobRepellent?

    Simply drag the MobRepellent plugin .jar file into your Bukkit /plugins directory. MobRepellent will automatically create all the necessary files.
    Once the plugin is loaded, to create a repeller you'll need 7 iron, gold, or diamond blocks. First, using five blocks, construct a shape that looks like a plus sign (+) parallel with the ground. Next, place the remaining two blocks directly above the block in the center of the plus sign. See these:
    How to Construct the Base
    [​IMG]
    Completed Structure
    [​IMG]
    After the repeller is constructed, no hostile mobs will spawn within a cuboid radius of the base of the repeller. For instance, if the radius is 50 blocks, it will repel in a 100x100x100 cube centered at the base of the repeller. Neutral mobs are not blocked by default, but this can be configured in the config.yml. MobRepellent does not affect mob spawners, hostile nor passive. To remove the repeller, simply remove one of the blocks that is part of the repeller.
    Default repeller types and radii:
    • Small - Iron block - 20 block radius
    • Medium - Gold block - 30 block radius
    • Large - Diamond block - 50 block radius
    Console and Admin Commands

    All console commands default to OP-only.
    /mrlist - Lists all currently loaded repellers
    /mrreload - Reloads the configuration file
    /mrremove [repellerNumber] - Removes the selected number
    as found in the list given by /mrlist. Does
    not remove the repeller structure.
    /mrremoveall - Removes all currently loaded repellers. Does
    not remove the repeller structure.

    Permissions

    MobRepellent now contains support for Bukkit permissions. Using a plugin such as PermissionsBukkit will allow you to take full advantage of the new functionality.
    mobrepellent.* - Access to all permissions

    mobrepellent.list
    Default: OP-only
    Allows use of /mrlist command

    mobrepellent.reload
    Default: OP-only
    Allows use of /mrreload command

    mobrepellent.remove
    Default: OP-only
    Allows use of /mrremove command

    mobrepellent.removeall
    Default: OP-only
    Allows use of /mrremoveall command

    mobrepellent.create
    Default: all players
    Allows player to create a repeller

    mobrepellent.destroy
    Default: all players
    Allows player to destroy a repeller

    Configuring MobRepellent

    You can configure MobRepellent to use almost any block type instead of the default blocks. You can also configure MobRepellent to use any radius to repel mobs, and select which mobs to repel and which to ignore.. On the first run of the plugin, MobRepellent will automatically create a config.yml file with the default values. See this sample config.yml file for more information.
    Todo list

    • Custom repeller shapes (admin defined structures)
    • Possibly add visual cue that repeller is working. Possibly with the top block on fire (as suggested by darklust ). This will be configurable and probably default to off.
    • Possibly add configuration option to make repellers require fuel.
    Known Issues

    • TNT and creeper explosions can destroy repeller structures without destroying the actual repeller functionality
    • Permissions allow players to "construct" an inactive repeller, but not destroy it
    Changelog

    Version 0.7.2
    • Added configuration option to allow spawning below a repeller, regardless of its radius
    Version 0.7.1
    • Configuration files are now fully functional, although the format has changed (old format config files will automatically update to the new format). See the sample config.yml on GitHub for more info.
    • Reloading config file while in-game is now fixed
    • Damage values for blocks (e.g. orange wool) now works using '@' in the config file
    • Many fixes to spawn-blocking (squid, villagers, golems, snowmen, spawner eggs, etc)
    Version 0.7.0
    • Basic functionality restored for CraftBukkit 1.2.3-R0.2 (#2060)
    • Removed glowstone from restricted blocks, added mycelium, end stone
    • Introduced small configuration file bugs (must stop server, edit file, restart server for changes to take effect)
    • Introduced (re-introduced?) bug with squid being blocked from spawning, regardless of configuration options
    For previous versions, see the README file.

    Notify me of any bugs or suggestions you have. I'd like to make this as useful as possible.
     
    columb, mps1969 and FuturaEX like this.
  2. Offline

    Demon Boy

    Ok thanks for the replies
     
  3. Offline

    WillPall

    New version 0.4!

    This new version adds multiple repeller types (defaults to iron, gold, and diamond with radius 20, 30, and 50 respectively). It also adds support for neutral mob repelling (defaults to false), and a chat notification on successful creation and destruction of a repeller.

    For those using previous versions: The config file and your existing repellers should automatically update. The 'block_id' and 'radius' values that are currently in your config file will become the 'large_id' and 'large_radius' values. However, I highly recommend downloading the sample config.yml. It contains a lot of important information.

    Changelog
    • Added support for multiple repeller types with different radii
    • Added option to also repel neutral mobs (default: false)
    • Added notification when creating or destroying a repeller
    And now, for a status update on 1.8. I've tested the newest version (0.4) on the most recent experimental build (1163). I've had no problems with it working for 1.8, but I wouldn't be surprised if new Bukkit builds break the functionality, so use at your own risk.

    As always, there are probably bugs (although I try to test as thoroughly as possible). Tell me about them and I'll get it fixed ASAP.
     
  4. Offline

    Kinkajou

    I haven't gotten your plugin yet mainly because my server is down until the next Bukkit update. But would there be a way to possibly allow/disallow neutral mobs for each specific size of repeller, and also a way to repel only certain mobs from the repeller (IE no Endermen and Squid, but everything else is fine).

    And a random question, would this prevent me from spawning chickens by throwing eggs?
     
  5. Offline

    WillPall

    It would be possible to do all the things you suggest, but I don't really want to bloat the configuration file with tons of options. What are some good reasons to have different repellers do different things with neutral mobs?

    A global option for which mobs to repel does sound like a good idea. Also, I didn't think about eggs. It doesn't allow it right now, but in the next version I'll make sure it allows spawning from an egg.
     
  6. Offline

    Oddgod

    Every time I stop my server and restart it I get the error "Error loading a repeller from the save file. Removing entry."

    The plugin works great at first but having to replace the repellers every server restart is getting frustrating.
     
  7. Offline

    WillPall

    Edit: Before you delete it, could you post the contents of your repellers.list file? I'm trying my best to replicate this bug. The error message you're getting should only show up if one of the entries in the file doesn't match a repeller in the world. If this happens, the rest of the repellers in the file should still load normally.

    ----------------------------

    So it's just not saving? I can't replicate that, but it's possible that a repeller entry is corrupted and it's messing up the whole file. For now, try deleting the MobRepellent/repellers.list file. You'll have to once again reconstruct your repellers (just break one of the blocks and then place it again). Sorry about that problem. Let me know if that doesn't work. I'm going to rework the saving/loading code so that this won't happen again in the future.
     
  8. Offline

    Oddgod

    61,74,477,37361573-7f98-444f-ac00-acf780a53d86
    -24,74,477,37361573-7f98-444f-ac00-acf780a53d86
    127,74,530,37361573-7f98-444f-ac00-acf780a53d86
    128,74,625,37361573-7f98-444f-ac00-acf780a53d86
    -70,74,585,37361573-7f98-444f-ac00-acf780a53d86
    -70,65,510,37361573-7f98-444f-ac00-acf780a53d86
    -431,62,-215,37361573-7f98-444f-ac00-acf780a53d86
    -402,63,-243,37361573-7f98-444f-ac00-acf780a53d86
    18,74,578,37361573-7f98-444f-ac00-acf780a53d86
    -459,59,-252,37361573-7f98-444f-ac00-acf780a53d86
    -448,63,-185,37361573-7f98-444f-ac00-acf780a53d86
    342,70,171,37361573-7f98-444f-ac00-acf780a53d86
    232,63,78,37361573-7f98-444f-ac00-acf780a53d86
    290,60,129,37361573-7f98-444f-ac00-acf780a53d86

    I'm not certain if them being buried has anything to do with it, I have a mix of buried repellers and fountian repellers spread out over several areas.
     
  9. Offline

    WillPall

    Try just putting this in your repellers.list file:

    Code:
    61,74,477
    -24,74,477
    127,74,530
    128,74,625
    -70,74,585
    -70,65,510
    -431,62,-215
    -402,63,-243
    18,74,578
    -459,59,-252
    -448,63,-185
    342,70,171
    232,63,78
    290,60,129
    The plugin will try to find all the repellers and append the correct world IDs. It's possible that with a new Bukkit version they've changed the way that world IDs are generated.

    Are you running v0.4? What version of Bukkit ar you running? Obviously, the repellers are getting saved correctly, but for some reason they aren't loading correctly. When you get the error, are you sure that your repellers stop working? If you're using v0.4 and you restart your server, try breaking a repeller. If it gives you a message like "You've destroyed a repeller" then it is still working. It may just be an erroneous line in your repllers.list.

    Edit: Check out the newest version 0.4.1. If it doesn't fix your problem, it will at least give a more informative error message.

    New Version 0.4.1

    Changelog
    • Possible bug fix for loading/saving repellers (*crosses fingers*)
    • Allow spawning chickens from eggs, even if neutral mobs are blocked

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

    XXXtheGreat

    Y'know what would be cool...? If there was a command to begin defining the shape and blocks of a repeller, and then a command to stop defining, where it would then save what you did. Would add a lot more configurability.
     
    goose1142 likes this.
  11. Offline

    goose1142

    This looks like an awesome plugin, I am planning on using it for players without worldguard permissions, to give it more of a survival feel. I do have a suggestion though, is there anyway you could make it so you could modify the structure? Maybe a command like, /mb build? and any block you place before typing /mb complete would be the structure?

    oh... sorry XXXthegreat, i didn't see your post :/

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

    WillPall

    Yeah, and there's a another post above requesting something like this. I'm looking into ways to customize the repellers, but again, I don't want this plugin to become too bloated.

    Thanks for the suggestions, though. This is definitely something I'd like to do, if possible.
     
  13. Offline

    goose1142

    What about the top of it turning into glowstone? I don't know if thats possible, but it would be cool if it was!
     
  14. Offline

    WillPall

    That was also already suggested. I'm looking into it. Right now my priorities are permissions, admin commands, 1.8, and making sure it's stable.

    I probably will make it configurable to flash back and forth between glowstone and the repeller material or something like that, but that will be in a future update.
     
  15. Offline

    Kinkajou

    One way would be set all three repellers for the same size area (we'll say 100 blocks), the "small" repels only squid so if you have a house with water fountains and flowing stream it can block squid spawns and beached squid in your home. The "medium" would be all hostiles, could be placed in center of a pig/cow/sheep/chicken farm. Then the "large" would block both all passives and hostiles and could be placed in a city with farms for wheat and melons.

    Also something else you may want to do in the future, on the change the way the repeller can be made front since that is a request that has been made a few times, Make it so it can be nothing more than a single block of whatever material with a sign attached indicating it's on/off, and a server command for ops to use with it.
    IE: I place Iron Block in side of mountain. I place sign on Iron Block, top line is [Repel], second and third lines could either be description the admin can put on for players, distance value for how far the effect lasts, or basic on off switches for different mobs, 1's and 0's, a second and third line like "Hostile" "0001" could be code to say Creepers off, Zombies off, Skeletons off, Spiders on. Fourth and final line would be blank. I then use a server command such as "/repel on" and right click the sign, the fourth line now says on and it starts repelling. And then if I wanted to turn it off I could use "/repel off" and right click the sign again.

    Just a rambling thought.
     
  16. Offline

    Oddgod

    Ok so I am currently running v0.4.1 of MobRepellent, I have the latest recommended Bukkit server released today, and upon stopping and restarting the server I received the message.

    [MobRepellent] No repeller was found that matches entry on line 1. Ignoring entry.

    This was repeated for each of the 17 repellers that were active prior to stopping the server.

    When I re-enter the server and break any of the previously constructed repellers I receive no message to the effect of breaking one, I do however receive a message upon replacing that block. I can confirm that they are in fact not working as I watch the Enderman strolling around with a block from one of my structures :p

    It is still saving the locations as

    232,63,78,37361573-7f98-444f-ac00-acf780a53d86

    and deleting the additional digits in the repellers.list file to show

    232,63,78

    didnt help either.

    I have a few other plugins in addition to Mob Repellent running on the server.
    Essentials / Chat and Spawn
    minecart_speedplus
    MyWorlds
    Nanobot
    VoxelSniper
    WStone
    RocketBoots

    And the last bit of information I can think of that might be pertinent is that the repellers are located in one of the worlds created by MyWorlds.

    I hope any of the above information can be helpful to resolving this issue.
     
  17. Offline

    WillPall

    I have a feeling that MyWorlds isn't loading its worlds until after MobRepellent has already been loaded, this keeps MobRepellent from finding the correct world that is reflected in the repellers.list.

    What I've done is added a delay to loading repellers until after all other plugins have been loaded. Try downloading the new version (0.4.2) and see if that works. Hopefully this will solve your problems. If not, let me know. I want to get to the bottom of this :)
     
    Oddgod likes this.
  18. Offline

    Oddgod

    Problem solved! I would most likely never noticed that MobRepellent was loading before the worlds had finished loading but that appears to be the case, thank you for getting to the bottom of this.

    Now the question is do I let you bask in the glory or drop my next problem in your lap? :D


    Ok I gave you 3 blank lines to bask in the glory, so here it is.

    All of the repellers are loading properly, when I break them I am notified that I have broken one, and when I create one I am also notified of that. My config file is set up properly as far as I can tell, and I have tested both with the unmodified range of 50 and a modified range of 100 for the Diamond repellers, yet they don't seem to be working.

    TLDR: I believe that I have everything working properly yet I have monsters climbing all over my repellers.
     
  19. Offline

    Jaiph

    Yeah I'm having problems too :-/ It seemed to be working but after a server restart mobs are back. I've tried deleting everything and starting with fresh files then re-adding the repellers.

    In console it just says....

    "MobRepellent: Finished loading plugin."

    ...and doesn't mention loading any of the actual repellers.

    EDIT: yeah very strange......some repellers seem to work, others not

    --------------
    37,62,222,72359e83-a12b-4a18-85db-f0f60625937e
    140,62,125,72359e83-a12b-4a18-85db-f0f60625937e
    11,116,573,72359e83-a12b-4a18-85db-f0f60625937e
    184,59,269,72359e83-a12b-4a18-85db-f0f60625937e
    50,61,356,72359e83-a12b-4a18-85db-f0f60625937e
    -70,62,304,72359e83-a12b-4a18-85db-f0f60625937e
    -69,83,73,5d6bc581-5894-40ef-b57f-5b73111bc035
    ---------------

    The one at 50,61,356 seems to be working, but not some of the others (eg. 37,62,222 or -70,62,304)

    EDIT 2:
    Removed the one at 37,62,222 and re-added it.....now seems to work (but some others still don't). Wierd.....I dunno....maybe position in file matters since it's now at the end? *scratches head*
    -----------------
    140,62,125,72359e83-a12b-4a18-85db-f0f60625937e
    11,116,573,72359e83-a12b-4a18-85db-f0f60625937e
    184,59,269,72359e83-a12b-4a18-85db-f0f60625937e
    50,61,356,72359e83-a12b-4a18-85db-f0f60625937e
    -70,62,304,72359e83-a12b-4a18-85db-f0f60625937e
    -69,83,73,5d6bc581-5894-40ef-b57f-5b73111bc035
    37,62,222,72359e83-a12b-4a18-85db-f0f60625937e
    -----------------
     
  20. Offline

    WillPall

    @Jaiph: "Finished loading plugin." is the desired output. If it found no repellers, it would have said something like "No repellers were found." Are you running any other plugins that affect spawning of mobs?

    Both:
    Alright, I've been trying and trying (for the past 2 hours) to replicate your bugs, but there are just too many variables to account for. Is this happening with all types of repellers (small, medium, large)? I hate to ask, but you know that contrary to the name of the plugin, these "repellers" really just stop the spawning of mobs. Is it possible the mobs are spawning outside the radius and then wandering near them?

    At any rate, I've added some more debug functionality to the plugin for v0.4.3, and modified a few things that may (but unlikely) fix your problems. If you get the new version, you can add a new value to your config file that will print to the console each time a repeller stops a mob from spawning. The value is [debug_mode: true] . Also, there are new commands /mrlist (lists all loaded repellers) and /mrreload (reloads the config file without having to restart the server).
     
  21. Offline

    Jaiph

    Sweet I'll try 0.4.3 later today.

    To answer your question, they're almost all diamond (large) repellers with a 75 radius. I thought the monsters may have been wandering in but after watching for a while it was clear some were spawning right next to the repeller. Anyway, I'll test the hell out of 0.4.3 and let you know how it goes.

    PS - and thanks for all your work! This plugin has become hugely popular on my server very quickly.
     
  22. Offline

    WillPall

    Thanks for your thanks! I'm sorry that such a major bug is causing so many problems. Stopping mob spawning is the primary function of this plugin, and if that doesn't work it's worthless. Let me know how 0.4.3 works for you and I'll keep looking for alternatives to controlling the spawning.

    Do you have any other plugins that affect mob spawning?
     
  23. Offline

    Jaiph

    I've got creaturebox installed, but that should only affect spawners and wasn't a prob with 0.3.

    Tested 0.4.3 out, it still seems to work intermittently. Some repellers are fine but others just don't seem to kick in now. They are all properly listed when I use /mrlist and reloading/restarting a bunch doesn't seem to help (though at one point I noticed two repellers weren't found in the console so were being ignored, but that only happened once). Anyway, I may just be some strange conflict or be cursed haha - anyone else having any issues with their repellers on 1.8?
     
  24. Offline

    d4m

    Actually, my server just noticed the same this evening, some times they don't seem to work, but its just one here or there. They are in the .list file, /mrlist shows them, etc.

    We got creaturebox in the server as well, no other mob spawn effecting plugins.
    Large repellers with default distance.

    We do have LWC running so it protects the diamond blocks, but we get the message that a repeller was created and it does show in the list and most of them do work, its just a random one seems to break down and you find a gazillion skellys/creepers/zombies dancing around it like a maypole.
     
  25. Offline

    WillPall

    Are you getting any "Repelled ...." messages for the repellers that are letting mobs through? If you are getting those messages, then I'm inclined to think this may be a Bukkit issue.

    CreatureBox shouldn't have any effect. Also, if you're getting the message that it was created LWC shouldn't stop anything from working.


    You guys are saying it's intermittent, which leads me to believe this may be a Bukkit problem. I'm going to continue testing, and look for alternatives to the way the plugin currently works. Again, sorry it's not working as it should.
     
  26. Offline

    d4m

    What do you mean? We get the message that a repeller was created when we put down the top block, are there other msgs we should be seeing as well?
     
  27. Offline

    WillPall

    Sorry, I should have been more clear. If you're running 0.4.3 and you add "debug_mode: true" to your config.yml you'll get a console message each time a mob spawn is repelled. It will tell you which repeller stopped the spawn and the coordinates that the mob was trying to spawn at. If, for instance, you get a message that repeller #1 stopped a mob from spawning, but later see that mobs are still spawning around repeller #1, then I think it might be a Bukkit problem.
     
  28. Offline

    d4m

    Ahh... ok. Lemme turn debugging on and I'll report back. Thanks for the clarification and for this mod.

    EDIT:

    Yep, I get the Repelled msg and mob still spawning on next to that repeller, but its only 2-3 out of the 7 we have that do that.
     
  29. Offline

    Shizzlewacky

    Ounce u have perms a max # per user will be useful
     
  30. Offline

    WillPall

    Alright. I'm going to do some testing and try to force Bukkit to cause the bug that you're seeing. Do you mind giving me a list of all other plugins you're using? I'm going to install those and see if I can cause an error. It's probably something stupid I've overlooked, but if not I'd like to make a bug report to Bukkit.

    This is a great suggestion, and I'll add this as a configuration option once I have permissions working.

    Permissions support is the next feature on my list, but I really want to get these bugs eradicated first.
     
  31. Offline

    w4ssup

    how do i make it so that it only repel monster and not animals
     

Share This Page