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


    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
    Completed Structure
    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.


    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

    Default: OP-only
    Allows use of /mrlist command

    Default: OP-only
    Allows use of /mrreload command

    Default: OP-only
    Allows use of /mrremove command

    Default: OP-only
    Allows use of /mrremoveall command

    Default: all players
    Allows player to create a repeller

    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

    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


    Yeah, that's why I made it configurable. With the default settings I know 63 diamonds is a lot, but the sphere of protection is huge. However, I am looking into various different ways of allowing admins to determine what the repeller structure should be. Thanks for the suggestion!
  3. Offline


    Perhaps the repellers could bring some sort of area protection. For example: they marc a zone so worldguard or izone can use it. The other way could be that they do it themselve. Permissions for editting the zone can be put on a sign on any block of the repeller.
  4. Offline


    It's a cool idea, but not really what I want to do with this plugin. It seems like something better suited to its own plugin, and I feel that WorldGuard and iZone do it just fine. If enough people are interested, I will let the majority rule. However, it is called MobRepellent. I believe the plugin does this well and shouldn't aspire to do much else.

    Maybe I or someone else should develop a "protection tower" plugin?
  5. Offline


    I still had problems with 0.4.4, the mob list entries stopped deleting themselves but it still had the bug where if I went far enough away and came back they wouldn't work. I haven't tried 0.5 yet but by the lack of other comments by others I'm thinking maybe I have some kind of plugin conflict (maybe Spout and chunk caching? I dunno) so I'll do an isolation test on it when I get a chance.
  6. Offline


    Crap, I thought we had fixed this. 0.5 doesn't have any new code that pertains to blocking spawning, so that shouldn't help you much. Sorry.

    So when you come back, do the mobs start spawning as if the repeller wasn't there, or are there already mobs spawned when you arrive?

    I'm just going to reply again in case you would miss an edited post. I've been able to replicate your bug, but I have no idea why it's happening. It's not a plugin conflict, although I'm not sure if thats a good or a bad thing :).

    I'm working on it.

    New Version: 0.5.1

    And another one down
    and another one down
    another bug bites the dust!



    Version 0.5.1
    • Bugfix for mobs being mean and deciding to keep spawning no matter how many times I told them not to (thanks @Jaiph !)

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



    Very happily standing in a completely dark completely safe town :) ran all across the server and came back and it still works fine. Awesome work and thanks for persevering on that bug!
  8. Offline


    Glad your problem is finally fixed! And thank you for sticking around until it was done. Most users would have given up the moment something didn't work.
    cuddleswifkitenz likes this.
  9. Offline


    This is such an awesome plugin. Exactly what I needed for my server. So easy to use!
  10. Offline


    New Version: 0.5.2

    This version provides a somewhat "bugfix", or more a functionality change. This prevents repellers from affecting mob spawners (this one's for you @ampallang ). I feel that a dungeon should always be a challenge, so throwing a couple iron blocks next to one before going in seems like cheating. Also, for servers where passive mobs are scarce, passive mob spawners are massively useful to keep the resources balanced.

    Version 0.5.2
    • Stopped repellers from blocking spawners. One, a repeller makes a dungeon seem like a cake-walk, and also many servers use passive mob spawners to provide resources for players.

    Thanks, glad you like it! Simplicity has always been my goal :). Check out the newest version if you use passive mob spawners or want dungeons to be a challenge regardless of repellers.

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


    Awesome like this change, was just planning a Mob arena and was thinking I'd need to put it away from any repellers - not now! :)
  12. Offline


    Great! And let's hope there are not any bugs with this one, haha. At this point, I'm counting on you. You seem to be able to find all the bugs :D.
  13. Offline


    Out of curiosity, how does the repeller affect mob spawns along the Z-axis? I would like to keep mobs form spawning in my town, but I do not want to stop them from spawning underneath my town in the mines that we are digging. I just wanted to know if this plugin stops mobs spawning within the radius all the way down to bedrock?
  14. Offline


    It's a cube. So if you set your radius to 50 blocks, it will be a 100x100x100 block cube centered at the base of the repeller. Of course, sea level is at 63 (or 64, somewhere around there), so a repeller with radius 50 at sea level will block mobs from level 13 to level 113, which is almost all the layers.
  15. Offline


    Does the Plugin works with PermissionsEX? Member from my server can destroy it but i haven't add the permission to the permissionlist.

    Please Help
  16. Offline


    Look at the permissions section in the original post. Creating and destroying defaults to everyone. You'll have to remove those permissions and add them to be admin only. I'm not familiar with PermissionsEx, but the plugin thread says it is Bukkit Permissions compatible, so you should have no problems.
  17. Offline


    Second problem:

    In the Thread you post it's the version 0.5.2 but in my Server it's show me 0.5.1 is installed.
  18. Offline


    I did it again! That's the second time I've put the incorrect version number in the plugin.yml. Thanks for pointing it out. I've uploaded a fixed version.

    New Version: 0.6

    This version adds the ability to select which mobs to repel individually. Currently, this is a global setting for all repellers. Eventually I'd like to have separate configurations for each individual repeller, but that will probably come once custom repeller shapes are implemented. See the sample config.yml for how to define which mobs to repel.


    Version 0.6
    • Added configuration option to select which mobs to repel. See the sample config.yml for more info.

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


    Ive not read all the thread but i have a question, is the 20 block radius works for all the chunk height?
    Or 20 block radius north south east west up and down?
    Thx for the answer!!!!
  20. Offline


    Reading the thread is simple and takes less time than it does to post. From my original post:
  21. Offline


    Would be really cool if we could specify a Cost to Create. I recommend using Register so you don't have have to do extra legwork.

    That's the only thing keeping me from using it.
  22. Offline


    Lol thx....
    And for the price i think that 7 diamond cube is already a nice price....
  23. Offline


    Thanks for the suggestion! I'll look into it. I think admin definition of repellers will be the next thing I do though.

    Sorry, I didn't mean to come off as a dick. It just gets old answering the same old questions. I guess that is my responsibility though, since I've decided to release this plugin. Hope you like it.
  24. Offline


    Sorry dude but im speaking french and i wasen't sure about the meaning of this sentence!!
    U juste answer me and that's cool!
    Thx again.
    And yeah ur plugin is realy cool like it!
  25. Offline


    Just posting to show my support for admin definition of repellers. Only thing keeping me from putting this thing on our server! Thanks for your work so far :)
  26. Offline


    This is great! This will work perfectly for my Soon to be created Runescape type Server where you cannot destroy the ground in the outside world but can go into "Instances" and do whatever you want.

    This allows me to place these under my indestructible ground and prevent mobs from spawning. Because in my server, I am trying to make it where Mobs of a type can only spawn in some areas that I want.

    Question. Can I make the range go as high as I want?
    Will this prevent me from using commands like,. "Spawn Zombie 10 " ?
    Will this Break Mob Spawners?
  27. Offline


    • You should be able to set the range very high. I've not tested with numbers higher than 500, but technically you should be able to go up to 65535. I don't think the range will affect performance.
    • I haven't used any mob spawning plugins with this, but I believe it will stop your commands from working if you're trying to spawn monsters inside a repeller area.
    • It doesn't break mob spawners.
  28. Offline


    i have got a suggestion what about tower things that could make mobs spawn inside a certain area it could be made out of netherack or something evil i don't know i'm not sure if u can do this but maybe make it so that it dosent matter if its day or night.
  29. Offline


    is there a way to prevent mobs that have spaws outside of the repellent zone to come inside the zone ?
    juste like in another plugin that prevent the player to go farther than a point of the map (do you understand what I mean ?) or maybe juste kill the mob when he enter the zone.

    evenwithout it your plugin is very cool
  30. Offline


    Good suggestion. Like many other suggestions, this is something that I feel deserves its own plugin, rather than tacking the functionality on to this one. If there's enough interest, I could look into making another plugin that does this.

    Unfortunately, Bukkit doesn't give easy access to mob movement, and I'd have to monitor mob movement to ensure that a mob doesn't enter the area. However, the most important aspect is that even if Bukkit did give me access to that information, it would likely cause huuuge performance problems on servers. Mob tick updates are already a major part of CPU usage.

    Plugins that prevent player movement have the luxury of only dealing with a limited amount of players. For instance, on a 2-player server there are 200 mobs. On a 200-player server, there are 200 mobs. If you have a server capable of handling 200 players, you are capable of monitoring mob movement. However, monitoring mob movement on those 2-player servers would use way too much CPU.

    On the other hand, this is something that I've wanted to do from the start. In actuality, stopping mobs from spawning was a concession. I originally wanted to do exactly as you're suggesting. Perhaps in the future I'll find a workaround.
    AlexBrahhh likes this.
  31. Offline


    if u do make a plugin for this than maybe u could have it so there is an option to change it between repel or attract

Share This Page