Inactive [FUN/MISC] BleedingMobs v3.5 - Make those mobs bleed [Craftbukkit-1.1-R2 dev]

Discussion in 'Inactive/Unsupported Plugins' started by Perdog, Jul 25, 2011.

?

Do you find this useful?

  1. Yes

    85.4%
  2. No

    14.6%
  1. Offline

    Perdog

    [​IMG]

    BleedingMobs
    Make your mobs bleed a little
    NOTE: Please use the BukkitDev site at: http://dev.bukkit.org/server-mods/bleedingmobs/
    That is also where all updates will be done from now on.
    Click on the 4th spoiler for the old post, not sure why there's a BB code glitch here.​
    old post (open)
    old post (open)
    old post (open)
    old post (open)

    BleedingMobs is a plugin I developed for my own server. It didn't seem right that those suckers weren't bleeding all over the place while I hacked them up with my sword. So I developed this, to make it a little more satisfying when I attacked mobs.
    This is also the first plugin I have ever developed, so expect there to be bugs. If you do find any bugs just leave a reply or Email me and I'll try to tend to the issue as fast as possible (I'm in college so I can't tend to the plugin at all times of the day). I hope you enjoy my plugin, please let me know if you like it and find it useful :)
    Screenshots:
    New screenshots will be up as soon as possible!​
    Videos:
    How to setup the config:
    I know there has been some confusion with the Config.yml, so here is something to help you guys out.​
    Code:
    // Maximum particles allowed in the world. Reduce this, if the server lags.
    max-particles: 200
    //When an entity dies.
    death:
        //On entity death, how much blood is dropped by the mob. Randomly selected between from and to.
        amount:        to: 35        from: 25
        //How long the stained ground stays before disappearing (in server ticks = 20/s).
        stain-life:
            to: 120
            from: 80
        //How long bone stays lingering around (in server ticks = 20/s).
        bone-life: 100    //Colour of the wool, 14 is red (obviously :P). http://www.minecraftwiki.net/wiki/Data_values#Wool
        wool-color: 14
        //Chance that bone will be used as blood in percent.
        bone-chance: 12
        //What materials can be stained.
        saturated-materials:
        - stone
        - grass
        - dirt
        - cobblestone
        - wood
        - sand
        - gravel
        - sandstone
        - wool
        - double-step
        - snow-block
        - clay
        - netherrack
        - soul-sand
        //How long particles stay before disappearing (in server ticks = 20/s).
        particle-life:
            to: 15
            from: 5
        //Chance that wool will be used as blood in percent.
        wool-chance: 40
        //If the blood from entity dying will stain the ground.
        stains-floor: true
    //If you have multiple worlds, but only want this on for selected worlds, put the world name in the [ ], separated by commas. An empty list means all worlds.
    worlds: []
    //When creeper is attacked or dying.
    creeper:
        //Amount of blood particles that the creeper drops.
        amount:
            to: 15
            from: 5
        //How long the stain lasts on the ground.
        stain-life:
            to: 120
            from: 80
        //How long bones dropped stay till disappearing.
        bone-life: 100
        //The colour of the wool (5 is light green).
        wool-color: 5
        //Chance that the creeper will bleed bone in percent.
        bone-chance: 0
        //What materials can be stained by creepers.
        saturated-materials:
        - stone
        - grass
        - dirt
        - cobblestone
        - wood
        - sand
        - gravel
        - sandstone
        - wool
        - double-step
        - snow-block
        - clay
        - netherrack
        - soul-sand
        //How long the particles stick around.
        particle-life:
            to: 15
            from: 5
        //Chance that creepers will bleed wool.
        wool-chance: 50
        //If creepers can stain the ground.
        stains-floor: false
    //When entity is attacked.
    attack:
        //Amount of particles that are dropped.
        amount:
            to: 25
            from: 15
        //How long the stained ground lasts.
        stain-life:
            to: 120
            from: 80
        //How long the bone particle will last.
        bone-life: 100
        //Colour of the wool (again 14 is red).
        wool-color: 14
        //Chance that bone will be bled when entity's are attacked.
        bone-chance: 6
        //Materials that can be stained.
        saturated-materials:
        - stone
        - grass
        - dirt
        - cobblestone
        - wood
        - sand
        - gravel
        - sandstone
        - wood
        - double-step
        - snow-block
        - clay
        - netherrack
        - soul-sand
        //Life of particles bled when entity is attacked.
        particle-life:
            to: 15
            from: 5
        //Chance that entity's will bleed wool when attacked.
        wool-chance: 50
        //If the ground can be stained when an entity is attacked.
        stains-floor: true
    //When entities are damaged by projectiles.
    projectile:
        //How much they bleed.
        amount:
            to: 15
            from: 5
        //How long the stain will last.
        stain-life:
            to: 120
            from: 80
        //How long bone that was bled will last.
        bone-life: 100
        //Wool colour (14 is still red)
        wool-color: 14
        //Chance that bone will be dropped when damaged by projectile.
        bone-chance: 6
        //What materials can be stained.
        saturated-materials:
        - stone
        - grass
        - dirt
        - cobblestone
        - wood
        - sand
        - gravel
        - sandstone
        - wool
        - double-step
        - snow-block
        - clay
        - netherrack
        - soul-sand
        //How long the particles last.
        particle-life:
            to: 15
            from: 5
        //Chance that wool will be dropped when damaged by projectile.
        wool-chance: 50
        //If floors can be stained or not.
        stains-floor: true
    
    Use this chart to change the colour of the wool http://www.minecraftwiki.net/wiki/Data_values#Wool
    Hope this helps guys. If you have any other questions about the config feel free to drop me a PM and I'll try to explain it better.
    Features:
    • Complete overhaul!
    • Mobs now drop Red wool/Redstone/Bones and stain the ground with their blood
    • Drops disappear over time and are not pickup-able
    • Config file has been added, the following can be configured:
      • Max particles
      • Amount of drops
      • How long the stain lasts
      • The colour of the wool
      • Chance of bone being dropped
      • Chance of wool being dropped
      • How long the drops stick around before disappearing
      • Can disable the stain effect for Creepers, on entity damage, or entity death
    **NOTE: This code was developed by Snowleo, he was generous enough to leave a source code for people to pull from :D by request I changed it to this and personally I much prefer it now. Full credit goes to Snowleo, I only tweaked the code a tiny tiny bit**
    Download


    Email me if you have any questions
    Change-log:
    Version 3.4:
    • Compatibility with CraftBukkit 1.1-R1
    • New Bukkit Event system
    • Optimized block replacement (should not trigger any physics update anymore)
    • Optimized event handling
    • Statistics by Hidendra
    General info: Since Version 3.4 this plugin send statistics about the usage to the serverhttp://metrics.griefcraft.com/. You can disable this using the command /bleedingmobs disable-metrics
    Version 3.1
    • Candy mode (Hint: set particle material to cake)
    Version 3.0
    This project has a new owner. I'm the original author of the mod.
    • Support for Enderdragon (broken, because Bukkit does not call the events, but it will work once they implement them)
    • Fall damage now creates a blood effect (can be configured)
    • Implemented the NoLagg compatibility.
    • More comments in the config.yml
    • Blood is only triggered, if the damage event is not canceled (can be configured)
    • Updated for 1597
    Also all the changes that I made in my branch:
    • Prevent Enderman pickup of wool blocks
    • Enderman bleed black wool and coal
    • The blood can be configured now in config
    • Fix bug with explosions releasing particles twice
    • Different colored blood stains don't overwrite each other
    • Updated for the new config code.
    Version 2.5 part 1/2
    • Added bits of code provided by bergerkiller that will hopefully let this and NoLagg co-exist.
    • Next update will update the config file.
    Version 2.3
    • Thanks again to Snowleo, the chunk reload issue was fixed.
    Version 2.2
    • Snowleo has added a config file, which allows stains to be toggled for certain events
    • If I have the time, and if I feel like it, I may attempt to add to the config file to make individual mobs toggle-able.
    Version 2.1
    • Tweaked a method to fix the onEntityExplode. It isn't completely fixed yet, but I think it's a bit better then it was before. Thank you too Zarius for pointing out the problem too me :)
    Version 2.0
    • Code has been completely changed
    • Expect to love this plugin A LOT more
    Version 1.3
    • Minor bug fix
    • Added additional features
    Version 1.2
    • Small adjustment too remove Dropped Redstone​
    Version 1.1
    • Recoded so that players can't pick up restone that is dropped, and it disappears when they try to pick it up (should prevent any lagging from occuring if a lot of mobs are taking damage)
    Version 1.0
    • Finished plugin and released it to bukkit :) with thanks too nisovin for helping with a part in the coding
    Version 0.1
    • Didn't work at all
    To-Do list:
     
  2. Solution: use worldguard & creeper block damage: false :) i just happend to hit the ground with superpick ^^ LOL :D
     
  3. Offline

    Ross Gosling

    @Perdog


    OMG I LOVE THIS PLUGIN!!!
     
  4. Offline

    microskies

    Sorry about editing this post, i did get the right download, AND I LOVE THE FLOOR STAINING :D. This plugin is getting better and better each time I look :D

    Thank you Perdog :)
     
  5. Yeah I'm loving this. It's funny watching people's reactions when they first see it. It clicks right away. Then comes more punches.
     
  6. Offline

    clitcomander

    we arent pussys lol, but i can wait for a config to turn bleeding of for creepers. any server with creeper damage off is offensive to me lol
     
  7. not CREEPER DAMAGE off, the BLOCK dmg so it wont break stuff
     
  8. Offline

    Perdog

    Thanks :)
    I wish I was still running my server so I could see peoples reactions lol
    Thank you :) haha
    I don't know why the creepers are able to blow up the ground and remove it, they shouldn't be able too, removal of the blocks is blocked :/ I had time too look at the plugin this weekend and I couldn't figure out the problem, so it may take a bit more time, sorry :( unless you just wanted to remove the bleeding effect from creepers, that may be a bit easier to do.
    As for using the super pick on it, I'm pretty sure I've read on another plugin that was supposed to protect blocks that it can't be fixed because the removal of the block is too fast too register
     
  9. Offline

    nova779

    reccomendation: Make it configureable what they drop
     
  10. Offline

    Perdog

    Ya I'm working on it :) I screwed it up somehow though and now they only drop red wool.. so I have to fix that first lol
     
  11. Offline

    clitcomander

    yeah once you make it an option to turn off creepers from bleeding im using this in my server.
     
  12. Offline

    Perdog

    then this is going onto my top priorities list :)
     
    clitcomander likes this.
  13. You should totally make Creepers bleed green wool and saplings!
     
  14. Offline

    Perdog

    That's a good idea actually! I just have to find out what the problem is with the unBreakableBlock command. It almost seems like the creeper explosion is doing the same thing that super pick does, it destroys the block too quickly for it to register.. I'm going to ask about this on the forums and see if I can get any help
     
  15. Offline

    Zarius

    Hmm... just quickly looked at the sourcecode so it's just a rough guess but perhaps the onEntityExplode code should be something like this?

    Code:
            for (Block block : event.blockList()) 
            { 
                if (BleedingMobs.removeUnbreakable(block.getLocation())) event.blockList.remove(block);
            }
    
     
  16. Offline

    Perdog

    OMG >.< Nice catch, thank you soooo much, I'm going to try this right away, if it works, you are my hero

    How bad was it before when creepers blew the wool out of the ground? Was it a lot, or just 1 or 2?

    Updated to version 2.1
    Anyone who was having a problem with creepers breaking the wool, give this a try, and let me know if it's any better :)

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

    clitcomander

    it was like 3-4 when i had it going and creepers blew, i know if you group them its worse the more there is.

    BUT here i go testing it out NOW!!!

    UPDATE, and this ones coming WITH a video SOON. we had a bunch of people testing it on my server.
    THERE is however one small problem still, TNT, with tnt it allows you to gather the wool.

    AND its very minor but i just spent 30 min with a ton of people testing it so we did find that its missing the blood from when you get hurt from fall damage. and the creepers are fixed. MEANING ITS IN FULL USE on my server now.THANKS SO VERY MUCH, ill send a lil donation one day soon. and post the video asap, ill do it to some music in case you wanna use it.

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

    Perdog

    I'll definetely add your video into the spoiler in the OP :)
     
  19. Offline

    zhuowei

    Apparently SnowLeo's GoreMod had been updated so that creepers no longer bleed. Maybe you can incorporate his fix?
     
  20. Offline

    Perdog

    I can do it myself, its just a matter of making the time for it (exams coming up and all), all I would have to do is change it from entitydamage too animal, player and monster, and make an if statement excluding creepers, isn't it?
     
  21. Offline

    Zarius

    Odd that TNT is still working - this uses the same event as creeper explosions...

    ENTITY_EXPLODE
    Called when an entity explodes, either TNT, Creeper, or Ghast Fireball

    Was this definately with Perdog's new version (2.1)?
     
  22. Offline

    clitcomander

    YAY video IS DONE!!!! check it out here, it was super fun to make this one.
    FULL SCREEN FOR FULL HD PLEASE. IT PLAY'S WAY BETTER IN FULL SCREEN!!



    yeah i just re downloaded it and used it. made sure it was 2.1, i already have the old version. even with the tnt issue its very minor and none is gonna use tnt to get wool LOL. so im super happy with it as it is.

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

    Zarius

    Yeah, you could read in a list of strings fairly easily from a config.yml (eg: excludeentities: [CREEPER, SHEEP, PLAYER]) then loop through that list and compare to the entity type (only running your code if there is not a successful match).

    The problem is checking the string against the creature type. You could use something like (typed from memory - could have typos :D):
    Code:
    Entity victim = event.getEntity();
    Boolean excluded = false;
    for (String excluded : excludeList) {
      if (excluded.equalsIgnoreCase("CREEPER") && victim instanceof Creeper) excluded = true;
      if (excluded.equalsIgnoreCase("COW") && victim instanceof Cow) excluded = true;
      ...etc
    }
    
    if (!excluded) {
      // run code here
    }
    
     
  24. Offline

    Perdog

    Looks like you guys had a lot of fun doing this :D Glad you like it, and about the TNT still popping the wool out of the ground... I am dumbfounded lol
     
  25. Offline

    olimoli123

    Um, when you get killed by a mob when it bleeds the items are dupable
     
  26. Offline

    clitcomander

    WHAT?!?! I doubt that, Ive tested this.
     
  27. Offline

    snowleo

    I want to point out that version 2.0 is identical with my GoreMod 1.0.2. Version 2.1 did not fix the exploding red wool blocks, because changing the blocklist of the event does not affect which blocks will be dropping stuff.

    I made some changes to my code, maybe you can pull them too. They also fix the exploding wool bug.

    Since I never intended to work on this for long or even releasing it, I'm ok with this plugin. Just respect the license and keep the credits. Thanks. :)

    Edit: I'm not going to answer any support/help request for this or GoreMod (except by developers).
     
  28. Offline

    ScottSpittle

    can i please make a suggestion?
    Maby a config to allow us to toggle bone and redstone from being involved.. xD
     
  29. Offline

    Perdog

    This is in the To-do's but until further notice all work on this code is coming to a stop, sorry guys. I hope to be able to start work on it again soon.
     
  30. Offline

    Pants_party

    THIS IS SOOOOOOOOOOOOOO FU***ING FUN!!!!!!!!!!
    HOLY SHIT NOW I WANT TO KILL THE MOBS!!! I LOVE SO MUCH FOR THISS!!!!!!!
     
  31. Offline

    clitcomander

    i pray everyone works together to fix this, THANKS SNOW LEO!!!!!
     

Share This Page