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

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

  1. Offline

    sorklin

    [​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.
     
  2. Offline

    Goldfire

    I love the idea, especially the inverter, but I'm getting trouble whilst trying to start MagicTorches. Running Minecraft 1.8.1 with CraftBukkit 1240. Tried both of the MagicTorches 1240 and 1317 versions. Any ideas?

    Code:
    2011-10-12 05:32:37 [INFO] [MagicTorches] Initializing MagicTorches.
    2011-10-12 05:32:37 [INFO] [MagicTorches] MiniDB found or created. Loading DB.
    2011-10-12 05:32:37 [SEVERE] Error occurred while enabling MagicTorches v0.23 (Is it up to date?): null
    java.lang.NullPointerException
        at sorklin.magictorches.MagicTorches.onEnable(MagicTorches.java:81)
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:126)
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:941)
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:280)
        at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:174)
        at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:157)
        at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:297)
        at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:284)
        at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:152)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:348)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:417)
     
  3. Offline

    sorklin

    Thanks for the report. I fixed this problem and uploaded version 0.24 to the BukkitDev. It may take them a little while to approve the new file, so look for it on the Files tab.
     
    Goldfire likes this.
  4. Offline

    Goldfire

    It works now. The only thing I can suggest is upload a tutorial video for it. Thanks for looking at that for me.
     
  5. Offline

    sorklin

    Yup. Will do. The only really tricky one is 'delay' which was designed to be a torch toggle when you press a button. So the delay part is making sure that the torch only changes state when the button is pressed. I'll do a video soon.
     
    Goldfire likes this.
  6. Offline

    sorklin

    Updated for 1337
     
  7. Offline

    MonsieurApple

  8. Offline

    Ribesg

    This is really needed.
    The ability to add/remove torch for an array, and the ability to change a torch / all torches of an array to direct/inverse.

    Good plugin !
     
  9. Offline

    sorklin

    I've been working on another Plugin (showcasestandalone), but will get back to this soon with editing, iconomy support, etc.
     
  10. Offline

    Profanwolf

    This is brilliant for compacting redstone, thank you for this.
     
  11. Offline

    mastermarty

    This might be a stupid question, but my magictorches don't seem to be saved if I restart the server. Is this normal, or a bug?
     
  12. Offline

    sorklin

    Sounds like a bug. Can you start the server, make a couple of torch arrays, and then stop the server? Then you can give me the server.log and I'll see if there is anything obviously wrong. Make sure you're using the latest version of the plugin (which is for 1.0, but will work for previous versions as well).
     
  13. Offline

    mastermarty

    Here's a log from both before and after I restarted the server. I used the newest version of both the plugin and bukkit.
     

    Attached Files:

  14. Offline

    sorklin

    These are lock files. I need the actual text based log files.
     
  15. Offline

    mastermarty

    Then I take it you mean this file? (I'm new to all this)
     

    Attached Files:

  16. Offline

    sorklin

    That's it. I'll take a look, but I can see right off you're not using the RB for 1.0. You need to update your Craftbukkit to 1.0.1-R1.

    okay, I created a new version that will dump more information when the NPE occurs. Typically, the NPE's are relating to Multiverse not being loaded when the torches are loaded. Are you using some form of multiverse plugin, and if so, what is it?

    Here is the link to the new version. Update your craftbukkit to the Recommended build, install this, and load it up.

    Also create a few torches, then copy the mt.mini file to your desktop - do this before you shut down the server, but after you create the torches. Send both the mt.mini and server log. I should be able to narrow down the problem at that time.

    Here is the link for the new version: http://dl.dropbox.com/u/122940/MagicTorches.jar

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

    mastermarty

    I uploaded the files you asked for. I also made sure I use the right version of craftbukkit and the plugin. But I've got no idea if I use multiverse plugins. I Use pail, worldedit and your plugin, but thats it.

    I also started the server again after that, and I got these errors in the console:
    08:57 AM [INFO] [Pail] Setting up window...
    08:57 AM [INFO] [Pail] Pail 0.7.5 Enabled
    08:57 AM [INFO] Preparing level "World One"
    08:57 AM [INFO] Default game type: 1
    08:57 AM [INFO] Preparing start region for level 0 (Seed: 6300842204296773220)
    08:57 AM [INFO] Preparing start region for level 1 (Seed: 6300842204296773220)
    08:57 AM [INFO] Preparing spawn area: 56%
    08:57 AM [INFO] Preparing start region for level 2 (Seed: 6300842204296773220)
    08:57 AM [INFO] PailPlus v0.2 beta enabled
    08:57 AM [INFO] WorldEdit 4.7 enabled.
    08:57 AM [SEVERE] WorldEdit: Unable to read default configuration: config.yml
    08:57 AM [INFO] WorldEdit: Using the Bukkit Permissions API.
    08:57 AM [INFO] [MagicTorches] Initializing MagicTorches v0.3
    08:57 AM [INFO] [MagicTorches] MiniDB found or created. Loading DB.
    08:57 AM [WARNING] [MagicTorches] NPE on torch: 200. Stack trace:
    08:57 AM [SEVERE] java.lang.NullPointerException
    08:57 AM [SEVERE] at org.bukkit.Location.getBlock(Location.java:81)
    08:57 AM [SEVERE] at sorklin.magictorches.internals.MTorch.torchArrayFromData(MTorch.java:759)
    08:57 AM [SEVERE] at sorklin.magictorches.internals.MTorch.loadFromDB(MTorch.java:640)
    08:57 AM [SEVERE] at sorklin.magictorches.internals.MTorch.reload(MTorch.java:384)
    08:57 AM [SEVERE] at sorklin.magictorches.internals.MTorch.<init>(MTorch.java:58)
    08:57 AM [SEVERE] at sorklin.magictorches.MagicTorches.onEnable(MagicTorches.java:77)
    08:57 AM [SEVERE] at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:188)
    08:57 AM [SEVERE] at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:968)
    08:57 AM [SEVERE] at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:280)
    08:57 AM [SEVERE] at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:186)
    08:57 AM [SEVERE] at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:169)
    08:57 AM [SEVERE] at net.minecraft.server.MinecraftServer.t(MinecraftServer.java:348)
    08:57 AM [SEVERE] at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:335)
    08:57 AM [SEVERE] at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:165)
    08:57 AM [SEVERE] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:399)
    08:57 AM [SEVERE] at net.minecraft.server.ThreadServerApplication.run(SourceFile:457)
    08:57 AM [WARNING] [MagicTorches] NPE on torch: 300. Stack trace:
    08:57 AM [SEVERE] java.lang.NullPointerException
    08:57 AM [SEVERE] at org.bukkit.Location.getBlock(Location.java:81)
    08:57 AM [SEVERE] at sorklin.magictorches.internals.MTorch.torchArrayFromData(MTorch.java:759)
    08:57 AM [SEVERE] at sorklin.magictorches.internals.MTorch.loadFromDB(MTorch.java:640)
    08:57 AM [SEVERE] at sorklin.magictorches.internals.MTorch.reload(MTorch.java:384)
    08:57 AM [SEVERE] at sorklin.magictorches.internals.MTorch.<init>(MTorch.java:58)
    08:57 AM [SEVERE] at sorklin.magictorches.MagicTorches.onEnable(MagicTorches.java:77)
    08:57 AM [SEVERE] at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:188)
    08:57 AM [SEVERE] at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:968)
    08:57 AM [SEVERE] at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:280)
    08:57 AM [SEVERE] at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:186)
    08:57 AM [SEVERE] at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:169)
    08:57 AM [SEVERE] at net.minecraft.server.MinecraftServer.t(MinecraftServer.java:348)
    08:57 AM [SEVERE] at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:335)
    08:57 AM [SEVERE] at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:165)
    08:57 AM [SEVERE] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:399)
    08:57 AM [SEVERE] at net.minecraft.server.ThreadServerApplication.run(SourceFile:457)
    08:57 AM [INFO] [MagicTorches] Loaded 0 magictorch arrays.
    08:57 AM [INFO] [MagicTorches] Plugin initialized.
    08:57 AM [INFO] Server permissions file permissions.yml is empty, ignoring it
    08:57 AM [INFO] Done (0,242s)! For help, type "help" or "?"
    08:57 AM [INFO] MAS73R [/77.250.84.6:62999] logged in with entity id 44 at ([World One] 79.0625, 110.71875, -102.3125)
    08:57 AM [INFO] MAS73R lost connection: disconnect.quitting
    08:57 AM [INFO] Connection reset
     

    Attached Files:

  18. Offline

    sorklin

    This is good. I'm guessing the problem is that you have a World name with a space in it (not a great idea), but I'll double check that, and create a fix for you.
     
  19. Offline

    fulloflava

    wow cool plugin i like it when its wireless its simple but awesome :)
     
  20. Offline

    convictedsaint

    Great plugin ive been using it for months. But one question.
    Is there any way to be able to use off-redstone torches instead of regular torches for off-state?
     
  21. Offline

    dans

    So far I've got nothing to say about this plugin other then it's AWESOME!

    Really makes some of the more complicated manipulation of wire so much easier!

    A HUGE Thankyou for this plugin! (Running Bukkit 1.0.1 and working great!)

    Only thing I could think to add is a command to view the list of used names, so I can remember all the names of the connections I've built!
     
  22. Offline

    sorklin

    I'm working on a dev branch that will have full paged name listing, array editing, etc.

    Unfortunately, bukkit/mc randomly updates the torch state without throwing an event, which means that unlit redstone torches will randomly flip back on with no way to cancel it.

    New version (0.31) just uploaded to bukkitdev. This fixes torch loading on worlds with a space in its name. You may need to wait a bit for the download link to become available (bukkit dev mods manually approve the file).

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

    convictedsaint

    That's understandable as it is out of your control. Probably for the better.
    Amazing plugin anyway! Thanks!
     
  24. Offline

    mastermarty

    It worked like a charm! Thanks for the fix, It's really apriciated. I can finally use this awesome plugin.
     
  25. Offline

    sorklin

    Well it does allow for cool things like toggle lights.
     
    mastermarty likes this.
  26. Offline

    Avous

    @sorklin I may make you a video of me using this plugin :p Might be fun to make a multi account four digit pin with this system hooked up to a automated bank(and way easier) the normal way I know it and the extreme simplicity of using your way over the bulkiness of the normal way.
     
  27. Offline

    sorklin

    Cool!
     
  28. Offline

    Fortunis

    Great plugin but please hurry with the editting of an already created array please. It would make this plugin much more user friendly.

    Also make '/mt' the same as '/mt help'. If this aint doable for some reason then maybe '/mt ?' will do
     
  29. Offline

    8_year_old

    Looks amazing. I might end up using this on my server.
     
  30. Offline

    sorklin

    Just an fyi, I'm in the middle of a ground up rewrite that will enable torch array editing, new torches, etc. Sorry for the delays.
     

Share This Page