[FUN/MECH] Lava Furnace - Furnaces that run on lava [BUKITDEV]

Discussion in 'Archived: Plugin Releases' started by Arcwolf, May 30, 2011.

  1. Offline

    Arcwolf

    Lava Furnace - Furnaces that run on lava:

    The basic idea of this plugin is to allow players to create a furnace that will run on lava but not consume buckets. It allows for customization by admins for fuel burn time, cook time, per player cook times and amount of furnaces per player. It is by default pretty balanced, but is customizable by admins for personal preference in balancing or even cheating if you so choose.

    Features:
    • User created Furnaces that consume only the lava not the bucket
    • Also can be used with regular fuel sources through the Minecraft furnace interface.
    • Potential to create infinitely fueled furnaces via config file
    • Can set furnace burn times up to 2147483647 via config
    • Can set furnace cook times from 1 to 4 x normal speed via config
    • Can define the blocks a furnace is created from via config
    • Works with multi-worlds
    • Permissions via PermissionsEX, GroupManager, nijikokun based permissions, bukkit permissions or OPs
    • Lava level is easily viewable through glass door and changes with burn time of furnace
    • Optional small or large Production Chests (*based on Zarius's idea)
    • Optional Custom Smelt-ables via config
    • Production chest smelt priority from TOP LEFT to BOTTOM RIGHT
    • Per user cook times, per item cook times from 1 to 4 x normal speed via commands
    • Per player group build limits
    Tutorial Video & Review (by ValBGaming)

    Production Chest Photo:
    [​IMG]
    Alternate Chest Setup (open)

    [​IMG]

    Alternate Furnace Layouts (open)

    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]

    And you could just keep going with it.


    [​IMG] if you like this plugin and want to support me. Its much appreciated. :)
     
  2. Offline

    dak393

    Very cool! Will defiantly be using this :)
     
  3. Offline

    woodzy

    maby just maby if u add large chest suppert it could work plus extra lazy ness lol.
    with the conflict i noticed it still falsebook still works BUT wont interact with your chests
     
  4. Offline

    Arcwolf

    I kind of doubt adding large chests would fix the problem. Since I would be doing the same thing behind the scenes just with 2 blocks instead of the 1 I am working with right now. Is there really that much demand for some kind of factory style production chests... Good grief people, its a LAVAFURNACE... not a LAVA FOUNDRY! lol
     
  5. Offline

    woodzy

    @Arcwolf
    lol LAVA FOUNDRY why not i say!
    maby if u have it put it al the top of a large chest? thats were falsebook puts stuff
     
  6. Offline

    Arcwolf

    Just out of curiosity, what happens if you use large chests. True I dont utilize the extra capacity but you can still see the inventory from the first chest from the other chest. I dont access or modify the second chest inventory. Have you tried just placing double chests and trying to do what you want to do with falsebook? Only with the farthest chest blocks?
     
  7. Offline

    woodzy

     
  8. Offline

    Arcwolf

    Um... sorry that post was a little confused? I'm not exactly sure what you are trying to say. If you are asking whether or not LavaFurnace accesses the top part of the chests. Then the answer is no. I do not. Neither the supply chest nor the processed chest mess with the top half of the inventory screen when you use a large chest. However, the bottom half I remove items from supply by checking for smeltable items. The processed chest I look for empty space or an identical item and increment that item by the value of the amount of smelted item. Other then that there isnt much to a production chest cycle.

    Cycle looks like this,

    Check if furnace is not full, if it isnt, take items from the supply chest till 64 of that item is in the furnace. Check if furnace has finished smelting items. If it has check if there is empty space or a small stack of the smelted item. Increment chest stack or add new stack. Delete furnace smelt inventory slot.

    Thats it.
     
  9. Offline

    woodzy

    maby you could have t check the hold large chest?
     
  10. Offline

    Arcwolf

    I've just completed adding large chests.. and am testing now. I'll post another beta shortly after I test to make sure I didnt botch something :p

    --edit--

    hmm, found a pre-existing bug I think... thats going to delay things a little bit...

    OK! :)

    New beta update, changes include possible fix for Joy's mcMMO conflict. Added debug level 6, ability to set furnace burn time to 2147483647. Added the ability to use Large chests... Fixed a debugging message that I forgot to remove in 1.2b

    Check it out post bugs. Thanks to all who test!

    --file removed--

    How about this:

    I just finished removing a bug I noticed in the latest beta version having to do with production chests and figured I'd add in cook time variable.

    In the config you can now choose from 1 to 4x as fast cook times. AND, it only works if you havent stuffed the furnace with coal. The moment it detects coal or some other fuel in the lava furnace fuel slot, it switches to normal 1x speed.

    How does that sound?

    Test is out, I have the cook test loop kind of tight but I dont think it should effect performance... duno needs testing. Its only checking built lavafurnaces and setting their cook times ahead by what ever was in the config. So no HUGE loop or anything. In fact its less then 30 lines of code...

    --file removed--

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

    James Lawrence

    just thought I'd throw it out there, I'm using the default config that came with the 1.3beta you have there, except I turned on the production chests. that's the only change I made to it. According to an above post, the default 102400 time should be equal to a stack of coal right? 8 stacks? 512 smelts?

    I filled the tank 1 time, and I'm currently at 11 stacks smelted so far, I'll keep an eye on it see how far it gets. I double checked the config to make sure infinite wasn't on and it's not.

    Edit: Well it finally finished at 851 smelts... bit more then 512 lol
     
  12. Offline

    Arcwolf

    hmmm, interesting... I guess it needs a little more balance to that number then hmm. Maybe do to tick drift though. I am not exactly sure how to compensate for that. Well, anyway, thats what testing is for :) about where do you think that number should be... if 102400 is too much, then Hmmmm... I'm thinking around 60,000 or so?
     
  13. Offline

    James Lawrence

    I'll try different #'s and get maybe a reference thing going, I'll do 50,000 75,000 100,000 with how many blocks I get from them and post for others to reference.
     
  14. Offline

    Arcwolf

    Thanks, it will help me figure out the ratio I need to use. Much appreciated.
     
  15. Offline

    woodzy

    @Arcwolf lavafurance foundry!!!
    "We make iron, gold, stone, glass, Ectoplasum, tools, bukkits, tables, chairs, walls, and more!!!
    2011-06-26_21.24.23.png
     
  16. Offline

    James Lawrence


    Tested 50,000 twice got 338 smelts each time.

    if I divide that... I get 147.93 per smelt... so if I use that, 75740 should be 512 or really really close to it... I'll try that # out and test it.

    EDIT: Well that didn't work out right... came out to be 594 so it doesn't multiply exactly...

    I guess I'll try 75,000 even see if it shaves off that little extra
     
  17. Offline

    Arcwolf

    Ok, then I'll start messing with 75000 and work from there. If I get the little formula right you should be able to use 102400 and it will give you the correct amount.

    Thanks for the help! :)


    JEEZUS! :eek: I had no idea... Well, I'm glad its getting used then... wow...
     
  18. Offline

    James Lawrence

    well found something

    If you use Essentials, there is an option to set the ops names to a color when you /list

    if this is set, the prints the ops name in the data file WITH the color codes. This causes the furnace to not work because his name doesn't match. example: &cPLAYER&f is on the data file but in game it's just PLAYER so it won't work. I had to disable the colored names for my ops guys so they could use the furnaces.
     
  19. Offline

    Arcwolf

    Thats strange because if they are an OP then they are considered admins by the plugin. Which means they dont need permissions to use anyone elses furnace. OP's have admin permissions. Secondly, I have two options to check for names, 1) getplayer().getname() or 2) getplayer().getDisplayName() I'm using getname() I guess I could use both but I am under the impression that display names can be changed ie(with color) while getname is the login name? I can put in both but I dont know if that will solve the problem.

    So, its on the todo list.
     
  20. Offline

    James Lawrence

    yeah the OP thing is what confused me, he's ops and couldn't even use his own furnace ? lol it's no big deal I only have 1 OP player so I turned off the color thing and it started working just fine. So it was definitely the get name part.



    EDIT: AND! I set my time to 70,000 and I got 8 stacks with only 24 extra so very very close
     
  21. Offline

    Arcwolf


    The other thing is, I dont check the players name to get ops permissions. I ask the server, getPlayer().isOp() so the server said NO he is not an op regardless of his name. Meaning not even the server believed he was an op. I am curious if you would have placed &cPLAYER&f in OPS.txt if it would have accepted him as an op then... just a thought.

    Ok, heres the low down on this version. I fixed a bug or two I noticed in furnaces with max burn time set ie 32767.

    And I went ahead and reworked the furnace governor. Instead of taking control and counting my self, I sort of listen to the burn time on the furnace and base my formula off that. So no matter what there should be no drift. It should be exactly as if the furnace was able to naturally work above 32767. My tests show it counts down exactly. Even if you have cant keep up notices there shouldnt be any drift. Which was a major problem with my previous counter. It would drift wildly depending on how much the server couldnt keep up.

    Give it a test see how that works. I'm pretty confident that 102400 is correct now. If all goes well, this should be the release version.

    --file removed---

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

    woodzy

    @Arcwolf i know ur working hard on this addon/plugin but have u had a chance to look at the dubble chests?
     
  23. Offline

    Arcwolf

    double chests should be working correctly in the latest beta.. have you tried them out. They need to be enabled in the config... or do they not work after you enable them.

    Config must be deleted to see the new options in the config FYI :)
     
  24. Offline

    woodzy

    ok i did all of that i enabled it in the config made a fresh furnace tryed the dubble chests 2 diffrent ways and still didnt work i downloaded the
    LavaFurnace13beta.zip

    version. were a LIVE test server so were used to it we can add/remove plugins on the fly!! no need to restart here!
    EDIT: this small update made my repair block from MCMMO stop working
     
  25. Offline

    Xordaii

    Can we see your config? What parts don't work? Pulling from chest and processing, a user accessing it, just didn't successfully create? What did you expect to happen and what happened instead?
     
  26. Offline

    Arcwolf

    Xordaii's post poses some very good questions. However, if you are having so many conflicts I'm not really sure there is much I can do for you. I cant make my plugin play nice with everything. There are just things I have to do behind the scenes to make a furnace work correctly that some other plugins just wont like. If I have to keep making my plugin dodge around another plugins functions then things are going to get messy quick.

    In any case I've tested those double chests several times now. They do appear to work as expected on my test server. None the less, I will keep testing for a while more to see if I've missed something.

    Please do respond with the information Xordaii asked. I'm asking those same questions :)

    Thanks.
     
  27. Offline

    woodzy

    @Arcwolf the Mcmmo was my falt it turns out lol
    it takes from the top half of the dubble chests but not the botton half
     
  28. Offline

    Jazy Lopez

    The permissions don't seem to be working correctly (Specifically the player fuel and player use ones) Even though the person has the permissions (All the ones with player) they cant open the furnace and when they try to fuel it it says it evaporates... Until I give them the admin use/fuel... Please fix it as it seems like a simple mistake in the code
    Great Plugin (Tested your beta and works perfectly with the permissions exception)
    :D
     
  29. Offline

    Arcwolf

    Make sure capitalization of the permissions nodes are correct.. LavaFurnace and lavafurnace are different.

    I've fixed this in my working beta. Caps have been a problem for a while now. I've rectified it.

    NO CAPS!​
    [​IMG]
    lol!
     
    Xordaii likes this.
  30. Offline

    Jazy Lopez

    ^^LOL
    Wait so they are NOT supposed to be caped?... So LavaFurnace is wrong? (Like I said the LavaFurnace.admin.fuel works fine its the LavaFurnace.player.fuel that seems to be broken >_>
     
  31. Offline

    Arcwolf

    hmm, no, right now Caps for the currently available beta version are not removed. See what happens if you use a Debug level of 4. You should receive some information in the log about the permissions that the user has and why it didnt work.

    I just tested the player permissions and LavaFurnace.player.* seemed to work ok for me. I'll try the others shortly.

    Also, I looked at the permissions I've coded in, there shouldnt be anything preventing you from using LavaFurnace.player.fuel or LavaFurnace.player.use

    They are correct in the code. Double checked...

    --edit--

    just tried
    - lavafurnace.player.build
    - lavafurnace.player.destroy
    - lavafurnace.player.fuel
    - lavafurnace.player.use

    those all seem to work ok. I didnt really change much in the way of permissions though. Just the caps and add in some () I forgot. But those would not affect the way permissions were working. The problem would have allowed anyone with permission for player or admin to edit and use anyones furnace. I think I introduced that bug when I added in the check for displaynames... its easy to misscount () when you have ((((())))) lol

    Ok, here is the updated beta I'm using.

    I changed the permissions nodes. LavaFurnace should be lavafurnace in the nodes now. Too many people having caps issues. It was just a general bad idea for the caps anyway. Also, fixed a small bug in the lava block powering of a furnace. Forgot to clear the furnace inventory when I switched it to fueled. Caused it to spit out its contents and mess up the inventory. OOps :)

    Code:
    lavafurnace.admin.maxForgeOverride         <- overrides the max forge limit for admin or player
    
    lavafurnace.player.build                   <- Can build lava furnace
    lavafurnace.admin.build                    <- Can build lava furnace
    
    lavafurnace.admin.fuel                     <- can fuel any lava furnace...
    lavafurnace.player.fuel                    <- can fuel only their own lava furnace...
    
    lavafurnace.admin.lavablockfuel            <- can fuel any lava furnace...
    lavafurnace.player.lavablockfuel           <- can fuel only their own lava furnace...
    
    lavafurnace.admin.destroy                  <- can destroy any lava furnace...
    lavafurnace.player.destroy                 <- can only destroy their own lava furnace...
    
    lavafurnace.admin.use                      <- can use any lava furnace
    lavafurnace.player.use                     <- can only use a lava furnace they create
    
    lavafurnace.chest                          <- can place production chests limited by config
    --file removed--

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

Share This Page