Inactive [MECH] RetractableBridge - Easy and realistic retractable bridges

Discussion in 'Inactive/Unsupported Plugins' started by Captain Chaos, Mar 31, 2011.

Thread Status:
Not open for further replies.
  1. Offline

    Captain Chaos

    RetractableBridge moved to BukkitDev!

    RetractableBridge has moved to BukkitDev! I will no longer be updating this thread, please use the BukkitDev page to keep track of developments, download the plugin and source code, read how to configure it and other details, etc.

    RetractableBridge - The easy and realistic retractable bridges plugin:

    Build redstone powered rectractable bridges, without using commands! Much requested by the users of my PorteCoulissante plugin. If you know that plugin, this is basically the same thing, but horizontally instead of vertically... :)

    Download the latest release from the BukkitDev page.

    • It doesn't use commands. Just build the bridge and it will work.
    • Stateless, i.e. it does not have to save anything on the server.
    • It's redstone powered, giving you flexibility in controlling it.
    • It is realistic. The bridge does not disappear, but slides in and out just like a real one would.
    • Holds back water or lava... ;)
    • Configurable speed by applying more or less redstone power
    • Build the bridge itself, out of slabs/half-blocks or double slabs.
    • Make sure there is at least one block adjacent to the bridge on three sides, so that it can't move in that direction.
    • For the direction in which you want it to move, make sure there is a block to stop at the distance you want it to move to.
    • Power one of the blocks underneath the bridge with redstone. Please note: you are powering a block underneath the bridge, not the bridge itself! Note that for the purposes of this plugin, just running redstone wire underneath a block will power it.
    • If you power more than one block, the bridge will move faster! Two blocks doubles the speed, and three blocks doubles it once more (so four times as fast as one block).
    • Make sure that when the bridge is fully extended it is still in contact with redstone power underneath. It can be the same blocks, or different ones.
    • When the blocks receive redstone power, the bridge will move to the south or west (depending on which direction it is able to move in), when they lose redstone power, it will move to the north or east.
    • Here is an example. If you build this, it will work. The bridge in this picture is three blocks wide and four blocks long. Note that it only has one powered block, so the bridge will move at its slowest speed:

    Hints and tips:
    • The bridge has to be at least two blocks long on each side, and it must be rectangular. It can't have holes or bits sticking out. It also can't abut any other blocks of the same height and material (when open or closed), since the plugin will think they are meant to be part of the bridge.
    • I highly recommend to make the distance the bridge can move less than its length. That way, the blocks at the forward edge of the bridge (when it is open) are always in contact with the bridge, so you only have to power one of those blocks.
    • The bridge will go through (and hold back) water and lava, so you can make water gates and water or lava traps with them.
    • The blocks that stop the bridge when it retracts can be steps or stairs. This way you get a smooth walking experience when the bridge is closed, without having to jump, if you are using slabs/half-blocks for the bridge. Here is an example to show what I mean (the bridge is closed in this example, and there are wooden stair blocks on each end):

    More information:

    For download links, source code, configuration information and change logs, please go to the BukkitDev page for RetractableBridge:
    kawa1107, Undrtakr, Xordaii and 8 others like this.
  2. Offline

    Captain Chaos

    Yeah I know. Unfortunately I have no idea what causes this. As far as I can tell it's not a bug in the plugin. I try to move the user, but for some strange reason either CraftBukkit or Minecraft ignores it. There's not much I can do except wait and hope this problem will be fixed...
  3. Offline


    What mod is that? I might be interested, and so might other people. @Captain Chaos might even add a link to it if it proves worthy :cool:
    BTW, I voted "up" for the bug.
    EDIT: In the mean time, can you get it not to log these specific errors?
  4. Offline

    Captain Chaos

    I'd rather not. It is a genuine error, the only reason it doesn't cause trouble in this case is that it occurs after the bridge has stopped moving. If it occurs under different circumstances or after this bug has been fixed, I would want to know about it.
  5. Offline


    Ok, well nevermind then. I hope they'll get it fixed soon!
  6. Offline


    platform guide.jpg
    The platform Will keep moving till it hits something you will need another on the other end to be able to send it back This is for a Basic 3x3 platform. (depending on the direction of movement the platform moves when powered on or off) so if it dosen't work when you turn it on...turn it off) I use a button to solve this but the bridge power blocks HAVE to be on the first row of the platform otherwise it could have issues (this is not a bug its the nature of the plugin)

    The other mod that allows for directional control is ControllerBlock v1.18
    If you want I'll make another a guide for the 4 way platform switch too but it it really just levels 2 and 3 in this guide (minus the platform) built with switchable blocks on all 4 edges of the platform.

    Im also willing to build a guide like this one for bridges (elevators and portcullises for your other mod)

    ohh it proves worthy to me...the very same plugin also allows PorteCoulissante elevators to have multi-floor controll...just found this out and had to share it

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


    Yeah, but what's the name of the mod?
  8. Offline


    Wait.... You guys are not going to believe this. I found yet another plugin that allows 4 way platform gates as well.
    Are you ready for this?!?! PorteCoulissante v1.2.1 !!!!! Thats right thanks to the nature of both mods you can make 4 way platform trams AND......wait for it......Multi-floor elevators

    Thank you Captain Chaos for these two mods. If you give me a few days Ill post a youtube video of the whole working system as well as make you a building guide so we can get these two plugins the attention they rightly deserve "Captain Chaos's Retractable bridge/Moving platforms/ Platform Tram /Portcullises/Elevators Mod"
    (its a working title)

    on a side note i beg you for configurable portcullises. EDIT ( Leave the retractable bridge blocks alone you need them)

    I have a few other ideas ill be testing with these two plugins one includes retracting walls....(Hopefully the idea works)

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


    Oh, I get it now! You block one way or another with a PorteCoulissante, and then the platform only has one way to go! Smart! :cool: Well done! I'd be interested to see your set-up, though.
    dragon2k18 likes this.
  10. Offline


    Im about to post a video of my " Captain Chaos Playground" including a look the bare bones Bridge, and Portcullises, and the essentials of what has to be there to work, as well as expanding on the bridge to make moving platforms that come and go constantly, Long distance platforms (X-124 to X+550 no stops, no falling @ slightly greater then walking speed), The 4way platform tram network that covers more than 10,000 meters of straight line movement so far, and My Next to Newest discovery (still not sure how it works but it does, and only every once in a while Retractable Walls...(thanks to the stacking ability of slabs have made a Seemless retractable wall 4 wide and 3 high.) Also See a Few of my Secret discoverys but first i have to cut it down. We did a run through...and with tram rides and all one hour long video....and im only doing one run so after all that well just cut it down... I'll send you the full video upon asking but im not posting it here

    I will However post send Captain Chaos the World file so he can see these things work himself. Ill send it to you too Nitnelave
    Captain Chaos likes this.
  11. Offline


    It would be great if you could set up a permission to use this ability. I am looking to create classes based on groups and an engineer class that can use this when others cant would be phenomenal.. same for the gate mod.. these work fantastically. Although if i put any block on the moving platform it wont move. I have a platform over 500 blocks large moving with this plugin.
  12. Offline


    Well, the problem is, I don't think you could add permissions to the plugin as it is working now, because it doesn't have anything to do with the player who buids the bridge, and it doesn't save any data to a file. It just checks for a certain block configuration, so it could even happen naturally, if half steps were to happen naturally. So unless the dev proves me wrong, it would require a complete rewrite to enable permissions.
  13. Offline


    I can confirm you are right, block placements are not tracked natively (there are some plugins that can do so) and redstone doesn't track the activator so yes, permissions can not happen without needing a command to create a bridge and that won't happen as this is an NC2 plugin, not to mention it would take unnecessary extensions (namely a database) to even consider such a thing
  14. Offline


    On the permissions problem: You can use WorldGuard to place a small zone over the bridge and deny building or using within the area of the bridge + activation mechanism.

    I actually came here with a very different problem. I have a bridge that operates very simply. At the very end of where the bridge can is, there is a block with a button on it below it. Pushing the button will make the bridge move off the block before the button reverts to it's off state and therefore the bridge continues moving.

    On the other end it slides into place above a similar setup. This one isn't affixed to the very end though, since that is undesirable in my setup. When you press this button, as soon as it reverts to it's off state, the bridge starts moving back to it's starting position.

    I designed and tested this and it worked wondrously well.
    I was baffled when after a while, the bridge changed behaviour.
    Now it considers the other side at which it can be to be it's "ON side", and it's behaviour is totally ruined.

    The one side with the button on the outermost point, still behaves similar, but the bridge only starts moving once the button reverts to it's off state.
    On the other side, when I push the button, the bridge moves one step as soon as I press the button, then the button reverts to it's off state, and the bridge moves back to it's previous state. Now I can extend the bridge, but not retract it.

    |=========                            | "ON-side" (was and should be "OFF-side")
    Schematic side view of the bridge. Carets are where redstone buttons apply power.

    I tried rebuilding the bridge multiple times on different sides of the rail, hoping to fix the problem, to no avail.
  15. Offline

    Captain Chaos

    As others have correctly pointed out, this would require changing the plugin from being stateless to being stateful and configurable, which would be a lot of work. Also, I like it's statelessness, and I'm not a big fan of permissions, they seem unnaturally "magical" and unrealistic to me.
    No, the bridge doesn't move along blocks placed on it. This is for performance reasons, but also because there is no way for the plugin to tell whether you want the blocks to move with the bridge, or whether you want the bridge to slide beneath them.

    I can't explain why it would suddenly change behaviour. It has always been the case that when you use a button, and the redstone powered block is not at the very trailing edge of the bridge, the bridge will start moving when you press the button (at least if it would move south or west), but come back again once the button turns off, since the bridge is still in contact with the redstone. That's why it's better to use a lever, or some redstone circuitry which will provide the correct redstone power when you press the button, or place the redstone at the trailing edge of the bridge.

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


    I understand the points you make about the redstone. However now I don't understand how this worked in the first place. My bridge moved north at the push of the button at first, yet you say it should only move south or west. I designed and tested it working, and only when I returned later after building a second bridge a short distance to the north, it's behaviour had inexplicably changed. The bridge I built to the north is exactly the same design, but mirrored. This one still works perfectly.

    EDIT: I'm afraid I didn't make this clear. I'm not looking for a solution, I found that shortly after discovering the problem. I'm just trying to report it clearly in case this is a bug, so that it can be fixed easily in an upcoming release.
  17. Offline

    Captain Chaos

    The bridge goes south or west when it receives redstone power, north or east when it loses redstone power (not counting coming into contact with, or losing contact with, redstone powered blocks). So if it is blocked to the south but can move to the north, it will do so when the button turns off.
    I can't explain that. I'm pretty sure it's not a bug in the plugin though. I think more people (not to mention myself) would have noticed if the redstone sense was suddenly turned around 180 degrees...
  18. Offline


    since you aren't planning on setting this for permissions, would you be willing to let someone use your code to make a version that does? This and the gate plugin are awesome and I would like to make it so that people can become engineers and level, gaining a new ability with each level. It wouldn't need to be distributed, just have one of my admins make one specifically for my server.
  19. Offline

    Captain Chaos

    Well I did say I would release the source code so I guess I'll have to do that one of these days. As long as you didn't distribute it I would have no problem if you made changes like that. (It would be too bad for different versions of the plugins to proliferate publicly with all kinds of different but overlapping feature sets...)

    But it sounds to me you would like to control who can make bridges, not who can use them?
  20. Offline


    yes who can make them... not who can use them. I'm sorry, I should have worded that better. So basically anyone can use them, but only certain people will be able to create the bridges and gates.
  21. Offline

    Captain Chaos

    That would be very hard to do, since the only thing needed to make a bridge is to place blocks in a certain configuration. The only way to make it so that only certain people could make bridges would be to prevent people from placing blocks in the configuration that makes a bridge, which would neither be reasonable, nor feasible.

    To do what you want you would have to completely rewrite the plugin so that it is no longer stateless, but instead keeps track of which bridges exist (which would require a database), and requires a command (which would required adding command functionality) from a user to "create" a bridge so there is a hook to apply permissions to.

    You're welcome to wait for my source code of course, but what you want is so entirely different from what the current plugin does that I don't think there's much point, you might as well write it from scratch.
  22. Offline


    ah so you cant just add another parameter to the configuration of "IF configuration parameters are met AND the PLAYERGROUPNAME is met then it works otherwise it does not?"
  23. Offline

    Captain Chaos

    You could do that for using the bridge, but not for creating the bridge, as explained above. I guess another way to put it is that as far as the plugin is concerned, the bridge is only created when somebody tries to use it, so that's the only time it could apply restrictions. Until then, it's just another bunch of blocks that the plugin knows nothing about.
  24. Offline


    I did some more tests, with interesting results:


    I build a bridge that move north-south. It's affected by separate redstone circuits on both sides, the bridge is always connected to only one of these circuits. (I.e. when one end moves from the last block connected to the northern circuit, it also moves onto the first block connected to the southern circuit, and vice versa.

    The southern circuit is operated by the inverted signal from a pressure plate.
    The northern circuit is operated by a lever.

    Toggling the (northern) lever always* causes the bridge to move away from the north end.
    Toggling the (southern) pressure plate always always* moves the bridge away from the southern circuit when the inverted signal is low.
    When using the non-inverted signal from the pressure plate to control the bridge, it always starts moving away only when the signal goes low, after it has gone up.

    * When the bridge is located at that end of course, since otherwise it isn't connected to that circuit.

    At the northern end, the bridge always starts moving away on EVERY flank of the signal.
    At the southern end, the bridge always starts moving away on ONLY high to low flanks of the signal.

    I thought that's odd behaviour, since it seems the direction in which the bridge is free to move controls the flank at which the bridge will start to move. I consider this sometimes annoying, but as far as I know unavoidable in a stateless system. However, it seems that when the free direction is south, the bridge moves at every flank.

    Bridges with a different set-up do not exhibit this behaviour, even when set up in a fairly similar manner.
    I still haven't found the exact difference that causes this behaviour. One thing I'd like to test in the future is whether the number of inputs (controlling the speed) may have an effect on the direction in and flank on which the bridge starts moving.

    Anyway, I'll be sure to take a look at the source of the plug-in once released.

    EDIT: I love the stateless design, for it's ease of use, almost non-existent server load and general ingeniousness. I also love the challenge of analysing such designs.
  25. Offline

    Captain Chaos

    Thanks for the comprehensive report!
    This is very strange, and if true it would indeed be a bug. It's only supposed to move south when the signal goes from off to on, not when it goes from on to off.

    Can you send me this world so I can have a look for myself?
  26. Offline


    Well, I feel stupid.

    I copied and pruned the world to send it to you, and did some last minute testing, to be sure it still worked as I said.
    Then I discovered my mistake.

    The northern circuit doesn't only directly drive the bridge, it is also inverted under the far end of the bridge, after the entire wire has run under the bridge. Therefore the use of the lever toggles the bridge with the lever signal and, one tick later, with the inverse.

    When the lever is in the "ON" state, switching it off will cause the bridge to attempt a move north (or maybe no move at all). However, one tick later the redstone torch turns on and the bridge moves south.

    When the lever is in the "OFF" state, switching it on will cause the bridge to move south. One tick later the redstone torch will turn off. Apparently this doesn't affect the bridge.

    My guess is that this doesn't affect the bridge, because it's at that moment still in contact with the blocks that caused it to start moving south in the first place, and that has higher priority. But that is just a wild guess.

    In conclusion:
    • The bridge behaves according to your specifications.
    • I'm stupid because:
      • I totally had forgotten about the inverter (Even now I have no idea what it was supposed to do).
      • I didn't notice the one tick delay that occurred half of the times I switched the bridge.
  27. Offline

    Captain Chaos

    That's exactly what I thought might cause the behaviour you were seeing. But you explicitly mentioned the inverter at the southern end of the bridge, so I assumed you would have mentioned it if there was one at the northern end... ;)
    Hard to tell why it doesn't affect the bridge. Depending on the orientation of the inverter the two redstone signals (the one turning off, the other one turning on) may be being delivered at once, and there's no telling how the bridge will behave then.

    Anyway, no problem! This stuff is pretty complex, it's easy to make a mistake and to miss the forest for the trees...
  28. Offline


    This should work well with WirelessRedstone
  29. Offline


    Hello, I was making a bridge to my floating castle in skylands when I encountered a problem... it didn't work. Here are some photos and hopefully somebody can see what I'm doing wrong.





  30. Offline

    Captain Chaos

    It looks like you have your redstone in the wrong location. Remember, the redstone should not power the bridge, it should power one or more blocks beneath the bridge. Remember also that the redstone doesn't have to be beneath those blocks, it can also be to the side of them.

    Edit: also, there is no point in powering more than three blocks beneath the bridge. Up to three blocks will give the bridge a speed boost, but any additional blocks make no difference.
  31. i tried this and it was buggy, i managed to make a bridge which moved with hell of a lot trouble doing it, i was ON the pridge while it moved -> it worked like a freaking elevator :D did not CREATE a bridge , it just moved to the other end of the place ^^ and i didnt even stick on it coz i fell down always, pretty buggy i say
Thread Status:
Not open for further replies.

Share This Page