Inactive [FIX/MECH]LavaForge 1.0.0 - Returns buckets when lava is used in a furnace [1.1-R6]

Discussion in 'Inactive/Unsupported Plugins' started by zonedabone, Jun 21, 2011.

  1. Offline

    zonedabone

    LavaForge - Returns buckets when lava is used in a furnace :
    Version: v1.0.0

    LavaForge is a very simple plugin that returns buckets when lava is used in a furnace. There's no magic chest to put next to the furnace, and no special commands to run. Simple put the lava bucket in the fuel slot. It will be emptied for fuel and an empty bucket will be replaced in the fuel slot to be picked up.

    Note: This is NOT compatible with any previous recommended builds. (860,8118, etc.)

    Features:
    • Replaces buckets when lava is used in furnaces
    • Plain and simple.
    Download LavaForge (wget ready)
    Source Code


    Note: This plugin is very simple and therefore will almost certainly not break with new bukkit builds. If I'm a bit late updating to RB don't be discouraged from using it.

    Changelog:
    Version 1.0.0
    • Initial release.
     
    moselekm, ItsQ, Garloth and 2 others like this.
  2. Offline

    shadrxninga

    Instead of having 2 categories in separate brackets. Just put them in the sam brackets with a / between the categories. Like this [FIX/MECH]
     
  3. Offline

    Avous

    @zonedabone

    thank you! I've wanted this for a long long time. every plugin i find makes it needlessly complicated to spit out a bucket when i fuel up the forge.
     
  4. Offline

    zonedabone

    These new methods available in #901 will also let me implement another great little feature that everyone wishes was there, keeping chunks loaded with furnaces on them! With a bit of work, it may even work through server restarts.
     
  5. Offline

    Avous

    im worried about using up a ton of system resources like that :p
     
  6. Offline

    zonedabone

    Well, it wouldn't use that much, and it wouldn't be part of this plugin. The plan would be for it to keep chunks loaded if they have ACTIVE furnaces in them. They would then be unloaded as soon as the furnaces were done
     
  7. Offline

    Plague

    since you need 901+ I released this, but please update to latest RB in the title ASAP when it come out.
     
  8. Offline

    zonedabone

    Will do. Thanks for letting into circulation pre-release.
     
  9. Offline

    WaterFalcon

    YAY finally! thank you:D
     
  10. Offline

    Sorken

    @zonedabone
    Plugin does not seem to report loading upon startup/reload. Would you mind adding a line saying LavaForge vVer has loaded. that way i can "cat server.log | grep LavaForge" to see what version im using at the moment and at the same time know if im up to date.
     
  11. Offline

    Telgar

    I have a question about your source. What is the benefit to scheduling a task to put a bucket in the furnace rather than just doing so?
    Code:
    public void onFurnaceBurn(FurnaceBurnEvent e){
            if(e.getFuel().getType()==Material.LAVA_BUCKET){
                final Block furnace = e.getFurnace();
                plugin.getServer().getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() {
                    public void run() {
                        Furnace furn = (Furnace) furnace.getState();
                        furn.getInventory().setItem(1, new ItemStack(Material.BUCKET, 1));
                    }
                }, 0L);
            }
        }
    Why couldnt you just do
    Code:
    if(e.getFuel().getType()==Material.LAVA_BUCKET){
                final Block furnace = e.getFurnace();
                        Furnace furn = (Furnace) furnace.getState();
                        furn.getInventory().setItem(1, new ItemStack(Material.BUCKET, 1));
            }
    I am the less experienced one here, so I am legitimately asking what the benefit is.
     
  12. Offline

    zonedabone

    Ahah! Glad to see someone took advantage of that link! Here's how it works right now:

    MC decides to burn fuel with lava in fuel slot.
    Bukkit triggers FurnaceBurnEvent
    My plugin intercepts the event and schedules the replacement of the slot with a bucket. At this point the fuel has not been consumed yet.
    MC takes the event returns and burns the fuel. The fuel slot has now been emptied and the fueling has actually taken place.
    Bukkit now handles all scheduled tasks for this tick. My task runs and the fuel is now refilled. Success.

    Basically, if I replaced the fuel during the event, MC would find an empty bucket and the fuel would no longer be suitable for use. In theory, the modified method wouldn't work, but I never tested it, so if you'd like to test it and it works, I'll be glad to change the code, or if you'd like some Git practice, you can submit a pull request to my repository if it works.

    Thanks in advance if you find that this does in fact work, because it would reduce overhead and therefore my lightweight plugin would become even more light weight.
     
  13. Offline

    Telgar

    Hmm neat I did test it, and you're right; the lava bucket is instantly replaced by an empty one. I had forgotten that bukkit event handling occurs before the event actually happens. Thanks for the thorough explanation, it was very helpful!
     
  14. Offline

    sfxworks

    Update for build 1k?
     
  15. Offline

    zonedabone

    It should work fine. I updated the title to make this more clear. If there are problems please tell me.
     
  16. Offline

    ItsQ

    Nice ! Thanks! Works great!
    :D[diamond]
     
  17. Offline

    MasterMeNL

    Thanks a lot!
     
  18. Offline

    RedAlex

    CB #1240
    2011-10-07 00:38:27 [INFO] Attempted to place a tile entity (net.minecraft.server.TileEntityFurnace@dc04d82) at 0,51,10 (STONE) where there was no entity tile!
    2011-10-07 00:38:30 [INFO] Attempted to place a tile entity (net.minecraft.server.TileEntityFurnace@5e094434) at 0,51,11 (STONE) where there was no entity tile!
    2011-10-07 00:38:34 [INFO] Attempted to place a tile entity (net.minecraft.server.TileEntityFurnace@78b920d7) at 0,51,12 (STONE) where there was no entity tile!
    2011-10-07 00:38:36 [INFO] Attempted to place a tile entity (net.minecraft.server.TileEntityFurnace@228d2cc3) at 0,51,13 (STONE) where there was no entity tile!
    2011-10-07 00:38:41 [INFO] Attempted to place a tile entity (net.minecraft.server.TileEntityFurnace@75e178dd) at 0,51,14 (STONE) where there was no entity tile!
    2011-10-07 00:38:46 [INFO] Attempted to place a tile entity (net.minecraft.server.TileEntityFurnace@26f4d812) at 1,51,14 (STONE) where there was no entity tile!
    2011-10-07 00:38:51 [INFO] Attempted to place a tile entity (net.minecraft.server.TileEntityFurnace@58240de9) at 1,51,13 (STONE) where there was no entity tile!
    2011-10-07 00:38:54 [INFO] Attempted to place a tile entity (net.minecraft.server.TileEntityFurnace@1b2f3b34) at 1,51,12 (STONE) where there was no entity tile!
    2011-10-07 00:38:57 [INFO] Attempted to place a tile entity (net.minecraft.server.TileEntityFurnace@74aa24e3) at 1,51,11 (STONE) where there was no entity tile!
    2011-10-07 00:39:01 [INFO] Attempted to place a tile entity (net.minecraft.server.TileEntityFurnace@28a6dbb8) at 1,51,10 (STONE) where there was no entity tile!
     
  19. Offline

    zonedabone

    Do you have a context? What happened when this error occurred.
     
  20. Offline

    RedAlex

    All time furnace have one buket of lave in, and he start burn.
     
  21. Offline

    zonedabone

    Are you sure that's the entire error?
     
  22. Offline

    RedAlex

    Yes i'm sure
     
  23. Offline

    Celeixen

    I am surprised how much people love simple plugins. Good job :p
     
  24. Offline

    zonedabone

    Is anyone else having this error? What build is it on?
     
  25. Offline

    RugRats

    I'm getting that on 1337
     
  26. Offline

    Avous

    @zonedabone

    Do you plan to move this over to BukkitDev? (I still actively use it)
     
  27. Offline

    zonedabone

    I don't really have time to do very much maintenance on my public plugins. For now I'll keep it here. If Bukkit stops supporting the forums system I'll move it. The system should continue to work through cb updates because of the way it's coded.
     
  28. Offline

    Tomab

    Though there are other plugins that do this same thing, I'm going to use this one as it doesn't seem needlessly bloated. The same type of plugin I would sit down and write. Thank you for saving all server admins the time by writing this handy little plugin.
     
  29. Offline

    zonedabone

    Thanks! =D
     
  30. Offline

    Phil3004

    Thank you works great :)
    Too bad Mojang is just too "busy" fixing it.
     

Share This Page