[MECH] MagicTorches v1.0 - Create Wireless Redstone Torches [BUKKIT DEV]

Discussion in 'Plugin Releases' started by sorklin, Oct 11, 2011.

     
  1. Offline

    sorklin

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    [IMG]

    MagicTorches gives you a way to make wireless redstone torch connections. Each MagicTorch array has one transmitter and any number of receivers. When the transmitter changes its state (to on or off), that change is transmitted to all of the receiver torches.

    See BukkitDev for more information.



    Download here.
    Source here.
    Maintained at BukkitDev.

    Commands
    /mt create <name> [direct|inverse|delay] - Creates a MagicTorch array. Receiver torches selected will be direct (default), inverse, toggle, delay or timer.
    /mt edit <name> - Edit a torch array.
    /mt cancel - Cancels a torch creation or edit.
    /mt finish - Finishes the creation of a MagicTorch array.
    /mt direct - Sets the next receiver torches selected to be direct receivers.
    /mt inverse - Sets the next receiver torches selected to be inverse receivers.
    /mt delay - Sets the next receiver torches selected to be delay receivers.
    /mt delete <name> - Delete the named torch array.
    /mt info <name> - Shows info for the named torch array.
    /mt list - lists torch arrays that you own.
    /mt reload - reloads MagicTorches from the database.

    Permissions
    magictorches.access- allows a user access to many functions of MagicTorches.
    magictorches.create.direct - allows a user to create a direct receiver.
    magictorches.create.inverse - allows a user to create a direct receiver.
    magictorches.create.toggle - allows a user to create an inverse receiver.
    magictorches.create.delay - allows a user to create a delay receiver.
    magictorches.create.timer - allows a user to create a timer receiver.
    magictorches.admin - allows a user to see, edit, list and delete all MagicTorch arrays. Also allows user to reload the MT db and other things.



    Change Log
    v.1.0:
    • So much. Just look at Bukkit dev.

    This post has been edited 10 times. It was last edited by sorklin Mar 6, 2012.
  2.  
  3. Offline

    ALinkToTheFuture

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    i don't suppose there's any way to make it so it doesn't change into a regular torch is there? like maybe make it so you can define what it changes to?
  4. Offline

    sorklin

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    I could, but I probably won't. I would just turn it off if it wasn't such a lag intensive experience to keep cancelling all the physics events that want to turn it back on (and if bukkit didn't fail at actually triggering all the events).

    The choice of regular torch has to do with the fact that the regular torch is attachable (like redstone torches), and so can be anywhere that a redstone torch can be. Restone torches extend that class, so there is an identical underlying structure. Nothing else fits the bill.

    This post has been edited 1 time. It was last edited by sorklin Mar 12, 2012.
  5. Offline

    ALinkToTheFuture

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    not even the off version of the redstone torch? i'm sure you already know that they're technically two different items.
  6. Offline

    sorklin

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Yes, I know they are two different items. :rolleyes:
  7. Offline

    ALinkToTheFuture

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    so couldn't they be used? >.> i'm just spitballing ideas... because torches give off unwanted light... so... ya... i do wonder if it's possible at all.
  8. Offline

    mip6886

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Is there a way that i can set 2 transmitters?
  9. Offline

    sorklin

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    As I said in my earlier post, Redstone_torch_off gets reset every physics cycle to ON, unless there is a power input. The physics event for that could be cancelled, though it would create lag (cause you're checking thousands of physics calls for the all worlds for a match for every receiver before cancelling), and even if you do cancel them all, some physics events aren't raised, so the torch randomly changes to ON anyway.

    Make two arrays. Each array can have only one transmitter for many reasons (logic and practical). You can, however, create two (or more) arrays (with their transmitters) using the same receivers, which produces the same effect. So, for example, Array A (with Transmitter A) and Array B (with Transmitter B) can both have Receiver A be in their arrays. And they can each make Receiver A be a different type. For example, in Array A, Receiver A is a Direct receiver, but in Array B, Receiver A is a Delay Reciever. etc.

    This post has been edited 1 time. It was last edited by sorklin Mar 13, 2012.
  10. Offline

    ALinkToTheFuture

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    ah... ok i understand. oh well :p thanks for explaining
  11. Offline

    DeargFaolchu

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    not sure y but am getting this >16:09:06 [INFO] [MagicTorches] Enabling MagicTorches v1.0.1
    >16:09:06 [INFO] [MagicTorches] Initializing MagicTorches
    >16:09:06 [INFO] [MagicTorches] Loading config
    >16:09:06 [INFO] [MagicTorches] MiniDB found or created. Loading DB
    >>16:09:06 [WARNING] [MagicTorches] NPE on torch: sugarcane
    >>16:09:06 [WARNING] [MagicTorches] NPE on torch: sugarwater
    >>16:09:06 [WARNING] [MagicTorches] NPE on torch: sugarpiston
    >>16:09:06 [WARNING] [MagicTorches] NPE on torch: bridge1
    >>16:09:06 [WARNING] [MagicTorches] NPE on torch: faolchudoor1
    >>16:09:06 [WARNING] [MagicTorches] NPE on torch: shutdownroom
    >>16:09:06 [WARNING] [MagicTorches] NPE on torch: faolchudoor1.2
    >16:09:06 [INFO] [MagicTorches] Loading 0 magictorch arrays.
    >16:09:06 [INFO] [MagicTorches] Initializing commands and events
    >16:09:06 [INFO] [MagicTorches] Plugin initialized
    everytime my server restarts
  12. Offline

    sorklin

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    upgrade to 1.02 and see if you still have the problem.
  13. Offline

    DeargFaolchu

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
  14. Offline

    nm3230

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Awesome plugin! Trying it now!
  15. Offline

    spaztazticii

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    I have a recommendation...can you make it so the a receiver can be these new fangled glowstone lamps? i would like to create a flickering column without extra blocks on the sides.
  16. Offline

    sorklin

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    I'm not sure it would work with the plugin mechanics, but I'll take a look.
  17. Offline

    spaztazticii

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Thank you if anything it would just be nice to change the item that's being toggled...like a lit lamp to an off lamp...since they have different IDs. I don't know much about plugins and their creation but a tad about code and i can't seem to alter any...
  18. Offline

    sorklin

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Okay, I experimented with that, and it suffers from the same issues as redstone torches -- lamps immediately revert to off unless they're receiving active redstone power. Cancelling the physics events doesn't work, because the lamps randomly revert anyway. Sorry, you're going to have to power the lamp from a receiver torch, and just try to hide it as best as you can.
  19. Offline

    spaztazticii

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    aw :( Thanks for trying.
  20. Offline

    Apparentthreat

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
  21. Offline

    sorklin

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Still works just fine. Go to bukkit dev.
  22. Offline

    Psychokiller1888

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Hi! Still getting that NPE since long.

    Multiworld still not supported?
  23. Offline

    sorklin

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    What is your multiworld plugin? I can easily add it to the soft depend if you specify. Currently I support Multiverse and MyWorlds. Tell me what you have and I'll add it to the depend.
  24. Offline

    Psychokiller1888

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    It's MyWorlds from Bergerkiller actually...
  25. Offline

    sorklin

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Can you pastebin your entire log file, from startup to the problem and give me the link?
  26. Offline

    Psychokiller1888

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
  27. Offline

    sorklin

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Okay, I posted 1.0.3 with a revised My Worlds softdepends. Try that (when its approved) and let me know if it works.
  28. Offline

    Psychokiller1888

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Works just fine now, thanks a lot for your efforts!
  29. Offline

    rubdos

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Hey, just installed the plugin. Works well, but I've a question. I used "WirelessRedstone" before. It could have multiple transmitters (a feature that wasn't bug-less, but it did it for us). I quit using it because of the way you had to add receivers (MT does it quite fast, TBH). I'm using WorldEdit to stack several redstone circuits and WiFi redstone will make things go lot smoother. But it's quite annoying to have to rewrite every single sign in a tower of 16 floors with 12 signs on each. Left/right clicking a torch is much faster.

    But I need multiple transmitters on one channel (like an OR gate). Would that be possible to implement?
  30. Offline

    erick107

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    i cant create an array it says missing required arguments
  31. Offline

    sorklin

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    @rubdos
    I have plans for that in the future, but have been writing some other plugins at the moment, which is taking up most of my time. One option a friend did was a have multiple arrays. So the "inputs" would transmit to a hidden circuit (or/nor/xor whatever) and it's output would transmit back. So it was like what you want, but with a bit more work.

    But I do have eventual plan of putting in extra "inputs" in order to create new types of outputs (ie. those that are circuits).

    @erick107
    You'll need to supply the missing parameters.

    (seriously, that was about the most unhelpful request for help I have ever seen. What are you doing and what is the messages? There is /mt help for specific detail of what parameters are needed to do what).
  32. Offline

    rubdos

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    The problem is, I've got several hundreds of inputs in one channel... But just one of them will actually output a on state...

    Can I fork you on github and mess around a bit? ;D
    EDIT: I forked, but I'm a c++ guy, I'd probably mess it up :p

    This post has been edited 1 time. It was last edited by rubdos Jun 26, 2012.

Share This Page