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

    ArcFox

    @Hell_Fire

    I got some problems with it and Bukkit #953 :/
    Previously it worked fine and without problems until 935, now I get this:

    Code:
    22:31:21 [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.jav
    a:244)
            at net.servfire.hellfire.bukkit.ControllerBlock.ControllerBlock.loadData
    (ControllerBlock.java:234)
            at net.servfire.hellfire.bukkit.ControllerBlock.ControllerBlock.run(Cont
    rollerBlock.java:630)
            at org.bukkit.craftbukkit.scheduler.CraftScheduler.mainThreadHeartbeat(C
    raftScheduler.java:137)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:438)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:361)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    Could you please update the plugin so it works with the latest RB? I really really like this plugin and it would be a shame if it died :(

    Nevermind, I corrupted the database. Had a new world generated with MultiVerse and placed some controllerblocks in them, later deleted the world and MultiVerse but these controllerblocks still existed in the database.^^

    I can confirm this is working fine with Bukkit #953 and MC 1.7.2

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

    MasterMeNL

    It seems that pistons aren't working correctly (only tried sticky pistons), it will place STICKY_PISTON_BASE or something like that and it looks good, but when you try to use them they won't do anything. Also, what's the status of the protection of ladders and stuff (especially
    doors).

    Also, when you use WorldEdit's super pickaxe (insta-break) the CB won't be removed from the database properly, sometimes I remove it using this, place the CB back, turn off super pick and remove it the normal way.

    This is probably one of my favorite plugins, if you got a lot of pistons going on and don't want to wire them all up, you can let the CB place redstone torches = win. :p
     
  4. Offline

    Niemand

    when this works with 935 can you update the thread-title? would be loveley. ;)
     
  5. Offline

    Johnnyboy118

    Niemand, after reading what ArcFox said 2 posts above, I was under the impression that ControllerBlock1.18 was compatible with RB 953, is this not the case? Did you or anyone else have any problems with builds 935 or 953?

    I ask these questions because I am unsure of what ControllerBlock works with nowadays because the thread-title is not yet updated, I agree it would be lovely if it got updated or even confirmed to work with the new Recommended Builds.
     
    willystylee likes this.
  6. Offline

    Hell_Fire

    I haven't actually updated my servers to MC1.7 yet, am doing so now, so I'll check over things. I was pretty sure pistons would need some special handler for them, will take a look at it once I've played around with them a little :)
     
  7. Offline

    Johnnyboy118

    Hey thanks for the speedy reply, glad to hear from a developer who is active on their own thread! :p I am also glad to hear that you are updating my admins have really enjoyed this plugin and we would hate to see it go. Thanks again, I hope you can get it updated quickly without too much trouble!
     
  8. Offline

    Zixt

    Is this going to be updated to 953+ soon? Sorry if it has been asked before.
     
  9. Offline

    ArcFox

    I use ControllerBlock 1.18 with RB 953 and it works fine! I haven't tried Pistons yet though. Normal blocks like Stone, Wood, Sand, etc. work and are used on my server right now. Could be that Pistons don't work with the latest version of this plugin
     
  10. Offline

    Kaito

    anyone has a link to a version that works with
    build 689for bukkit 1.5_02 (mc version 1.5_01)?

    all versions i found did not work :(
     
  11. Offline

    supamee

    i love this mod for my sever but could you moddifie the update speed so it lines up with ticks coz i have some problens with it
     
  12. Offline

    MJE

    It works using RB 1000. Only problem is I can dupe the hell out of items. I'd make a CB wall, put a piston next to it push block out of wall (causing it to not be part of a CB set), toggle the CB and wall will be back to normal and I will have an extra block.

    Just what I've found...

    Thanks!
     
  13. Offline

    ak416

    I have been using this plug in on my server for a few months now and dont know how we ever did without it!

    I did however run into a problem recently. A controllerblock must have been burried underground, and was deleted using VoxelSniper (world editing tool) while we were clearing some terrain. Now the blocks attatched to that controller keep reappearing everytime the plug in is reloaded, so if the server restarts or i reload plugins using essentials. I just cant get rid of the damn blocks! They keep coming back.

    Any way around this? Im at my wits end here..
     
  14. Offline

    MasterMeNL

    Yes, I myself use a plugin called tele++, but it can work by just pressing F3 too.

    1. Destroy a block of that voxelsniper controllerblock.
    2. Go to the coordinates of the CB, teleport or F3 or some other way (it will say it when you break a block of the CB).
    3. Now go to the y coordinate (in real life the z (height)) of the CB.
    4. Replace that area with a few iron blocks and break them normally (no power tools).
    5. "CB successfully removed"

    There might be some way to modify the CB database, but that's to risky for me.
     
    ak416 likes this.
  15. Offline

    t2wave

    Yeah, you're going to have to go to the CB's location and place a block where it used to be (protip: It doesn't have to be an iron block). So long as a block is broken normally where the CB used to be it will be properly removed. The location is deturmined by the lower Southwest corner if I recall correctly.
     
    ak416 likes this.
  16. Offline

    Cougar281

    Is there actually a way to reverse the function of the controllerblocks? I want to build a bridge with a door at the end, and I want the bridge to not be there and the door to be there when the CB isn't powered, and the bridge appear and the door dissapear when the CB's (three, actually) are powered. I read some posts earlier that indicated that using a redstone wire instead of a torch would do it, but it didn't change the behavior.
     
  17. Offline

    dominichello

    You need to reverse the signal coming into the Controlblock using redstone torches.

    Here's a SIMPLE circuit for what you need :

    [CB] = Control Block
    [----] = Red Wire
    [AB] = Any block (ish)
    [RT]= Red stone torch
    [SW] = Switch

    SW------[AB][RT]-----CB

    *IMPORTANT* the Restone torch MUST be on the side! of the block, NOT on the floor.

    This means that the CB is ON when the switch is in its OFF position, so what ever it controls is HIDDEN, when you turn the Switch ON, it turns the CB OFF and your bridge will appear.

    If you need more explanation i can take a screen shot, but i suggest you watch some advanced Restone tutorials online, they are the only real way to master Redstone :D

    UPDATE*

    The above circuit will control the bridge, IF you want the door on the same switch add a branch coming off the redwire from the switch to another CB.

    SW-----[AB][RT]---CB
    ___|
    ___------CB
     
  18. Offline

    Cougar281

    Thanks for the input... Guess I should have mentioned I'm also using falsbook with this and want one IC to trigger both... the FB IC works great with the 'door'.

     
    killer8600 likes this.
  19. Offline

    dominichello

    If you have hamachi and your server available to play, give me the server details as a private Mail and ill be happy to come figure it out for u :)
     
  20. Offline

    ak416

    Thanks for the help guys. Unfortunately i was impatient and edited the database, and even though i only (seemingly) removed the one blocks coordinates, the controllerblocks that were near it have all been reset. Im sure it was my fault, but yeah, just in case anyone wanted to try doing it the "easy" way... dont!

    Thanks again for the help.
     
  21. Offline

    prefix

    Anyone know if this working for craftbukkit recommended build 1000 ?
     
  22. Offline

    shell64

    it works on b1000
     
  23. Offline

    RobotGymnast

    Thread title should be changed, then.
     
  24. Offline

    t2wave

    Don't be silly. Nothing changes in the OP. It will stay the same forever.
     
  25. Offline

    Hell_Fire

    While it's working with the latest release, it's got some bugs I want to fix up before I declare a b1000 compatible, mostly the piston duplicating thing, gonna take a peek at it tonight
     
  26. Offline

    MasterMeNL

    Please make it that the piston duplication check (if you implement it) can be turned off, on my creative-style server this is very useful since instead of spawning e.g. a castle gate, you can use piston to push the fences and respawn new ones, which looks cooler than suddenly just popping.

    Greetings,
    MastereMe.
     
  27. Offline

    Zixt

    Hell_Fire, I have sent you a message via PM detailing a duplication bug with ControllerBlocks. If this could be fixed, that'd be great <3.

    I love the plugin so would not like to remove it for the bug.
     
  28. Offline

    Hell_Fire

    Redstone torches glitching like that is a known bug, Bukkit or Mojang changed something relating to how they're dropped, and the duplication checker doesn't work properly with them anymore. Recommending to server admins if they have public users that abuse stuff like this, to add those items to the "disallowed items" section in the config file.

    Other objects that can be glitched a similar way is ladders, and probably normal torches too. Pretty much anything that drops when the attached block is dug out probably.
     
  29. Offline

    Zixt

    So no way of you fixing by way of changing the CB plugin?
     
  30. Offline

    dominichello

    I've built many remote controlblock systems for my self and for my friends, it worked by toggling a Redstone torch that was part of a another circuit that contained the blocks to be effected. This works very well as i was able too do long and complicated circuits at a fare distance away from what was needed to be controlled. ( more than a few chunks and it worked when no-one was near the redstone circuit ) Until very recently there were not any problems. Then out of the blue one of my friends circuits failed.

    We determined that it was due to chunks not loading the circuits therefore CB was unable too effect them :/ but this was never the case before hand. We then began the process of Moving ALL the circuits closer to the effecting areas. (took forever but we got there).

    This image shows the locations. :
    Show Spoiler
    [​IMG]

    One Important thing to note is that the new base is at bedrock level, where as the old one was nearer the surface ...but as i figured chunks load from bedrock to sky i didnt see how this could be a problem ?
    Unfortunely it seems that its STILL not activating the circuits unless someone is standing in the control room. The chunk load problems still seems to be effecting it.

    I noticed in the config file
    Show Spoiler
    # MaxDistanceFromController sets how far away controlled blocks are allowed
    # to be attached and controlled to a controller block - 0 for infinte/across worlds
    MaxDistanceFromController=0
    # MaxControlledBlocksPerController sets how many blocks are allowed to be attached
    # to a single controller block - 0 for infinite
    MaxBlocksPerController=0

    with these settings shouldn't we be able too control blocks at an infinite distance ? or is that still going to be limited by which Chunks are loaded? and if thats the case how can it control blocks on another world If the world isnt loaded with anyone on it ? (or can it iunnoo..was just curious)

    I apriciate if this isnt a control block problem, as the plugin works fine..its just the chunking issue which your probably powerless to sort out....

    Anyway i thought id share it with you as you probably know more about it that i do, so anything u can offer as to an explanation or cure would be awesome :) ( maybe there is a minecraft setting we can change to control how many chunks get loaded at once? )
     
  31. Offline

    Leon Philips

    Hi! , I think I have an solution for duplicationg with pistons!
    here is how it works:
    the controllerblock places the blocks (for examlpe we take cobblestone)
    when you switch to remove the blocks the controllerblock will search if all the places are cobblestone
    ,if not you recieve an message that the structure is not complete and the blocks won't be removed until you filled up the
    spot with the correct block (coblestone in this case)

    is that an good idea? (please use @Leon Philips or reply to respond :p)
    [Edit]
    here is an explaination:
    [glass]=Controllerblock
    [diamondblock]= the placed block with the controllerblock
    [dirt]= an other block than you configured with the controllerblock (including air and liquids!)

    The setup:
    [air][diamondblock][air]
    Situation:
    [air][diamondblock][air]
    Somebody destroyed the diamondblock and now we have this:
    [air][dirt][air] <-- now does the [glass] say that it has been edited
    it won't change until the block is placed back, that is how I thought it was possible! thank you for your time!
     

Share This Page