Set Fire Delay Before Removal

Discussion in 'Archived: Plugin Requests' started by DeadGamer333, Sep 23, 2013.

  1. Offline

    DeadGamer333

    I am looking for a plugin that lets you (the user - admin) set how long fire stays before it despawns.
    I want it all to be done in-game so I dont have to do all that config stuff.

    Thanks
    -Dead
    [​IMG]
     
  2. Offline

    AndyMcB1

    Why? You'll have players saying your server is very laggy.
     
  3. Offline

    DeadGamer333

  4. Offline

    AndyMcB1

    *Hits fire to put it out*
    *Ten seconds later the fire goes out*
    What the heck! This server too laggy - I'm going to a better server.
     
  5. Offline

    timtower Administrator Administrator Moderator

    That is just something to keep in mind, make the time the maximal amount of time that a fire can burn, no minimal time
     
  6. Offline

    DeadGamer333

    I dont think people would think the server is laggy since people cant break any blocks because its a kit-pvp server!

    Is there anyone who can make me this plugin or can tell me of one that does this?
     
  7. Offline

    DeadGamer333

    Bump didy bump didy bump bump bump
     
  8. Offline

    filbert66

    Interesting idea, but not an obvious solution. Bukkit has an API to set Entity fire ticks, but not for blocks. I'd like to add this feature to my plugin AntiFire if I can figure it out.
     
  9. Offline

    DeadGamer333

  10. Offline

    filbert66

    Spent a couple hours researching. There is no Bukkit API for this. It's the same Block tick that is used for crop growth, spreading grass, etc. Minecraft has an internal list of flammable blocks and how quickly each of them might burn out, but block ticks are quite random, up to 5 minutes before a block might get updated.

    Could be done by tracking each fire block in the whole world and scheduling a "put out" task, but that's very heavy-handed and not something I'd want to build into AntiFire. Even if I did so, the standard block update might put out blocks before it's been scheduled to happen-- though granted I could catch those events and stop them.

    Are you interested in only stopping fires which have been started a certain way (ex. player flint/steel, spread, flame charge)? Are you interested in overriding the standard Minecraft burn times, that is extending the flame such that blocks always burn the desired time? Would your desired time be the same for every type of burnable block (ex. grass burns as long as logs)?
     
  11. Offline

    DeadGamer333

    I only want it to go out if a fire charge makes the fire.
     
  12. Offline

    filbert66

    1. Are you interested in overriding the standard Minecraft burn times, that is extending the flame such that blocks always burn the desired time?
    2. Would your desired time be the same for every type of burnable block (ex. grass burns as long as logs)?
     
  13. Offline

    DeadGamer333

    I just want fire to only burn for 10 secs unless its on netherrack.
     
  14. Offline

    DeadGamer333

  15. Offline

    filbert66

    Hey, DeadGamer333, I am almost done. Have a hard-coded version just for firecharges for 10 seconds right now. Glad to have reason to pursue some new APIs in Bukkit.

    One last question: when setting afire blocks that burn quickly (like leaves) they can burn up (destroyed block) before the fixed time-out elapses. Do you intend the fixed burn time to disallow block destruction?
     
  16. Offline

    filbert66

    OK, I assumed you wanted blocks to not burn up, so added that to the beta version and made it available here. Right now it's hard-coded as I said above. I will publish something after I add configurability.

    FYI, found a bug in Bukkit and had to submit an Issue and also created a fix for it. Waiting on Bukkit to approve Pull Requests and include in a Bukkit release. Until then, non-flammable blocks (ex. grass) may burn out before the timed period expires.

    Just posted version 2.0 to dev.bukkit. It requires Bukkit development 1.6.4 build 2894 or later. (Yes! Those Bukkit guys are awesome. Approved my PR within hours, and its already in a public build.) It adds configurability of the fire duration controls.

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

Share This Page