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. Possibly the current best plugin if this is working well.
  3. Offline


    The default is to only repel monsters. There is a config value "repel_neutral_mobs" that can be set to "true" to start repelling animals. Are you sure that it is stopping animals from spawning as well? If I remember correctly, animal spawning was greatly reduced in 1.8. This could be the source of your problem. For our server, I ended up writing a quick plugin that would allow me to wipe the world of all neutral mobs to try to jump-start animal spawning again.

    Thanks a lot! As far as I know, it is working well for most users, but I am trying to iron out some issues that may be caused by conflicts with other plugins, a Bukkit bug, or just stupidity on my part.
  4. Offline


    animals dont destroy towns so i dont care bout that i just dont want ender man in my town cuz they grief and i cant seem to find a simple up to date plugins that remove endermans btw ty for replying :D
  5. Offline


    ChestShop 3.2 - Acrobot
    Essentials 2.6.1 - Zenexer, ementalo, Aelux, Brettflan, KimKandor, snowleo, ceulemans, Xeology, KHobbitsEssentialsChat 2.6.1 - Zenexer, ementalo, Aelux, Brettflan, KimKandor, snowleo, ceulemans, Xology
    Permissions 3.1.6 - Unknown AuthorGroupManager "1.1 (Phoenix)" - Unknown Author
    EssentialsProtect 2.6.1 - Zenexer, ementalo, Aelux, Brettflan, KimKandor, snowleo, ceulemans, Xeology
    EssentialsSpawn 2.6.1 - Zenexer, ementalo, Aelux, Brettflan, KimKandor, snowleo, ceulemans, Xeology
    HeroicDeath - SquallSeeD31
    LWC 3.53 - Hidendra
    BukkitCompat r15A - PhonicUK
    MobRepellent 0.5 - Unknown Author
    NarrowtuxLib 0.8.11 - narrowtux
    Nethrar 2.0 - Andrew Krieger
    SuperLog 2.0 - thescreem
    WorldEdit 4.6 - Unknown Author
    creaturebox 0.7.7 - Spathizilla and Lodran
    iConomy 5.01 - Nijikokun
    QuickBelt 0.1.8 - Unknown Author
    xAuth 2.0b4.1 - CypherX
  6. Offline


    Hey, how did you get the new version so soon?! Haha.

    Joking aside, thanks for the list. I'm going to run through these and see what I can find.
  7. Offline

    Rick Boss

    I love this plugin! Very nice. Two suggestions though:
    1. It would be nice to make each individual repellent structure configurable on if it repels neutral mobs or hostile mobs. For example, there are some instances where I just don't want hostile mobs to spawn, while neutral mobs spawning would be acceptable.
    2. Secondly, less important, it would be cool to be able to use your own, user created design.
    Just some thoughts.
    Thanks for the awesome, simple plugin though!

    I just noticed that it doesn't handle the additional values to identify the different types of wool, stone bricks, etc
  8. Offline


    I've been thinking about the best way to handle both of your suggestions. For one thing, I don't want to make the plugin too configuration-heavy. Allowing users to set repelling neutral mobs per repeller type would add three new configuration values. Making that work for each individual repeller is even more complicated, and I don't want there to be any confusion about exactly what is happening. That said, this is something I'm looking into.

    I would love to be able to do user-configurable structures. However, this is something that is very complicated to get right. There's just not an easy way to define these, but this is something I definitely want to do.

    Finally, about the different block types: do you have a suggestion of how they should be handled in the configuration? I was thinking if, for instance, you wanted purple wool you would type "35.10", per the values in the wiki.

    Thanks for your suggestions!
  9. Offline

    Rick Boss

    Understood that it could all be very difficult, but just thoughts!
    And I was thinking colons, that's how Essentials item spawning handles them, "35:10" something like that. I suppose whatever is most common, to try to keep an unofficial standard.
  10. Is there anyway you could work with World Edit/WorldGuard or maybe it's just the Jail Mod itself you need to work with so that when I create a jail, its current settings are to spawn hostile wolves to kill players if they try to leave, it still functions even with a mobrepeller placed within it's limits.

    currently have a large under my city so that it covers all buildings otherwise bad mobs spawn everywhere and it's a pain in the ass to place smaller repellers everywhere underneath the structure and it creates more eye sores :(

    so to recap my suggestion: ignore jail mods hostile mob spawning!

    I tried a test to make sure this is correct and it is...
    MobRepellent works beautifully on one exception: per instance, I just tried to set multiple mob repellers down to fix my first issue while the spawn of the hostile wolves was out of the repellers radius it was still not however working as a repeller. It seems that if you have overlapping radius' it nullifies all repellers in the repeller zones that overlap, it may even nullify all repellers in the repellers file, im not sure about that one tho...

    is there a way that you can do 1 of my 2 suggestions or both?
    1)fix overlapping repellers
    2) ignore jailmod spawns

    I would lovez joo long time!
  11. Offline


    Hmm now you mention it, the repellers I have that aren't working properly are overlapping....maybe that's the prob, it might explain why I've had such intermittent probs because as I activate more repellers it might be messing with the ones already placed that I thought were working 100%. Time to test! :)
  12. when you test you need a control in your test, make sure you make a fenced area to prevent outside mobs walking in, and then do one test where the radius touches the end of the other repellers radius (meaning they arent overlapping but they are touching) and then a second where there is a space between the two of a single block I'd do this one with both half blocks on the spaced block and without to see what happens (this checks to see if not only does overlapping repellers negate the effect, but if them being too close as well.

    I also wanna point out that the only way i have been able to get certain areas with past repellers to work again is by deleting the repellers file in MobRepellent's folder in the plugins folder. AS the broken repellers locations don't list in the file - it's odd, but if you do that and say make your diamond big enough to encompass your entire area it'll be fine

    would still like one of my possible fix types above!
  13. Offline

    Jaiph testing of overlapping repellers didn't go anywhere BUT I think I have worked out what is going wrong. Adding a few repellers in a small-ish area (within visual range) works fine and they all work fine, the problem seems to be (at least for me) when I go a long distance away (about 300 blocks in my testing) and place a new repeller when I use /mrreload all repellers NOT close to me spit out a [MobRepellent] No repeller was found that matches entry on line 6. Ignoring entry. error in the server log file and are then deleted from repellers.list. So basically on reloading the only repellers left are those in chunks near me (or other players on the server) and any others are deemed to not exist and are deleted.

    Also, if I then run back to reinitialise the repeller that was deleted I can't.....creating/destroying the repeller in the same location just isn't recognised by the plugin at all BUT if I move the repeller say 20m into a different chunk, no problems. It's as if the chunk the deleted repeller is in just becomes "locked" or something. Very odd.

    Anyway, the tl:dr version: the repellers themselves seem to work perfectly fine at repelling mobs but rather the problem is related to the storage/loading of them. At least for me, anyone else having issues does this scenario ring true?
  14. Yes you have just posted what I was going to confirm beat me to it by a half second I think!

    I'm going to put a large (150) radius repeller where I had my old one originally after deleting the folder and forcing the jar to recreate it then walk until the chunks unload and then walk back see if mobs spawn
    then I am going to do the same thing after restarting the server.

    okay so @Jaiph if you put the repeller down and night comes it works, but if you leave the chunks (dont have to go 300 blocks)

    just far enough for the chunks to disappear then walk back and once they reappear they start spawning mobs like crazy fuuuu.

    I think you have a bug mr. developer

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


    Hello, nice mod.

    Currently I found out that pig spawners (I use them @ spawn for spawning pigs so user can get some food) are not spawning any pigs.

    Edit: spawning sheep etc is also not possible while repeling neutrals is set on false.
    Can't you make it so we can change the repel of every mob? for instance zombie on false and enderman on true.
  16. Offline


    Invisible structure would be much better some greivers just come and break the structure and it doesn't really look good how about you make it with WorldGuard or as a region that mobs wont spawn in this region this should be really good!
  17. Offline


    Thanks a lot for bug testing so much. None of the code I've written has anything to do with night, chunks, nor does it update anything when a player leaves an area. However, this is a great start and will give me something to work on. Sorry it's still not working correctly for you guys, but this bug is my top priority. With your suggestions maybe I'll finally be able to replicate it.

    Repelling certain types of mobs is on my list. I'll look into why your spawners are not working.

    After I get the current bugs ironed out, I'm implementing permissions support. This will stop griefers from easily breaking the structure. However, if you want an invisible region with no structure that works like WorldGuard, use WorldGuard. That type of functionality is not the goal for this plugin.
  18. Offline


    Some questions: (perhaps you can add it to the description)
    • How high (Y) is the protection? Radius or 128 blocks? (Futur: can be changed in the config.)
    • I read the protected area is a cube, so the word radius is a bit irritating, whats now true? (I hope the cubic form)
    Thank you for the answers!
  19. Offline


    Replication!!! Jaiph, I've been able to finally replicate your problems! I think this bug is the same that is causing your problems, cuddleswifkitenz. However, there is a hiccup: I'm 99% sure this is a Bukkit problem.

    I'm using some Bukkit API functions to get information about blocks that are located at certain x/y/z coordinates in the worlds. This function works fine when no players are logged in, but once a player loads that chunk and then leaves, the function decides to start pointing to an AIR block, instead of the correct block. I've posted in the plugin dev forum to see if I can get some help from other developers that have more experience than I in the Bukkit API. If I can't find a solution, I'm going to change the problem by totally reworking how the plugin handles loading repellers.

    Standby. Hopefully we can resolve this soon.

    Edit: This is absolutely a Bukkit bug (#656). But that doesn't mean I can't work around it. This may take a bit, but I'm going to either rework the plugin to stop this from happening, or do a pull of Bukkit's code and fix the bug myself.

    Sorry about the ambiguity, but it is just easier to say radius :p. A repeller's protection area is a cube. For instance, if you set the large repeller to repel at a "radius" of 50 blocks, that will be a 100x100x100 cube centered at the base of the repeller. I'll change the description to make this more clear.
  20. Offline


    Awesome :) thanks for your continued work on this plugin
  21. easiest way to hide it is to make a fountain :)

    Your welcome :) I use worldguard now for the particular region as it works perfectly (no offense) but I still want this mod as it gives me the ability to NOT have to create a whole effin region/or when i set up the server to go public it'll allow players to proctect their homes - something is wrong on 1.8 and it's notch's problem no matter how well lit your bases are mobs still occasionally spawn in the light pisses me the hell off too! cause what's the point of all that glowstone/torches then? I'll add this post to my feed wait n see till it's fixed: your mod shouldnt have to deal with night in its code or anything like that: all you want it to do is say, "hey mr mob i really appreciate how hard it is for mrs mommy mob to go into labor with you for a whole 7 minutes every day, but I don't want my automatic mushroom farm blown up! how bout you spawn over there?" - Mr mob, "Fine :C "

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


    Yeah, not having to get an admin to create a region is the whole reason I wanted this mod. I'm going to have to rework the plugin, so it will take a little while, but hopefully this will solve all your problems.
  23. Offline


    The MR works for a while then it just disappear from /mrlist even after reloading/restarting server! ALSO I get like over 500 mobs spawning in my world!!!! AND TEHRES LIGHTS EVERYWHERE LIKE EVERYWHERE! Glowstones and torches!!!
  24. Offline


    New Version: 0.4.4

    Finally think I've ironed out most of the stupid bugs! Check the changelog for the full list. I'm hoping this will solve most problems. I know there are some other bugs that people have been having, but I'm not sure how many of those bugs were being caused by the ones that I've fixed in 0.4.4.

    One major functionality difference is that I've removed auto-checking of repellers when they get loaded. This means that if you edit the repeller.list by hand it's possible to load a repeller that doesn't exist (i.e. there is no repeller structure). This is my current solution for the repeller loading bug (sometimes Bukkit just doesn't give the correct information on blocks in the world). Hopefully either the Bukkit bug will get fixed, or I can take the time to completely rework how repellers are loaded.


    Version 0.4.4

    • Bugfix for repellers not loading correctly if the chunk becomes loaded and then unloaded
    • Removed auto-checking for repeller existence because of Bukkit issue #656
    • Bugfix for repellers just plain not working(Hopefully) final bugfix for egg spawning
    • Bugfix for unnecessary 'block_id = -1' line in config.yml
    • Bugfix for incorrect plugin version in plugin.yml

    Again, There Will Be Bugs (starring Daniel Day-Lewis) so tell me about them and I'll fix them alllll!!

    Thanks a lot for your help with debugging and such! I've fixed a lot of bugs, and changed a bit how repellers are loaded. Some of your problems I didn't directly address because I think they were being caused by other bugs. Let me know if it's still not working correctly for you. I also added a lot more debug messages for 'debug_mode: true', so your log might get spammed if you have that set in the config.yml.

    I haven't had time to look into the mob spawner problem you've been having @ampallang , but it's on my list.

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


    I completely forgot to check compatibility with Jail mod. Wolves should be considered animals, so if you leave 'repel_neutral_mobs: false' they should still spawn. I'm going to look into this and see what sort solution I can come up with. However, plugin compatibility is something that is very low priority right now. Features and bugfixes come first.
  26. wolves spawn aggressively with that mod, but it shouldnt matter much now as that region cannot spawn the mobs I have defined via world guard - I can use the repellers for other things :)
  27. Offline


    I will still not use your plugin until you make a new feature which protects the structure with no commands what I mean is whenever someone builds a structure it should be auto protected. Whoever builds the structure only have the permission to rebuild it or destroy it anyone else can't do it. And you should add a permissions for admins so admins can't destroy/rebuild anyone's structure like "MobRepellent.Admin" or so. Also the structure should be able to protect from the bedrock to the sky limit it's way better in my opinion ;)

    Bug found?!
    2011-10-01 07:16:48 [INFO] [MobRepellent] A new repeller was constructed by a_sulaitiqa97 at (649,66,253)
    2011-10-01 07:19:18 [INFO] [MobRepellent] A new repeller was constructed by a_sulaitiqa97 at (617,66,271)
    2011-10-01 07:19:23 [INFO] [MobRepellent] A repeller has been destroyed at (649,66,253)
    2011-10-01 07:19:36 [INFO] [MobRepellent] A new repeller was constructed by a_sulaitiqa97 at (658,66,271)
    2011-10-01 07:20:33 [INFO] Attempted to place a tile entity where there was no entity tile!

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


    I just removed the repellent in that region and denied spawning of particilar mobs with worldguard, its is spawning pigs now, my player will never get their hands on a mobspawner so, its fine for me now ;)
  29. Offline


    New Version: 0.5

    This new version contains permissions support, a few new commands, and ability to configure block types to include things such as colored wool or cracked stone brick. See the main post for more info on the permissions and commands. The new block type settings are in the sample config.yml.


    Version 0.5
    • Added Permissions support!
    • Added two new commands for managing repellers
    • Enabled configuration to select certain block types such as colored wool or cracked stone brick
  30. Offline


    What would really be nice for my server personally, is if the mob repeller's radius could be determined by a single block - say the center of the first-floor-cross - thus allowing people to use nine diamonds to get the large size version (which I think is a solid cost!) rather than oh, 50 or so

Share This Page