Inactive [MECH] DwarfForge v 2.13 Run Furnaces on Lava [1.3.1-R1]

Discussion in 'Inactive/Unsupported Plugins' started by Don Redhorse, Dec 7, 2011.

  1. Offline

    Don Redhorse

    This is the continutation of the DwarfForge Plugin from mattmoss.

    NOTE: This plugin is coded against the net.minecraft code, so it could be that this plugin will break with every new version of minecraft code. I will try to update as soon as possible to any RB of CB which comes out but not to any interim version if this plugin breaks.

    The Dwarfs learned long ago how to manipulate lava to their will. By building their furnaces directly above lava, they can smelt metals and bake goods for a long time without hauling buckets about.

    Now, you can too. Build your furnace directly above a lava block, then punch the furnace to ignite it. Punch it again to douse the flames. No fuel/buckets needed!

    There is a minimal configuration file; the plugin will automatically generate a default config.yml file if none is present. Just drop the JAR into your plugins folder and reload.

    Comments, bug reports and ideas welcome! I prefer you add issues to the Github page (see source code link below), so I may track what is going on. Thanks!

    Download: dev.bukkit

    Old Version: DwarfForge 2.0
    Source Code: On GitHub


    Features:

    • Runs forever! No fuel/buckets needed.
    • However, Forges can be required to operate with fuel, which is pulled from the input chest along with raw materials.
    • Punching the furnace toggles it on/off.
    • Dwarf Forges stack vertically. Lava only necessary under the lowest forge. (Lava is powerful, man!) Stacked forges can all access the same set of input/output chests.
    • Input and output chests (left and right of forge, respectively, when facing it) supported. Double-size chests also supported. Additionally, you can "stack" horizontally to access nearby chests.
    • Stacking limits are configurable (defaults: 3 high, 1 wide).
    • Can change the cooking time: warp speed!
    • Blocks in a short, 3-block radius from any Dwarf Forge are protected against fire from lava.
    • Supports SuperPerms
    Demonstration:




    Configuration / Updating:

    IF you ran an old version you need to rename or delete the old config! Sorry.. last time.. promissed..


    Take a look at the automatically created config.yml file.


    Permissions:
    Show Spoiler
    Code:
        dwarfforge.create - Can create Dwarf Forges
        dwarfforge.use - Can use (i.e. switch on/off) Dwarf Forges
        dwarfforge.destroy - Can destroy Dwarf Forges
    


    Change Log: (click here for older history)

    • v 2.13
      • updated to CB 1.3.1-R1
    • inbetween... no idea atm..
    • v 2.5
      • Added new event system, ready for R5
    • v 2.4
      • fixed blaze rod being proper fuel not custom
      • Recompiled against R4, but WITHOUT new event system so works on older builds
    • v 2.3
      • fixed lava exploid below
      • added blaze rod as custom fuel
    • v 2.2
      • compiled against 1572
      • fixed minor bug, thanks mattmoss
    • v 2.0 (First version from me)
      • Recompiled against 1337
      • Some minor refactoring
    • v1.7
      • Changed fuel loading behavior to load only one item at a time for increased parallelism with less user hassle.
    Known Issues:
    • It is possible for a player without 'create' permission to create a Dwarf Forge by placing the furnace first, then placing lava nearby and allowing it to flow under the furnace.
    • At the moment, there is only one adjustable cooking time which affects all cookable objects.
    • Cooking time, I suspect, has a maximum of 9.25 seconds (approx. the Minecraft default).
    • There seems to be some lighting issue with DwarfForge under Minecraft 1.8 (Craftbukkit RB 1185) where the chests "go dark" when forges are extinguished. Functionality is unbroken: the chests still work. Only the appearance is possibly broken.
    ToDo:

    • Keeping it updated
    • Fixing bugs
    • Don't know
     
    marti.2001, bobbysmithyy and lastern like this.
  2. Offline

    twrntg

    cool!, does it work with 1.0.0 builds at all?
     
  3. Offline

    Don Redhorse

    haven't tested yet, that will be next..
     
  4. Offline

    TheLimaBeanman

    Need help with Testing? I am resting from coding so I have lots of free time!
     
  5. Offline

    Don Redhorse

    sure be my guest... just try it... I will update the OP with a note... and I'm downloading the current cb to compile against it.
     
  6. Offline

    TheLimaBeanman

    I think it works Great.
     
  7. Offline

    mattmoss

    D.R., thanks for taking over the project. I took a quick look over at your github; looks like things are in good hands.

    The reason for the net.minecraft code... Once upon a time, changing a block from an unlit furnace to a lit furnace using Bukkit API caused the furnace to belch out its inventory. It was damned annoying. I wrote Bukkit code to juggle inventory (1. save contents of furnace; 2. empty furnace; 3. toggle furnace; 4. restore contents of furnace), which seemed to work but I always wondered if there were hidden bugs in there.

    The net.minecraft code was much simpler, and I always figured that it would be a quick fix if it broke. There isn't an absolute necessity for it, though... I can find and point out to you the old code I had for doing that.
     
  8. Offline

    Don Redhorse

    would be nice, thanks for pointing the bug out... but I think you also need the net.minecraft code for the FurnaceRecipies... I didn't find anything similar in cb..

    btw: fixed a minor bug, recompiled against 1572.. Version 2.2

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

    mattmoss

    The on/off toggle via punching old implementation: in function onBlockDamange, lines 27-54.

    I had forgotten about the FurnaceRecipies, which also is much simpler than it originally was.
     
  10. Offline

    Fixatec

    Love the plugin, Would be awesome to add Minecart with chest support.

    Imagine asking your friend to roll in some raw materials <3
     
  11. Offline

    noahwhygodwhy

    all i have to say is i'm downloading, looks good
     
  12. Offline

    Don Redhorse

    works with 1597
     
  13. Offline

    md_5

    Unfortunately you can only have one rb in your title.
    You can fix the create permission bug by only allowing them to be powered by lava sources.
    Great idea!
    /me downloads
     
  14. Offline

    Don Redhorse

    Fixed...
    well Idea isn't mine... but I liked it so I keep the plugin working.
    what do you mean with create permission bug?
     
  15. Offline

    md_5

    Known Issues:

    • It is possible for a player without 'create' permission to create a Dwarf Forge by placing the furnace first, then placing lava nearby and allowing it to flow under the furnace.

    Approved btw.
     
  16. Offline

    Don Redhorse

    ah, that one.. well I need to check the code a little bit more, atm there is not concept of an owner, adding that would fix that issue and also some other stuff. we will see..

    thanks ..
     
  17. Offline

    md_5

    At the moment you can create a forge with out permission by flowig lava under a furnace.
    Simply change lava to only use stationary_lava
     
  18. Offline

    Don Redhorse

  19. Offline

    teegee543

  20. Offline

    Don Redhorse

    that is because you are using and old config file... I forgot to put some info up on how to update... sorry..
     
  21. Offline

    Maxxgold

    I want to be able to restrict access to this so only the groups that have permissions can use it. Right now anyone can use it
     
  22. Offline

    Don Redhorse

  23. REQ: Add support for blaze rod as fuel.
     
  24. Offline

    Don Redhorse

  25. Offline

    Zedarion

    Request: Please add an option in the config to disable the furnace running forever.

    I like the idea of input and output chests but unlimited furnace fuel isn't great for survival servers. So please add the option, thanks.
     
  26. Offline

    Don Redhorse

    # Set to true to require fuel (coal, wood, etc.) in the input chest.
    # The forge will continue to automate un/loading of goods and fuel.
    require-fuel: false


    in the config
     
  27. Offline

    treepunch

    Many apologies in advance if you are already aware of this issue, or if it has already been reported here or on BukkitDev and I just missed it, but using your Dwarf Forge v 2.2 on the latest RB seems to throw this error every once and awhile:

    Code:
    [WARNING] Task of 'DwarfForge' generated an exception
    java.lang.ClassCastException: org.bukkit.craftbukkit.block.CraftBlockState cannot be cast to org.bukkit.block.Furnace
            at org.simiancage.bukkit.DwarfForge.Forge.douse(Forge.java:149)
            at org.simiancage.bukkit.DwarfForge.Forge.update(Forge.java:346)
            at org.simiancage.bukkit.DwarfForge.Forge.run(Forge.java:368)
            at org.bukkit.craftbukkit.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:137)
            at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:502)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:434)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:465)
    It doesn't seem to be messing anything up and forges seem to work as normal. Just shows up in the console every once and awhile.

    You are awesome!
     
  28. Offline

    Don Redhorse

    hmm... thanks for the headsup... will need to check this, any idea when it happens?


    and thanks
     
  29. Offline

    treepunch

    I've only been able to catch it in console and have been asking my players what they were doing but I still don't really know. Will try to reproduce it myself later tonight when I get home from work. Thanks for the quick response!
     

Share This Page