[INACTIVE]AutoReloader

Discussion in 'Inactive/Unsupported Plugins' started by Uristqwerty, Jan 23, 2011.

  1. Offline

    Uristqwerty

    I have been wanting to create this for a long time, but Bukkit only recently got the features required to make it.

    What it does is simple:

    Place a furnace on a diamond block.
    Give the block a redstone current.

    Every time the diamond block gets a current change, the furnace will look on all four sides of itself for chests, and react depending on the content's of it's inventory boxes(the ones on the UI in-game) and the type of block below the chest.
    If it finds a chest on an Obsidian block, and it's fuel box is empty, it will get an item from the chest and move it there.
    If it finds a chest on a Lapis Lazuli block, and it's input box is empty, it will get an item from the chest and move it there.
    If it finds a chest on a Gold block, and it's output box is not empty, it will move it's output to the chest.

    Because it can work with double chests, it is possible to make a bit of a production line, where the output of one furnace is used as the input or fuel for another.

    2011-01-23_17.35.52.png
    (Furnace on the right produces charcoal to fuel the furnace on the left)


    The source code is available both in the jar and at https://github.com/Uristqwerty/AutoReloader.


    It contains code that would allow dispensers to load form adjacent chests as well, but it was giving a runtime error (CraftBukket problem? Possibly an incomplete implementation), but it is disabled.

    It probably needs a lot of optimization, but that can wait until later.
     

    Attached Files:

    zhuowei and hash like this.
  2. Offline

    Websterc87

    Hi seems like a fantastic idea. Havent had a chance to test it on my server yet but definately will. Have you though about doing the same thing with crafting. Have an input chest a workbench and an output chest, possible controlling it with a sign saying i want x Iron pickaxes. That way you could make a full production line from smelting through to finished product.

    Using this function with dispensing and collection support from minecart mania or craftbook would be awesome.
     
  3. Offline

    pagangeek

    I've set this up as described above, but can't seem to get it going.
    I'll investigate further and let you know.

    Also, on adding this plugin, HotSwap no longer functions.
     
  4. Offline

    Torrent

    Wow, this seems awesome! :D
    Gonna test this on my private server :p
     
  5. Offline

    pagangeek

    Seems CraftBukkit 140 had a little redstone bug.
    Updating to 141 gets this going again.

    Still breaks and CTD's when using /plugin list from HotSwap though.

    UPDATE:
    Apparently not.
    Redstone clocks don't like it when you leave them alone.
    They tend to bug out and stop working.
     
  6. Offline

    Seth.D

    I suggest you add a lever function to turn the production line on or off. That would be very cool. :D
     
  7. Offline

    Websterc87

    Can you control the blocks under the chests. Diamond block would mean i need to cheat to get the diamonds.
     
  8. Offline

    ledhead900

    Can get permission support for this, it would be great if If we had a command that was needed in order for this to function, for many reasons of course.

    I love this idea now I an make produciton lines in shops and factorys.


    edit:

    Another idea, How about when it finishes making the item instead of it going into a chest for storage it could "if no chest found" deposit the item into a despenser.

    In other words the Despenser becomes the chest for storing finished smelts. thus allow us to run a item collector river trap like a conveyor belt to another part of the factory in a building.
     
  9. Offline

    Websterc87

    @ledhead900 i like your idea about transporting, but how would you stop the item being lost, or is there a plugin that picks up items from the ground and puts it in a chest.
     
  10. Offline

    ledhead900

    Not sure how youl could stop that, you could just create it so a sign next to a chest
    picks up items ?. or maybe make it so if you powerd the furnace with differnent type of circuit it would then spit the items into a despenser behind it.

    for instance your workers have left the building or you have left your shop. you wish to stop production being moved down the line, you simply flick the switch and it moves item into a chest on the Right hand side, while when switch is off it pumps out items behind it into the despenser.

    You could use one of those relay circuits were OFF powers output A and ON powers output B.

    I may have gotten the circuit name wrong tho as I don't play with redstone a lot.

    I will think of post more ways when I come up with them.
     
  11. Offline

    DarkDragon108

    i keep getting an err when i turn on the Circuit

    Jan 27, 2011 4:35:49 PM org.bukkit.plugin.SimplePluginManager callEvent
    SEVERE: Could not pass event REDSTONE_CHANGE to AutoReloader
    java.lang.ArrayIndexOutOfBoundsException: 27
    at org.bukkit.craftbukkit.inventory.CraftInventory.getContents(CraftInve
    ntory.java:38)
    at org.bukkit.craftbukkit.inventory.CraftInventory.getContents(CraftInve
    ntory.java:10)
    at com.bukkit.Uristqwerty.AutoReloader.AutoReloaderBlockListener.furnace
    Update(AutoReloaderBlockListener.java:285)
    at com.bukkit.Uristqwerty.AutoReloader.AutoReloaderBlockListener.updateB
    lock(AutoReloaderBlockListener.java:62)
    at com.bukkit.Uristqwerty.AutoReloader.AutoReloaderBlockListener.onBlock
    RedstoneChange(AutoReloaderBlockListener.java:36)
    at org.bukkit.plugin.java.JavaPluginLoader.callEvent(JavaPluginLoader.ja
    va:193)
     
  12. Offline

    pagangeek

    Just to report, i'm building this with an underfloor redstone circuit, and placing an inverter under the diamond block isn't causing the furnaces to light.
     
  13. Offline

    EvilSeph

  14. Offline

    PrivateAlpha

    @Uristqwerty i see you not on too much, i'd like to take this plugin over if you dont want to continue?

    AutoReloader fixed for #323 here: Download
    PS: this is only a quick fix... no proper testing has been done

    please post any bugs if he doesnt get back to you, i will("",)

     
  15. Offline

    Darkguardsman

    i take it that this plugin in has not been updated for the newest veserson of bukkit
     
  16. Offline

    PrivateAlpha

    updated now(*Should* work with 328+ but i havent tested to yeah)

    Download
     
  17. Offline

    Uristqwerty

    If you want to take over, sure! I do tend to forget to check on things like this, sometimes (and didn't even notice that it ever got any replies at all, thinking it was lost in the massive pile of other plugins).

    One thing to consider is making it more event based, so that it only requires a constant redstone current, and responds to inventory changes in itself and neighbouring chests. Probably more efficient that way. I don't think, however, that furnaces have/will ever have an event for completion, meaning that responding to redstone events might be the only way.
     
  18. Offline

    Triskelli

    PrivateAlpha and Uristqwerty, love the work you guys have done so far. A short request for PrivateAlpha, could you make a separate thread for your contributions to the mod? I know this sounds like you're stealing Urist's thunder, but by having your own thread you could release updates in the OP and show newcomers that this mod is receiving continued support.

    *Request for Mod*

    Can't get away from these though, can we? I'd love to see support for craft-benches too, set to construct specific items based on what is typed into a nearby sign. Coupled with support for dispensers, and if the Movecraft mod ever supports this one, we might be able to create our own mobile cities! Roving across the landscape, consuming entire mountains to feed their infernal engines! Damn, that'd be awesome. [​IMG]
     
  19. Offline

    PrivateAlpha

    Once I update it to a jenkins build & rewrite the whole plugin to support permissions, i'll create a new Thread for this one. As for AutoCrafter... Already working on it =]
    --- merged: Feb 21, 2011 9:32 AM ---
    If i stop being lazy i might just make a custom event and add a trigger to the shedueler. which will trigger every 5 or 10 sec(no need for buggy pulsers then... just redstone and a on/off switch)

    might also make it check if a chunk is loaded before doing the rest(its pointless to do anything because the furnace itself aint working)
    its that or for the chunk to stay loaded until there is nothing left in the input chests

    any ideas?
     
  20. Offline

    Zycro

    Just want to let you know this doesn't work with Bukkit 440. I get "invalid plugin error"
     
  21. Offline

    zwarmapapa

    This version works for me (I use 440)
     
  22. Offline

    PrivateAlpha

    To any who are looking to try this. if you read up i posted a quick fix(dont know if it stills works)

    My total rewrite is almost finished!! =]
     
  23. Offline

    zwarmapapa

    Will that version work on craftbukkit 493?
     
  24. Offline

    PrivateAlpha

    Indeed it will
     
  25. Offline

    zwarmapapa

    Where will the link be when your version is finished?
     
  26. Offline

    Marc8270

    When???
     
  27. Offline

    Kimberly2000

    Can you get your rewrite to do what I have asked for in my request post, without all the fancy blocks/redstone?

    Link to my request: http://forums.bukkit.org/threads/automated-furnaces.8110/#post-123898

    Edit: If it does need some power... seeing that its automated, how about a simple switch/lever for being switch on it works, and off it doesn't.

    Re-Edit: I'm just looking for a quick and easy way of cooking pork without having to do it by hand.
     
  28. Offline

    zwarmapapa


    I like it that you need hard-to-get blocks to make this. Maybe an option to turn it on/off would be ok, or even better, that you can choose the blocks you want yourself :p
     
  29. Offline

    Kimberly2000

    Yes having a config where the Op/Admin could select all the types of blocks that are used for the various tasks would be good.
     
  30. Offline

    zwarmapapa

    Can we get any information on the progress?
     

Share This Page