[INACTIVE][RPG/FUN] BlackLung v3.5 - Coal Mining is Dangerous! Explosions & Fires & Gases![1060]

Discussion in 'Inactive/Unsupported Plugins' started by chernobyl360, Jul 19, 2011.

  1. Offline

    chernobyl360

    TAKE THE CODE DO WHAT EVER YOU WANT WITH IT. GIVE ME CREDIT THOUGH.


    BlackLung
    Acknowledgements:
    @DrBoweNur - For Helping me finally figure out Configs :D
    @Adamki11s - For Allowing me to use his Smoke Code!
    @ShameBot - for helping me fix the explosions.

    V3.5
    This is a super simple and yet fun addon for RPG servers. Coal is supposed to make you sick and with this plugin it has brought that appeal back!

    Features:
    • Wear a helmet to not get damage
    • When Explosion Happens Players Will BURN!
    • Random Explosions - Configurable!
    • Smoke on block damage
    • Configurable BOOM Radius!
    • Configurable Messages
    • Configurable Damages
    • Hurts Players When COAL_ORE is broken.
    Configuration:
    WHEN UPDATING REMOVE CURRENT CONFIG AND ADD PLUGIN!USE NOTEPAD++ TO EDIT!!!!
    YOU HAVE BEEN WARNED! NO MORE THEN 20 ON BOOM RADIUS! IT WILL CRASH YOUR SERVER! MAKE SURE RANDOM BOOM IS SET NO MORE THEN 50!!! IT WILL CRASH SERVERS!!!

    Code:
    BlackLung:
        Damage-Message: '*cough*'
        Random-Boom: 1
        Fire-Ticker: 200
        Coal-Damage: 1
        Boom-Radius: 20
    FireTicker Means The Length Of Time Player Will BURN!

    GasMask:

    Code:
    Wear These:
    Leather Helmet
    Iron Helmet
    Diamond Helmet
    Flak Helmet
    Gold Helmet

    Download:

    http://www.gamefront.com/files/20655498/BlackLung.jar

    Source:

    https://github.com/ChernobylStalker/BlackLung

    Todo:
    • Catch All Nearby Blocks On Fire
    • Limiter For BOOM Radius
    ChangeLog:
    • v3.5 updated to 1060cb/b
    • v3.5 configs wont work correctly for the random events so i hard set it to 150. this is set high to reduce the lag and make it more realistic. (hopefully)..... well everything else works great on the configs.... just follow the instructions carefully to config it urself :D
    • Another Huge Update! Added Configurable explosions/fire damage. added random explosions when mining.added fires. all configurable!
    • MASSIVE update! Redid the Block Listener. It now has smoke on Block Damage. Wear A Helmet To Survive. Removed the onBlockBreak.
    • Fixed a coding issue. Should be fixed now. v2.0 thanks to @MoxieWhimsy for pointing out my coding error.
    • Released v1.5 CB 1000 Configuration! thanks to DrBoweNur
    • Released v1.0 CB 1000 i was bored sorry if this plugin was a waste.
    [​IMG]
    Based on a work at github.com.​
    Permissions beyond the scope of this license may be available at http://forums.bukkit.org/threads/rp...rous-explosions-fires-gases-1060.27137/page-2.​
     
  2. Offline

    DrBowe

    If you use bukkit's built-in YAML, Configs are actually easier than you think...
    Just as a word of advice :)
     
  3. Offline

    chernobyl360

    yea ive been told a few times thats its quite easy. lol, but im a bit slow.
     
  4. Offline

    DrBowe

    Have you tried CaptainAwesome7's tutorial in the Resources sub-forum of Plugin Development?
    It's quite thurough. :)
     
  5. Offline

    chernobyl360

    yea im looking at the tutorial right now. see my issue is how do i call the damage int/ get the message string

    configs added :D! ill add more features tomorrow.

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

    MoxieWhimsy

    Definitely liking this one. Though it doesn't seem to do damage in enough cases.

    Any particular reason for only causing damage while a player is holding a diamond pickaxe or not using a pickaxe at all?
     
  7. Offline

    chernobyl360

    well the code is designed to allow only diamond, gold, stone, iron, wood pix-axes because it would be more realistic. im not sure why theres not enough damage in rare cases.

    how many people are on your server?
    does your server experience lag?
     
  8. Offline

    MoxieWhimsy

    Specifically, stone pickaxes didn't seem to cause damage. Diamond pickaxes do cause the damage and cough, and breaking with hands (eventually) causes the message and damage -- both great; I'd wager that anyone digging through coal ore with their hands would leave their lungs in dire need of repair.

    I took a quick peek at the code and noticed that on line 19 of BLBlockListener.java it reads:
    Code:
    if (player.getItemInHand().getType() == Material.DIAMOND_PICKAXE ||(event.getPlayer().getItemInHand().getType() != Material.GOLD_PICKAXE) && (event.getPlayer().getItemInHand().getType() != Material.IRON_PICKAXE) && (event.getPlayer().getItemInHand().getType() != Material.STONE_PICKAXE) && (event.getPlayer().getItemInHand().getType() != Material.WOOD_PICKAXE)) {
    I think what you meant to say was either:
    Code:
    if (player.getItemInHand().getType() == Material.DIAMOND_PICKAXE || (player.getItemInHand().getType() == Material.GOLD_PICKAXE) || (player.getItemInHand().getType() == Material.IRON_PICKAXE) || (player.getItemInHand().getType() == Material.STONE_PICKAXE) || (player.getItemInHand().getType() == Material.WOOD_PICKAXE)) {
    or:

    Code:
    if ( (player.getItemInHand().getType() != Material.DIAMOND_PICKAXE) && (player.getItemInHand().getType() != Material.GOLD_PICKAXE) && (player.getItemInHand().getType() != Material.IRON_PICKAXE) && (player.getItemInHand().getType() != Material.STONE_PICKAXE) && (player.getItemInHand().getType() != Material.WOOD_PICKAXE) ) {
    //Code to prevent or undo the broken block
    }
    how do I add spoiler blocks? This ended up rather long.

    There are only about five of us on the server and absolutely no lag whatsoever (yet!).

    Personally I'd just get rid of that line and the matching closing braces. Minecraft is already set up so that if you don't use a pickaxe (of the appropriate quality) the ore yields no reward when broken. Realistically, you might eventually break through certain ores with a strong enough shovel, but no guarantee it'd be usable so the default behavior may be "good enough".

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

    chernobyl360

    wow thanks. im surprised i didnt notice it. you should make some plugins :D!

    v2.0 is out! the coding error should and hopefully be fixed. Thanks to @MoxieWhimsy for pointing out my mistake.

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

    Zippo

    Not fixed
     
  11. Offline

    chernobyl360

    this doesnt help, what exactly doesnt work? i can confirm it works for me. ill upload a video.
     
  12. nice plugin, can u create HELMET which u could wear (glass helm or such) so you dont get damage from coal? :)
     
  13. Offline

    Cyrusc

  14. Offline

    chernobyl360

    wow thanks, i havent even thought of it. ill add it tomorrow morning when i wake up..
     
  15. Offline

    Cyrusc

    Sweet
     
  16. Offline

    chernobyl360

    MASSIVE update! Redid the Block Listener. It now has smoke on Block Damage. Wear A Helmet To Survive. Removed the onBlockBreak. Still all Confiurable! no need to worry :D
     
  17. Offline

    Cyrusc

    Hey,
    what if you were to set it to damage the helmet every time you break coal?
    *EDIT*Or have a probability setting within the config so that coal won't damage you every time.

    *EDIT2* Btw: When you punch coal ore it damages you immediately
    *EDIT3* ^Like gas pockets
     
  18. Offline

    chernobyl360


    Future ideas -

    Gaspockets will be added next. so on random an explosion will happen. sometimes they will be small weak ones or sometimes it may be total destruction.

    The helmet damage - Not sure when ill add this. i guess what i can do is have it ware down a little bit at a time after each block break...

    what do you mean it damages you immediately? is there an issue with this latest update?
     
  19. Offline

    Cyrusc

    I have found a few issues, one is if you ever hit a coal ore block it will emit smoke and harm you. Not destroy just hit. No matter what you use if you hit it with you still receive the damage and smoke. There is also a compatibility issue with Mcmmo if you have extreme stats (2000+) where ever block you hit hurts you and says *cough*
     
  20. Offline

    chernobyl360

    wow this is interesting. but the code is setup so that when your hitting it, it will hurt you. the blockbreak was unrealistic. but ill make it so it only smokes on tool hits. the mcmmo issue is very odd. ill have to talk with the dev of mcmmo and collaborate the issue.

    well i just fixed a bug in which when hitting every other block other then coal it damages you/sends message. now i have set it to cancel the event if nothing is in your hands. you can still break blocks. you wont get damaged when damaging other blocks.... you can download it again and see how you like it. if theres still bugs let me know....

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

    Cyrusc

    But wouldn't it still damage you if you were holding eg: book
    And Great :D Ill test it now
    *EDIT* Works Perfectly now! Thanks Bro
     
  22. Offline

    L3nnyBoss

    Can you make that the smoke from torches or fire appear when you break a coal ore?
    that would be cool
     
  23. Offline

    chernobyl360

    there is smoke :p. the fire part is being worked on.
     
  24. Offline

    chernobyl360

    Another Huge Update! Added Configurable explosions/fire damage. added random explosions when mining.added fires. all configurable!

    THIS PLUGIN WILL CUASE SERVER LAG! MAKE SURE THE BOOM RADIUS IS UNDER 20!!!! MAKE SURE THE RANDOM BOOM IS SET TO NO LESS THEN 50!!!!!!! THIS MEANS EVERY 50 COAL BREAKS AN EXPLOSION WILL HAPPEN!

    Git Hub is updated! take a look! dont steal though!


    Added a video for the skeptics :D

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

    zaack

    i think i may have got the wrong download or something ^^ my blacklung.jat is only 359 bytes in total and on closer inspection i could only see a plugin.yml and META-INF > mainifest.mf, needless to say the plugin didnt work ^^

    If you could fix that (if it is something at your end) or tell me what ive done wrong, it would be much appreciated and i will definitely use this on my server :)
     
  26. Offline

    chernobyl360

    woops, it seems eclipse didnt export it correctly. its fixed now. :D
     
  27. Offline

    flozza83



    CB 1000
     
  28. BlackLung:
    Damage-Message: '*cough*'
    Coal-Damage: 1
    Fire-Ticker: 100
    Random-Boom: 1
    Boom-Radius: 2

    does this mean
    coal dmg is 1 always
    burns 100 ticks
    1% chance to get explosion
    radius for explosion 2 blocks?
     
  29. Offline

    chernobyl360

    coal damage 1 = half a heart so 2 = 1 heart
    FireTicker 100 means player should burn for 2 seconds
    Random Boom 1 Means theres a 100% chance of explosion. set it to at least over 80 to reduce the chance of server crashing
    Boom Radius means Size of explosion. set it to at least 4 -6. no more then 20 becuase the server will crash.

    THERE IS A BUG WITH THE CONFIG! /RELOAD WILL RESET THE CONFIG BACK TO STANDARD. IM TRYING TO CORRECT THIS.

    ^^^ thats for reference.
     
  30. Offline

    zaack


    thanks alot :D
     

Share This Page