[FUN/MISC] Cavein - Stone and Dirt have a chance to cave-in as gravel and sand. v0.3 [740]

Discussion in 'Inactive/Unsupported Plugins' started by JoeJoeMcBean, Apr 10, 2011.

  1. Offline


    Cavein - Stone and Dirt have a chance to cave-in as gravel or sand.
    Version: v0.3
    Uses Permissions (Tested with v2.7 Phoenix).​
    Honors WorldGuard regions (Tested with 5.0-alpha10).​

    * UPGRADE NOTE: Delete your cavein.config file (or plugin/cavein folder) to have it rebuilt with new config settings, or add worldguard_allowed_regions=
    I recommend a clean install.

    Want to add some additional difficulty to survival and mining? This plugin will transform stone and dirt to gravel and sand around the player causing a cave-in (and possible suffocation from the fallen blocks) based on the percentage chance in the config file. WorldGuard can be used to protect regions from cave-in's.

    The default settings are for a 1% chance of a cave-in which will collapse any stone or dirt in a 3 block radius around the last broken block that has up to 6 open air above it. All WorldGuard regions are protected by default. (Configurable)

    For example: If you are in a small pocket cave and break a block, the open spaces (air) will be checked from the Y-position of the last broken block upwards for each block in a radius around it. Any stone or dirt above these open spaces will be converted to gravel or sand and will then fall down.

    Download jar here (or from the attached file below):

    Copy the cavein.jar file to your plugins directory. The plugin will create the plugins/cavein folder and the cavein.config with default settings.

    Honors WorldGuard regions, can set which regions allow cave-in's​
    Set the percentage chance for a cave-in to occur (0-100%).​
    Set the radius around the player to be affected.​
    Set the height of the cave-in.​
    Reconfigure settings in game (temporary, uses config file on restart!)​
    Source included in the jar.​

    Show Spoiler

    /cavein - Show help​
    /cavein set <property> <value> -set a property (chance, maxheight, radius)​
    /cavein view -view current settings​

    Show Spoiler

    cavein.user.enabled -Enables cavein's for this user/group​
    cavein.user.view -View the current settings​
    cavein.admin.set -Set config properties​

    Show Spoiler

    Increased chance of cave-in based on depth (configurable)​
    Scaffolding cave-in prevention (configurable)​

    Show Spoiler

    Version 0.3
    Added WorldGuard region support​
    Condensed 'caveinchance' to 'chance' for the /cavein set <property>​
    Version 0.2
    Added Permissions support​
    Added set <property> and view commands​
    Version 0.1

    Attached Files:

    neogeek23, Netu and MisanthropX like this.
  2. Offline


    Hmmm Look's Good.
    Possibly a tool To select areas to use this plugin? Could Be good for Escape Games/ Dungeons.
  3. Offline


    Great idea, thanks for the feedback.
    I think I'll add a 'regionname' to the config and have it check for a WorldGuard region with that same name for the next updated version. I have a few more plugins I'm wrapping up now about to release as well.
  4. Offline


    How does the % work, if I set it to 1%, does that mean a cavein will happen roughly every 100 blocks I break? That seems a little too often to me. Can I change it to smaller, like 0.1% maybe? Otherwise is a cool idea, can't wait to spring this on my players! muahaha
  5. Offline


    The short answer is yes you can use a smaller non whole number percent like 0.1%

    This is basically the check to see if a cave-in occurs.
    math.random will provide a decimal number between 0 and 1 and the config setting will be divided by 100 (so a 1% would be .01, or in your case .01% would be .001).

    Side Note:
    Glad you hear you want to give your players a surprise :)
    I'll have another plugin out shortly (next day or so)- zombieattack! This allows zombies to break blocks when targetting a player... no more hiding in sand, dirt homes, or what ever you configure as breakable... lol!
  6. Offline


    Absolutely love this idea, although I do request that you host it somewhere other than the attachment system; I rarely have my browser downstairs logged into bukkit and it was a bit of an pain to pop upstairs to get the plugin. I'll host you, if you like. I've got a fileserver over in Germany that I can give you an FTP account for, if you like?
  7. Offline


    Thanks for the feedback MineralMC and FTP offer.

    I've hosted the file externally now.
  8. Offline


    I have to say this, otherwise I'm going to get lynched by an angry hoard - mediafire has been having some issues as of late, a mirror that isn't rapidshare or hotfile may not be a bad idea. (or even a 'mirror' in the sense of the original attachment method, just so people have an alternative)

    Also, I've done some testing and this seems to work flawlessly. Only tried 90% chance to make sure it was working correctly, currently set to 0.01% chance - no way to test this reliably.
  9. Offline


    Right on thanks for the info and testing. I'll look into some hosting alternatives if I hear/see issues, and I'll re-attach as an alternative (like you mentioned).
  10. Offline


    oh this sounds so tasty and intersting.
    Our server requires that miners have to add planks and logs aside tunnels and caves.
    Are you able to add something like lower chance to cave-in if there is plank protecting the area? :X
    I have no Idea how hard this is to do, but I am so much interested in this! :O

    Also I want the whole server to be caved in, at least, if you extract ore from a cave, it has chance that it caves in if you havn't supported the cave with logs and planks
    *tons of likes*
    Love you sir
  11. Offline


    Yeah, seriously. The idea of requiring scaffolding is -awesome-.
  12. Offline


    Request: Some method of determining if something is a cave or a building. I collapsed 2 houses >.<
  13. Offline


    That one shouldn't be too complicated, since houses will be player-placed blocks; those naturally generated aren't. Perhaps player-placed blocks can be tagged to be exempt from this?
  14. Offline


    Possibly, although that runs the risk of breaking things like placed schematics from WorldEdit.
  15. Offline


    This is implausibly cool, and if you can have the wooden beams protect against nearby cave-ins I will be your best friend forever.
  16. Offline


    how does this work, ive changed the chance to a 100 to test it out, but i still havent got any 'caveins'
  17. Offline


    That would be because I uploaded the wrong file. Should be fixed now.
    Thanks for the follow up!

    I'll take a look into region support, scaffolding, and increased chance of cave-in based on depth (configurable).

    @Nytemare3701 , Maybe I could make a check to not cave-in above sea-level (y:65)? Or use WorldGuard regions to protect?

    @MisanthropX , @Iceciro , @Zalastri , Any thoughts on how you would like to see scaffolding work? Maybe a ratio system like x number of logs and y number of planks per z number of air?

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


    Can we see permissions on this so some sets of players have to worry about this and other don't?
  19. Offline


    You bet. I'll add that to the todo list.
    neogeek23 likes this.
  20. Offline


    That'd be awesome! I really look forward to this addition :)
  21. Offline


    this sounds fun. the risks of a cave in are very real when mining, great that it can now be reflected in game.
  22. Offline


    Sea level won't be the same on my server. We are in the process of lowering the entire map into the void to get extra build space. :)
  23. Offline


    lol yeah I guess that could be a problem. I'll stick with WG regions. I'll get started on changes for this plugin. I've been working on joerep the last few days getting it polished up.
  24. Offline


    Could you support Residence regions as well? We don't use WG regions for anything.
  25. Offline


    I'll take a peek at the residence code. I like Residence and would love to support it. Good thought, thanks.

    @neogeek23 Added permissions support.

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


    <3 my hero!
  27. Offline


    @RazorFlint v0.3 Added WorldGuard region support.

    @Everyone else - Still looking for ideas on how scaffolding should work.
  28. Offline


    Maybe you can use a similar code for the scaffolding as the leaf decay? though instead of decaying it falls?
  29. Offline


    +1 for support system will run this for sure then thinking about it for now though keep up the work!
  30. Offline


    Looks great - will be running this if scaffolding works.

Share This Page