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

    captainbinary

    Thats where i have been going wrong, thanks! Should have realised it was a user error, 80% of the time it is.
     
  3. Offline

    Hell_Fire

    Ahh, it was a sneaky change :p Didn't used to have to :)
     
  4. Offline

    Vlyn91

    That would be awesome!

    Me wantey! ;D
     
  5. Offline

    Hell_Fire

    Updated:

    Version 1.08
    - 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 >.<

    Might want to rename your ControllerBlock.ini so it recreates a new one so you can see all the new configuration options.
     
  6. Offline

    abuxton

    Worked at first perfectly fine.... but after i launched my server a second time...

    error.jpg
     
  7. Offline

    Demon Boy

    need help. i can create the controller block but when i hit it with lets say dirt it says now edditing with DIRT (0 blocks) placing the dirt blocks after that has no effect on the controller block and i dont get the message you get in the video (added block to controller)
     
  8. Offline

    Kevin Forte

    Right now, I can't even create controller blocks. I place my iron block, left click, and get no response at all.
     
  9. Offline

    Demon Boy

    same thing happened to me except now i cant even get back on mc :S its getting progressively worse

    oh and do you have redstone on top of the block? a lot of ppl make that mistake
     
  10. Offline

    Kevin Forte

    It isn't the fact that the controller block is not functioning, it is that the iron block is not registering as a controller block at all. (For the record though, yes, I did place redstone on the top.)
     
  11. Offline

    Demon Boy

    yeah i had it registering im not sure what happened i thought it might be a permission issue for example are you op? but i cant fix it myself...
     
  12. Offline

    Hell_Fire

    Oh crap, this is why you don't release plugins when tired >.< I know exactly where that's wrong.
    Edit the .dat file and change the "# v2" bit up the top to "# v3", I changed the format slightly for permissions support and forgot to update the version tag in the saveData().

    Released 1.09 to fix this >.<
     
  13. Offline

    Demon Boy

    changing to v3 didnt change anything for me any idea why the block isnt being picked up as a controller block hell fire?
     
  14. Offline

    Hell_Fire

    The changing to v3 only affects the loading that happens when you first start up, I'm having a look at the block stuff now. Probably messed up the permissions mod integration or something >.<
    --- merged: Feb 19, 2011 12:26 AM ---
    Yeah, somethings up with my permissions handler, throwing a rather large error >.< Looking into it :)
    --- merged: Feb 19, 2011 12:29 AM ---
    Found the bug with the permissions handler, now have another bug with the number of blocks bit >.<
    --- merged: Feb 19, 2011 12:31 AM ---
    Fixed that one, gonna see if I can do something about the overly agressive anti-dupe code.
     
  15. Offline

    hozzdutch

    I just installed this and love it...problem is, when I have this addin, my travelportals addin stops working.
    Portals don't work again until I remove this addin.
     
  16. Offline

    captainbinary

    I have been making the same mistake, put a redstone torch ontop of the controller block first, then hit it to activate it with the block of your choice. after editing you can get rid of the redstone torch =)
     
  17. Offline

    Demon Boy

    its not to do with the redstone hes putting dust on the top its a permissions error
     
  18. Offline

    Hell_Fire

    I'll take a look at it now :)

    New anti-dupe code is working well. 1.10 shouldn't be far off, just want to look into this mod conflict :)
     
  19. Offline

    Demon Boy

    my travel portals are working fine maybe i have a different plugin
     
  20. Offline

    Hell_Fire

    Yeah, I can't replicate the problem, travel portals seem to be okay to me, uploading 1.10.
    --- merged: Feb 19, 2011 1:15 AM ---
    And uploaded:

    Version 1.10
    - New antidupe code, a lot more reliable!
    - Fixed permissions check (uninitialized objects are a pain :p)
     
  21. Offline

    Demon Boy

    back to my original problem it now picks up its a contoller but doesnt pick up when i place the block (dirt)
     
  22. Offline

    Hell_Fire

    Hmmm, that's an odd one, just in my quick testing it's picking up blocks okay. I know there's a problem if you place a block into spot that has snow, flowing water, flowing lava, something else other than air. Since that doesn't throw a BLOCK_PLACED event. Might add a known issues bit to the first post.

    Any other mods installed? If they're cancelling or setting the event to !canBuild, that'll stop my mod from picking up on them.
     
  23. Offline

    Omega-Assassin

    The controllerblock doesn't seem to be doing anything when I put one down and whack it. I have the most up to date version of ControllerBlock and the server. I have the following plugins :: ControllerBlock, LWC, And Informant:: Any ideas?
     
  24. Offline

    Hell_Fire

    Putting redstone torch/wire on top of the block before you hit it?
     
  25. Offline

    bigbass1997

    ok i have v 1.10 of controller block. i have bukkit build 345. and i changed the # v2 to # v3. and when i left click the iron block it wont register as a controller block. why is this and how do i fix it?
     
  26. Offline

    Hell_Fire

    Any errors on the server? Just tested 345 and it seems to work okay.
     
  27. Offline

    Omega-Assassin

    cant say i put the stone on before i hit it 0_o
     
  28. Offline

    bigbass1997

    it says it on and there are no errors.
     
  29. Offline

    Omega-Assassin

    I just tested it and it works just fine :D thanks :D
     
  30. Offline

    Demon Boy

    must be interfering with something else i have ichat permissions travelportals and.. i think thats about it..
     
  31. Offline

    PAPABEAR1010

    hello
    i really like the plugin
    everything works as it should , with the exception that it will not save more than the first controller block that is made , if i delete the plugin completely and start again it will save only the first controller and blocks, building multiple controllers and blocks works smoothly and all work well but checking the controller blok dat shows that only the first controller is saved.there are also no errors showing in the console
    thankyou

    sorry using craftbukkit 345,346 and controllerblock 1.10
     

Share This Page