Inactive [MECH] ControllerBlock v1.18 - Toggle blocks on/off with redstone [740]

Discussion in 'Inactive/Unsupported Plugins' started by Hell_Fire, Jan 24, 2011.

  1. Offline

    Hell_Fire

    ControllerBlock - Toggle blocks on and off with redstone

    I've stopped work on this plugin due to other work, please see Zero9195s continuation of this plugin here: http://forums.bukkit.org/threads/34394/

    Pretty simple, there was a version of this for hmod, so the inspiration comes from that.

    Iron blocks can be turned into controller blocks. Drop the block down, drop a redstone wire or torch on top, switch to the type of block you want to toggle and smack the iron block with it. (Can remove redstone on top after it's been set as a ControllerBlock).

    Place those blocks down where you want them to be, you can work from multiple piles of it, where it is in the inventory doesn't matter, as long as you place the block of that type.

    Once you're done placing blocks, wack the iron block again and it'll save the block locations and ready to go. Power the block they'll appear, remove the power and they'll disappear again. Invert the control with a redstone torch on top of the block. To remove the binding, just remove the block.

    Source is included in the .jar file in case I disappear. Tested on my local server but other than that, not much else. Sure you guys will find me bugs :)

    A smallish howto of how to make blocks, and change between types.


    Features:
    • Redstone toggleable blocks
    Download ControllerBlock (recommend using the recommended build of craftbukkit here, previous version available below in the changelog, tested up to 733).

    NOTE: IN 1.07 CREATING CONTROLLERBLOCKS CHANGED, YOU NEED TO PUT A REDSTONE TORCH OR WIRE ON TOP OF THE BLOCK BEFORE YOU LEFT CLICK ON THE BLOCK TO CREATE. (Yes, enough people have missed this change to warrant the large bold text :p)

    Source now also available up on GitHub! https://github.com/Hell-Fire/ControllerBlock

    Some builds done with ControllerBlock:
    Treasure Quest 3 (dungeon game inside MineCraft) (by neoguy21)
    Xtreme HowTo controller blocks (by mrgreaper)
    :getout: frog animation (by Gorbachev, sup goons :V)
    gravity mob trap (by Arolathe)
    hidden staircase/entrance (by narrowtux)

    And a couple by me:
    Real simple on/off example/howto
    Item elevator
    Portcullis/castle gate build/howto (long >.<)

    Known Issues:
    - Placing a block in snow/flowing water/lava doesn't register.
    - Occasionally block hits/places/destroys don't register.
    - Liquids being directly controlled don't work properly.

    Changelog:
    Version 1.18
    - Updated for craftbukkit #733
    Version 1.17
    - Fixed config loading of BlockFlowProtectMode and BlockPhysicsProtectMode
    Version 1.16
    - Fixed for changes to bukkit/craftbukkit #602
    - Changed some messages, added some config options, haven't slept much, so forgotten a bit of what's changed, find bugs! :)
    Version 1.15
    - Fixed up multiworld, also loads the data file after all the other plugins have loaded.
    Version 1.14
    - Changed world to use name instead of the ID in data file, should fix multiworld stuff when ControllerBlock loads before other multiworld initializing plugins.
    - Not much else that I recall, will be another version soon
    Version 1.13
    - New config patcher, new options get added into the ControllerBlock.ini automatically.
    - Added a whole lot of currently disabled debug lines (They're spammy... really spammy).
    - Added option to disable the edit dupe check all together.
    - Added protection against water/lava flows (and dupe checks, that are disable-able with the above new option).
    - Added ability to disable the checks against Permissions (and clones) completely, if you want to just use my inbuilt controls only (not mandatory to set if you don't have Permissions, this is in addition to, if Permissions isn't installed, it won't use it anyway).
    - Fixed Grass/Dirt and Redstone Torch On/Off in the edit dupe checks. No other blocks are coming to mind that change automatically.
    - Added a bunch of error checking on the loading of the ControllerBlock.dat, hopefully will give me some clues as to what's going on there.
    Version 1.12
    - Removed plugin constructor for craftbukkit-419+ (wasn't needed anyway)
    - Fixed Permissions mod checking stuff (haven't tested it actually works with permissions, but doesn't seem to throw any errors on loading anymore)
    Version 1.11
    - Fixed a bug that mostly affected Windows users with .dat handling (wasn't closing the file on reading, so it couldn't overwrite it when saving).
    - Added some sanity checking to reading the .dat file (empty lines ignored rather than creating null controllerblocks that make the mod unable to save).
    - Destroying a block in edit mode that has more than one controllerblock controlling it will replace the block with the type from the enabled controllerblock.
    - Destroying a controllerblock now destroys all the controlled blocks and refunds them all at the controller block itself.
    Version 1.10
    - New antidupe code, a lot more reliable!
    - Fixed permissions check (uninitialized objects are a pain :p)
    Version 1.09
    - Fixed a rather critical bug that was saving the new data format with the old identifier.
    -- (YOU ONLY NEED TO DO THIS IF YOU USED THE BUGGED 1.08) --
    If affected by this (getting NumberFormatException on loading), edit ControllerBlock.dat with a text editor and change the first line from "# v2" to "# v3" (That's <hash><space>v3).
    -- (YOU ONLY NEED TO DO THIS IF YOU USED THE BUGGED 1.08) --
    Version 1.08 - critically bugged, don't use, use 1.09 instead
    - Added a builtin permissions support, also supports Nijikokuns Permissions on top of it
    - Removing the controller block with WorldEdits superpick, and possibly any of the "stick" plugins that cancel/set to air on hit will now remove the controller block.
    - Added configurable limits on number of blocks and block distance from controllerblock (is a "sphere" around the controllerblock, rather than a cube, might add another option to change it later).
    - Probably some more random little bugfixes/refactoring, but I can't remember >.<
    Version 1.07
    - Updated for API changes (bukkit-144/145 and craftbukkit-323, tested with 326)
    - Config file format change, old config files will convert automatically
    - ControllerBlocks need a redstone "thing" (wire/torch) on top to create a ControllerBlock
    - Added per-tick, per-controllerblock .isBlockPowered() check for more natural redstone integration (power feeds into the block rather than needing wire on top), more CPU hungry, toggleable with old quick REDSTONE_CHANGE event method in config (quickRedstoneCheck=true for fast version that needs wire on top of block)
    Version 1.06
    - Updated for API change (bukkit-128/craftbukkit-281, only tested with 289)
    - Added counts on block add/remove messages
    - Added notice if a block gets removed by the anti-dupe code while editing
    Version 1.05
    - Updated for API change (bukkit 122/craftbukkit-265)
    - If you're running a version prior to this, you can still find 1.04 at here. I won't be supporting it anymore though, so any bug fixes, etc, won't find there way backported there.
    Version 1.04
    - Moved config/data to plugins/ControllerBlock (or whatever getDataFolder() is). Should make it multi-server usable as long as each server has a different plugins dir.
    - Sorted out minecart track metadata storing, this should make dynamic minecart tracks actually stay how you put them out now.
    - Stacked fences should work again now.
    - Probably some other small bugfixes that I've lost track of.
    Version 1.03
    - More refactoring
    - Inverted blocks again, blocks on when redstone wire off, reads from torches now, blocks on when redstone torch on.
    - Added some error handling in the config file loading
    - Fixed a metadata handling bug when a block has more than one controller.
    - Listen to event cancellations, no longer processes canceled events.
    - Changed a bunch of the edit mode handling, still similar to how it was, just with some nice changes (no longer need to exit editing one block to edit another, will save/finish the previous block for you).
    - Can now edit/modify ControllerBlocks that were made with a different Material before a configuration change took place, Material only matters for creation of new blocks.
    Version 1.02
    - Whole lot of code refactoring
    - Blocks on when redstone on (can still use torches)
    - Block protection for controlled blocks (Physics events can't modify controlled blocks anymore, fixes duping issues, but allows some odd builds, might implement a "break" feature like the original had, where block changes cause the controllerblock to disable)
    - Added configuration file (creates on first load, in main folder, ControllerBlock.ini). First line is ControllerBlock material type, other lines are disallowed materials.
    - Saves block metadata, allows toggling of minecart tracks.
    - Probably some other stuff I'm forgetting.
    Version 1.01
    - Added controlled block checks, need to edit block before removing controlled blocks
    Version 1.0
    - Release
     
  2. Offline

    mughi

    want..
    this would also give us reloadable cannons
     
  3. Offline

    Kevin Forte

    Glad somebody else sees the potential in this :p
     
  4. Offline

    Hell_Fire

    If you set BlockPhyisicsProtectMode to none, it should let you build reloadable cannons, toggle them on, blow them up, toggle off and back on again to reload. I haven't tested it though, let me know how it works :)
     
  5. Offline

    biggetje537

    can you make it that you can place with an controllerblock reed/sugarcane because ive got a server but when i make it so that 2 blocks dissappear and water flows againts the wheat it wont get destroyed but if i use an button on a controllerblock it wil place and replace an wheat and the rest will get dropped and it will fall in the water what brings it to my chest what will suck the dropped items up.
     
  6. Offline

    nanashiRei



    We had some awesome fun with this :D

    <3
     
  7. Offline

    Vlyn91

    670 here... bugs out like hell :(

    Activate... add blocks.. when you want to end it i get the same error as already mentioned above and the whole server freezes -.-

    Tested version 1.17 and 1.18...

    Help! :(
     
  8. Offline

    Nate204

    I have players using this to level their skills with mcMMO.
    Can I control the types of blocks they can use? I thought I could~ but I can't find it =(

    Thanks guys!
     
  9. Offline

    Hell_Fire

    You can disallow blocks in the config, might add an allow list as well, which if used only allows those blocks
     
  10. Offline

    Nate204

    Ah! It's at the bottom.....
    I didn't see it under the 2000 lines of spam. lol~
    Is my config supposed to be that way? >.>

    Thanks!
     
  11. Offline

    Rhythmatic

    So, @Hell_Fire, when do we get a version that works with the Recommended Build? It's been over a week since 670-677 came out.
     
  12. Offline

    Valdrec

    Controllerblock is 67 versions behind >_<
     
  13. Offline

    DeaGato

    It works perfectly on #707. With #690-700 doesn't work.
     
  14. Offline

    Hell_Fire

    Seems like CraftBukkit added some kind of block translation layer or something and fixed a function in 707? Could be why I can't replicate problems. Hrmm.. :/

    If you've got a bunch of duplicate entries for BlockFlowProtectMode and BlockPhysicsProtectMode, just delete them, and make sure you're using the latest.

    When I've got enough information to actually replicate problems people keep reporting to me over and over that I can't get get to do. Should be a new CraftBukkit recommended build soon anyway. Been playing around with 1.18-test and apart from redstone torches (and probably normal torches) dropping not able to being cancelled, I'm happy with how it is as long as it stays working with a 1.5 compatible build.
     
  15. Offline

    DeaGato

    Isn't a problem for me... i use #709, and now i'm trying on #713.
     
  16. Offline

    jabermony

    great plugin. i've finaly got toggle lights :D
     
  17. Offline

    Apelsin

    Спасибо!, мне понравился ваш плагин!
     
  18. Offline

    Vlyn91

    Tested it on #707... broken :(

    Most of the time "could not pass Event Block_Damaged to Controller_Block".

    Sometimes it works, but then only half of the blocks are recognzied :-(

    EDIT: Same problem with #720
     
  19. Offline

    ichingpow

    y u no make update?
     
  20. Offline

    Rhythmatic

    Hey Hell_Fire, I'm gonna propose something unusual and unorthodox here, because my users have been whining to me almost constantly about not having ControllerBlock; it's by far our favorite and most frequently used mechanic type plugin. I know you need information about these issues that I and the rest of the community have been having, so I'd like to get with you, give you access to our server's console via VNC, give you access to the section of our website that publishes our plugins and config files, and give you admin powers on the server, all toward the goal of getting ControllerBlock working again.

    I really hope you're interested in this idea, as it's of great importance that we get this sorted. Right now, we're running CraftBukkit 684, but we expect to be updating within the week, once all of the other mods we use are up to date. If you're interested, contact me by email (has been hit and miss recently for some reason), by instant messenger, or on our server forums. Information to follow.

    email: mail at nathanpaulyoung dot com
    Live Messenger: same as above
    AIM: areonepta
    yahoo: Automatic_Rhythm
    forums: http://projectframework.org/forums
     
  21. Offline

    willystylee

    seriously please update this.
     
  22. Offline

    Ull3R

    Please update :)
     
  23. Offline

    Rhythmatic

    Hey, you guys that are capslocking/colorizing/largetexting that you want this updated, the dev has stated several times that he'd love to update and fix everything but he cannot do so until he can reproduce the issues we've been having. Shouting "PLEASE UPDATE" isn't going to help. If you want it to be updated quicker, help him fix the issues that have been mentioned.
     
  24. Offline

    Hell_Fire

    Updated, built and tested against #733, redstone torches still drop but you can add REDSTONE_TORCH_ON to the disallowedBlocks section if you don't want people to build them, still working out if it's a bug with my code or bukkits.

    Only quickly tested on default settings, but creates, destroys, modifies, okay for me. :/ Hope it's alright.
     
  25. Offline

    straightupegg

    My controller block was working but after the update even if i set up correctly it acknowledges that i have put a controller block and it acknowleges that i am editing it and placeing blocks but when i finish editing and try to control it with a lever it doesnt disapear
     
  26. Offline

    Valdrec

    On the previous version of Controllerblock, we had an issue where Controllerblock was flipping the heck out and wouldn't properly finish adding blocks for Controllerblock, instead it would take the action of removing random blocks already placed in the "controlled area" in an alternating checker-board fashion. We had to remove it and wait for a new update, which came for 1.5. In this latest version, we have an error similar, but not exactly the same.
    Basically, it won't stop adding blocks the same way as it did before, but this time it cuts much fewer blocks (2 blocks out of about 80 this time) when ending the Controllerblock "session" The main difference since the last version, is it does actually acknowledge when I destroy the Controllerblock, though to be safe I made sure to remove all blocks beforehand anyway.

    Oh, and one last note. It worked perfectly fine on controlling a single block. Just not when I tried to do about 80 obsidian.

    I play on Rhythmatic's server, who you may have noticed already came up with a proposal for you.

    Edit: It won't move blocks at all on 2, and on 3, it cuts the third one out.
     
  27. Offline

    willystylee

    still getting wierd errors that kill the plugin, even after updating:

    Code:
    2011-04-28 09:53:42 [WARNING] Task of 'ControllerBlock' generated an exception
    java.lang.NullPointerException
      at net.servfire.hellfire.bukkit.ControllerBlock.Util.formatLocation(Util.java:37)
      at net.servfire.hellfire.bukkit.ControllerBlock.CBlock.<init>(CBlock.java:244)
      at net.servfire.hellfire.bukkit.ControllerBlock.ControllerBlock.loadData(ControllerBlock.java:234)
      at net.servfire.hellfire.bukkit.ControllerBlock.ControllerBlock.run(ControllerBlock.java:630)
      at org.bukkit.craftbukkit.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:128)
      at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:358)
      at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:285)
      at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)
    
     
  28. Offline

    Rhythmatic

    So, Hell_Fire, I assume, since you haven't contacted me, that you either have everything worked out and we can expect a fully functional version of the plugin VERY soon, or you choose not to put in the effort required to get with me on my server to find out the cause of the problems and subsequently fix them. Which is the case?
     
  29. Offline

    Vlyn91

    Using #733 and it's still broken. I can place the block, activate it with redstone_torch_on and start editing it.... when I finish it: "Removing blocks due to change while editing", some blocks gone... another time I try to finish it.. same message... and then finaly another time hitting it "Finished"... and then it doesn't work.

    In the console I get an error "Could not pass event BLOCK_DAMAGED to ControllerBlock"

    I loved this plugin, but it's not working for a month or so :-(
     
  30. Offline

    Hell_Fire

    It's probably detecting the redstone torches turning off (they're a different kind of block). Going to fix this when I write the translation layer. Edit: Actually, I fixed the torch case a while back as well... are you sure you're using an updated ControllerBlock version?

    You can take your smarmy passive aggressiveness and go shove it up your arse, this is something I work on for fun in my own time, my day job is admining servers and I really don't like tone. Go write your own damn plugin that works with every other plugin if you're not happy with this one.

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

    Vlyn91

    Ahhhh! Okay, it's working now, I found the problem.

    It's all fine, as long as you don't use the Flow Protection = Remove option. When it's at "Protect" it's alright, when it's at "Remove" it's all broken.

    Working now, thanks :)
     

Share This Page