Inactive [MECH] ControllerBlock -Remade- v1.50 Toggle Blocks on/off with Redstone [1185]

Discussion in 'Inactive/Unsupported Plugins' started by Zero9195, Aug 30, 2011.

  1. Offline

    Zero9195

    ControllerBlock
    Toggle blocks on and off with redstone​
    Original Created by @Hell_Fire

    Moved to BukkitDev

    Download: v1.50(Jar) Latest Version: here.
    Old Versions: v1.41(Jar) ,v1.40(Jar),v1.30(Jar),v1.21(Jar),v1.20(Jar),v1.18(Jar)
    I didn't have any Problems while testing with CB1185. Please backup your Files! Just to be sure.

    Before updating to this, a BackUp of your Files is recommended. I can't promise everything works fine.
    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 disappear, remove the power and they'll appear again. Invert the control with a redstone torch on top of the block. To remove the binding, just remove the block.

    I will test this on my local Server and run it on my own Server. Link is in the Signature.
    A smallish howto of how to make blocks, and change between types. by Hell_Fire.

    And a Tutorial of how to build a auto-repairing Spleef Arena @Omen (He used Snow_Blocks as unprotected ControllerBlockType. Standard is Diamondblock).

    Another one from @Omen which shows us how to use the CBlock-moving feature (v1.41)!


    Features:
    • Redstone toggleable blocks
    Original Download by Hell_Fire (v1.18):
    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 available on GitHub!

    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 Hell_Fire:
    Real simple on/off example/howto
    Item elevator
    Portcullis/castle gate build/howto (long >.<)

    Known Issues:
    - Duplication Bug with Sand/Torches/Gravel (Right now not solvable due to Bukkit failing in BlockPhysics)
    - Occasionally block hits/places/destroys don't register.
    - Liquids being directly controlled don't work properly. (Anyone still has this problem?)
    ChangeLog
    • v1.50
      • Added support for CrativeMode!
        • If you want to destroy a CBlock in CreativeMode, simply destroy it with anything that is not a block.
        • For creating them simply do as you always do.
      • Added "/cblock reload" for reloading the config. Works for OPs and from the console only.
      • Minor Bugfixes
    • v1.41
      • Fixed a Duplication Bug with the new moving feature.
    • v1.40
      • added the function to move CBlocks
        • Left-Click the CBlock you want to move with a Stick.
        • Right-Click the new CBlock where you want to move it to with a Stick.
    • v1.30
      • added UnprotectedBlocks
        • New part in the config (you maybe need to delete the old config)
        • Add Blocks there so they can be used with Semi Protected and Unprotected Controllerblocks.
        • Also, these Blocks can be pushed by Pistons in every ControllerBlock
    • v1.21
      • PistonProtection is now a config option.
    • v1.20
      • Pistons can't move CBlocks nor controlled blocks any more.
    • v1.18
      • Unmodified Version by Hell_Fire

    First Update is out.
    Controllerblocks won't be pulled or pushed by Pistons anymore.
    If you have any ideas for features or know some other Bugs please report them to me!

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 19, 2016
    sinkir, Khorn and EarlyLegend like this.
  2. Offline

    t2wave

    Can the thing with pistons be an option? The server I play on has item spawning so CBs and controlled blocks being pushed/pulled isn't an issue. It allows for some cool contraptions.
     
  3. Offline

    Zero9195

    i will try to add it as an option, but I haven't looked at the configurations yet. Will do so until tomorrow ;)
     
  4. Offline

    mrgreaper

    the ability to have multiple block types attached to one control block would be great
     
  5. Offline

    Soryo

    So I take it this is almost the exact same thing as the original Controller Block mod? You just fixed up the bugs? So there's no need to worry about extra config files or having to re-do all the controller blocks?
     
  6. Offline

    Omen

    u kick ass for taking over this plugin!!

    i will update it on my server and report back with my findings.

    Ok, so far everything is running smoothly minus one thing...not a bug, but more like your security measure is interfering with our spleef arena.

    I have it set up so the snow blocks are controlled, they are spawned then pushed over by pistons to seal any holes from spleefing. The pistons retract and the process is repeated until all holes are filled.

    Can you please make it possible to define what kind of blocks are moveable by pistons?

    That would be amazing!!

    here is another duplication bug.

    place 3 stone (or any number) blocks, then create a controller block with a button run to it...then hit the control block with a torch, then place your torches on top of the 3 stone blocks. go back to the control block and finish editing. then remove the stone blocks from under the torches, then hit your button.

    Torch duplication. unlimited torches.

    i think this is the last bug on my list.

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

    Zero9195

    @Soryo
    It's the exact same, I just fixed Bugs. But just to be on the safe side, make a backup ;)
    @Omen
    Thanks for the reports. I will try to make them configurable, sure ;)
    As for the duplication bug, I think you need to add torches, rails, etc. to the Blacklist. Right now I have no clue how I could check this...
    Also, take a look at Goldblocks and Diamondblocks as Controllerblocks. I read it somewhere in Hell_Fire's code that if you just use them the Blocks will be created, but not deleted, and not protected if the CBlock is off. Maybe this will help your cause until I made a whitelist for pistpn protection ;)
     
  8. Offline

    Necromanhcer

    Thanks for de-bugging his mod! :D
    Think someone should ahve a spleef how to here
     
  9. Offline

    Hell_Fire

    Thanks for taking this over Zero, I haven't been in the mindset for coding (or much of anything) recently. :)
     
  10. Offline

    Omen

    as soon as zero makes it configurable i will make a spleef arena set up video.
     
  11. Offline

    Zero9195

    @Hell_Fire
    Glad I can help. I will mostly debug this, and will not really add more features, only if I am in the mood and have time :)
    @Omen
    That would be awesome. I will add your video to the post.
    No more bugs occured?

    @Hell_Fire
    Btw, do you mind putting a link to this thread in yours? So People recognise that there is a new version? Thank you :)

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

    Omen

    @Zero9195
    i am having some major heap space issues with my server right now and it just started around the time of me updating controller block. I am going to remove any recently added plugins and see if I still get heap space errors with controller block installed.

    @Zero9195
    I was playing around a little with the new unprotected controller blocks but this definitely opens the door to duplication abuse. I can remove the unprotected controller blocks and its a great option but I think we need to have the option to define the types of unprotected controlled blocks.

    Say, in the config, you have
    UnprotectedBlocks=SNOW_BLOCK,SAND_BLOCK,etc

    That way, if those blocks were created with ANY of the 3 controller blocks (normal, semi and unprotected) then they would be moveable with pistons and breakable.

    Those would also be the ONLY blocks that could be used on the 2 new controller blocks (semi and unprotected)

    I just dont want my users to start duplicating diamond blocks or any other blocks unless specified in the config.

    So...adding to the config: UnprotectedBlocks=SNOW_BLOCK,SAND_BLOCK,etc
    Will be the only blocks that work with: SemiProtectedControllerBlockType & UnProtectedControllerBlockType

    Or add
    UnprotectedBlocks
    SemiUnprotectedBlocks

    --
    On another note, I found that if you have a piston bound to a controller block, it is a dud. When the piston appears, you cannot use it. Redstone has no effect on it. Is this a limitation in bukkit? Also, the direction of the piston should be remembered when it reappears.

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

    Kaito

    have the sam problem as in the original controller block version,
    if i made a controllerblock, and wanna delete it, i remove the iron block,
    but it wont work, the controller block remains

    so i have to edit the block again, remove all the parts and THEN
    i can remove the iron block

    would be great if u fix that :)

    edit:
    another bug:
    if i place an iron block and edit it with something (for excample torch) ...
    and take another kind of block or an item (for excample diamond pickaxe [admin tool])
    and destroy the iron block, i dont remove the editing mode
     
  14. Offline

    Zero9195

    @Kaito
    You aren't allowed to destroy the block with a Adminpick like the one from Worldedit. This will never work. Just switch to normal for destroying them.
    @Omen
    Good ideas there. I will work on the Unprotected blocks as soon as my server is working like it should. Also, the piston thing is the same as with redstone and redstonetorches, they cannot change their state. I don't know if this can be fixed. I don't even know why this shouldn't work. I need to take a closer look at the code to find that out. Thanks for your help ;)
    About your problem, maybe the Piston check is consuming the memory. But on my Server everything works fine.
     
  15. Offline

    Necromanhcer

    Thank!
     
  16. Offline

    Kaito

    ah ok thanks :D
     
  17. Offline

    Zero9195

    @Omen
    New Version is UP!
    Now please make a video, I'm so excited :)
     
  18. Offline

    hdgamer

    I have fond sort of a bug, it is with the tnt block. When i have a tnt block attached to a CB it will not ignite when Itake the power away from the CB:mad: , however if I have the tnt block powered when the CB is powered after I take away the power form the CB the tnt will ignite witch show the tnt block does work :). If you don't under stand what I mean I could make a video to show you. Thank for for the plugin thoe it is BOSS and, that is the only problem I have with it.
     
  19. Offline

    Zero9195

    @hdgamer
    I don't understand what you mean no xD Also, I think this is the same Problem as for the redstonetorches and redstone not getting powered when attached to a CB.
     
  20. Offline

    hdgamer

    http://www.youtube.com/watch?v=KYmXV9NhaeY

    That is what I mean could you take a look plz
     
  21. Offline

    Zero9195

    @hdgamer
    Ahhh, thanks for the video :) And now you missunderstood me :D I meant, if you attach a redstonetorch to a CB, and then try to change it state, so in your video puttin it on top of the stoneblock instead of underneath, it will not change it's state. I need to take a closer look into this, but thx for reporting this!
    If I ever find out whats wrong here, I will add an option in the config for this, because this is somehow bugusing for infinite tnt :D
    Btw, try out the semi and unprotected CB's, instead of using Ironblocks, use Gold(semi) or Diamondblocks(unprotected). Maybe this'll work... Now that I think about it, this will DEFINITLY work. use an unprotected CB and instead of a lever use a button to let the TNT spawn, sou will see what I mean ;)
    Whatever you are building there, it looks quite interesting. Are you going to make a video of it? I would appreciate it :)
     
  22. Offline

    hdgamer

    Yes there is going to be video, it is an adventure map in the making and has tripled in size over 10 or so hrs. of work today. Jackwagon and i hope to have it out by Friday for public download. Once the map is done I'll make a video of the CB uses in the map and some simple updated tuts if you would like. I'll test out the tnt with gold and diamond blocks tomorrow. Thx for posting back so quickly :D
     
  23. Offline

    Zero9195

    @hdgamer
    This sounds really interesting, can't wait for it to be finished :D
    BTW, you need to add tnt as a block in the [unprotected] field in the config.yml. else you can't use them! ;)
     
  24. Offline

    hdgamer

    Would you be able to upload a config or do a join.me,teamviewer or ever join my server? I can not find the [unprotected] field in the config.yml and i changed the CB to diamond and it wont even work :( however the iron blocks still work :)
     
  25. Offline

    Zero9195

    @hdgamer
    I can join your server in about an hour.
    if you haven't changed anything in the config, delete and generate a new one. Somehow it doesn't save the new part of it to the old ones.
     
  26. Offline

    hdgamer

    It works now:D:D:D thank you for getting back with the fix so quick.
     
  27. Offline

    Zero9195

    No Problem ;) Always glad when I can help^^
     
  28. Offline

    Omen

    @Zero9195
    I updated the plugin and started to make the video but now i get in chat "The material is protected, can't use with (semi-)unprotected ControllerBlocks.".

    My UnProtectedControllerBlockType=SNOW_BLOCK
    and the material I am trying to place is the same.. SNOW_BLOCK

    I am assuming the plugin is now trying to protect the SNOW_BLOCKs because they are defined as a type of controller block?

    No, this is not the care because I just tried controlling stone with the SNOW_BLOCK and it gave me the same message.

    Here is my config
    Code:
    # ControllerBlock configuration file
     
     # Blank lines and lines starting with # are ignored
     # Material names can be found:  http://javadoc.lukegb.com/Bukkit/d7/dd9/namespaceorg_1_1bukkit.html#ab7fa290bb19b9a830362aa88028ec80a
     
     [general]
     
     # ControllerBlockType is the material allowed of new ControllerBlocks
     # Doesn't affect already assigned ControllerBlocks
     ControllerBlockType=IRON_BLOCK
     
     # QuickRedstoneCheck to false enables per-tick per-controllerblock isBlockPowered() checks
     # This is potentially laggier, but blocks can be powered like regular redstone blocks
     # If set to true, wire needs to be run on top of the controller block
     QuickRedstoneCheck=false
     
     # BlockProtectMode changes how we handle destroying controlled blocks
     # It has 3 modes:
     # protect - default, tries to prevent controlled blocks from being destroyed
     # remove - removes controlled blocks from controller if destroyed
     # none - don't do anything, this effectively makes controlled blocks dupable
     BlockProtectMode=protect
     
     # DisableEditDupeProtection set to true disables all the checks for changes while in
     # edit mode, this will make sure blocks placed in a spot will always be in that spot
     # even if they get removed by some kind of physics/flow event in the meantime
     DisableEditDupeProtection=false
     
     # 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
     
     # Nijikokun Permissions support
     # The nodes for permissions are:
     # controllerblock.admin - user isn't restricted by block counts or distance, able to
     #                         create/modify/destroy other users controllerblocks
     # controllerblock.create - user is allowed to setup controllerblocks
     # controllerblock.modifyOther - user is allowed to modify other users controllerblocks
     # controllerblock.destroyOther - user is allowed to destroy other users controllerblocks
     #
     # DisableNijikokunPermissions will disable any lookups against Permissions if you
     # do have it installed, but want to disable this plugins use of it anyway
     # Note: You don't have to do this, the plugin isn't dependant on Permissions
     DisableNijikokunPermissions=false
     
     # Users listed in ops.txt (op through server console) counts as an admin
     ServerOpIsAdmin=true
     
     # Everyone on the server can create new ControllerBlocks
     AnyoneCanCreate=true
     
     # Everyone can modify everyone elses ControllerBlocks
     AnyoneCanModifyOther=true
     
     # Everyone can destroy everyone elses ControllerBlocks
     AnyoneCanDestroyOther=true
     
     
     
     # BlockPhysicsProtectMode changes how we handle changes against controlled blocks
     # It has 3 modes:
     # protect - default, stops physics interactions with controlled blocks
     # remove - removes controlled blocks from controller if changed
     # none - don't do anything, could have issues with some blocks
     BlockPhysicsProtectMode=protect
     
     # BlockFlowProtectMode changes how we handle water/lava flowing against controlled blocks
     # It has 3 modes:
     # protect - default, tries to prevent controlled blocks from being interacted
     # remove - removes controlled blocks from controller if flow event on it
     # none - don't do anything, things that drop when flowed over can be dupable
     BlockFlowProtectMode=protect
     
     
     # SemiProtectedControllerBlockType is the material that semi-protected
     # Controller Blocks are made from, this block will turn on in a protected
     # state, but when turned off, blocks controlled won't disappear, instead
     # they lose their protection and can be destroyed
     SemiProtectedControllerBlockType=
     
     # UnProtectedControllerBlockType is the material that unprotected
     # Controller Blocks are made from, blocks controlled by this will create
     # when turned on, but won't disappear when turned off, much like the
     # semi-protected controlled blocks, however, blocks controlled have no
     # protection against being broken even in the on state
     UnProtectedControllerBlockType=SNOW_BLOCK
     
     # PistonProtection set to true disables the ability of Pistons to move
     # ControllerBlocks or controlled Blocks.
     PistonProtection=true
     
     [adminPlayers]
     # One name per line, users listed here are admins, and can
     # create/modify/destroy all ControllerBlocks on the server
     # Block restrictions don't apply to admins
     
     [disallowed]
     # Add disallowed blocks here, one Material per line.
     # Item IDs higher than 255 are excluded automatically due to failing Material.isBlock() check
     #RED_ROSE
     #YELLOW_FLOWER
     #RED_MUSHROOM
     #BROWN_MUSHROOM
     DIAMOND_BLOCK
     GOLD_BLOCK
     LAPIS_BLOCK
     IRON_BLOCK
     
  29. Offline

    Zero9195

    @Omen
    You did it wrong. Delte your old config. it will generate a new one with a new section at the end. Remember your old configs of course. At the end you then can add all unprotected blocks. The one you wanted to set is the ControllerBlockTYPE, which means the block which is powered, like the iron_block in default for protected cb's.
     
  30. Offline

    Omen

    All sorted out.

    Here is a video on how I created a spleef arena that repairs itself with one push of a button.

    Config settings are as follows -

    UnProtectedControllerBlockType=SNOW_BLOCK

    [unprotected]
    SNOW_BLOCK

    http://www.youtube.com/watch?v=GG-4g60NTWM
     

Share This Page