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.

    Features:
    • 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
    Usage:
    • 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:
    [​IMG]

    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):
    [​IMG]

    More information:

    For download links, source code, configuration information and change logs, please go to the BukkitDev page for RetractableBridge:

    http://dev.bukkit.org/server-mods/retractablebridge/
     
    kawa1107, Undrtakr, Xordaii and 8 others like this.
  2. Offline

    valdark

    Nope takes you right along with it. Works on 602 like clockwork
     
  3. Offline

    heroanth2345

    hmmm thats pretty awesome but could you do that we can adjust the bridge moving speed?
     
    SuicideHotline likes this.
  4. Offline

    Devian50

    Same here! Love your PorteCoulissante plugin! If ya wanna see my lame @$$ server its through hamachi... and mainly for me and my friends... BUT STILL! :D PM me if ya wanna connect...

    NB: the server is run on my personal laptop so itll only be on when I choose to startup the server... :p
     
  5. Offline

    Itssnowing

    Yay, someone else who does that! XD
     
  6. Offline

    petteyg359

    If this and PorteCullisante had flattr pages I'd give you some cents per month :)
     
  7. Offline

    heroanth2345

    if you leave the chunk before the brigde get back, it freeze so you need to get all your way by there to destroy the frozen bridge .... Is there anyway you could fix this?
     
  8. Offline

    SuicideHotline

    Agreed, i was just coming on here to ask if we can get a config file or something to adjust the move speed, i want like 4x faster as i have a 35 block bridge and it takes forever to fully move. id like to be able to adjust speeds to see whats a good speed.
     
  9. Offline

    Luckz

    Thanks to your glorious plugin and some remote redstone action, I now have a moving platform to travel on, and it can even be called from the other side. It's just a tad slow for this usage ;P.
    [​IMG]
     
  10. Offline

    Clueless

    Or... you could have just searched for elevator and found this http://forums.bukkit.org/threads/mech-elevators-v1-4-1-rb-602.2584/ so like you said whala instant elevator... lol.

    Btw I was wondering if you could make it able to bind to a switch instead of having to connect it to redstone. It would make this so much easier to work with but either way I like building castles so I am getting it. Thanks for your amazing castle plugins.

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

    slay_mithos

    you can already do it with a switch directly (same for the PorteCoulissante).

    In fact, I do them without the least bit of redstone when I start a new server, and modify them later with complex circuitry.

    All you need to do is to place a switch directly on a bloc that is under the bridge, preferably on the outside part:

    this is your bridge
    [cobble][logtop][logtop][logtop][air][air][cobble]
    [cobble][cobble][cobble][cobble][air][air][cobble]
    [cobble][cobble][cobble][cobble][cobble][cobble][cobble]

    this is the square just at the side of your bridge
    [cobble][air][air][air][air][air][cobble]
    [cobble][air][air][stick][air][air][cobble]
    [cobble][cobble][cobble][cobble][cobble][cobble][cobble]

    Like this, you only have to use one switch.

    The other way around would be to put one switch at each side, but it would require to activate them two times each time you want to move your bridge.

    Hope it helped
     
  12. Offline

    valdark

    Yes but the point is that Captain Chaos is building plugins that require 0 commands to build.

    Also... I probably should have continued the elevator conversation in the PorteCoulissante thread as it is using that plugin. Just updated to 617. Bridges working perfectly.
     
  13. Offline

    Captain Chaos

    I hadn't heard of Flattr yet. Thanks for the tip! It looks like a really good idea. I'm definitely going to put Flattr buttons up... :)

    Interesting that it comes from Sweden, just like Minecraft. Good things come from Sweden, apparently!

    I got many requests for the speed of the bridge to be higher, or configurable, so I decided to implement it. I didn't want to mess about with configuration files or signs on the bridges or anything like that though. And I also wanted the default speed to remain the same, and for everyone to be able to decide the speed of their own bridges, not for it to be set by a server admin for an entire server. Some people may still want to create simple castle entry bridges and like the speed it is now just fine...

    So I came up with the following: if you want the bridge to move faster, you apply more redstone power! You can power from one to three blocks (or more of course, but that won't make it go any faster). One block gives you the speed it has now, two blocks will double the speed and three blocks will double it again (so four times the original speed).

    I uploaded a new version of the plugin which implements this scheme, version 1.1.0. You can download it here, or from the top post.

    Let me know what you think! I can't make it much faster than the top speed it has now, without creating juddery motion or lag, so I hope it's fast enough for the speed freaks out there... ;)

    Not easily. It would mean having to save state on the server (namely a list of all bridges and their positions, directions and speeds), and I would really like to avoid that as it adds a lot of complexity and potential problems.

    For most true bridges this won't be a problem, since they are always in contact with redstone. They might stop moving, but you can unstick them by cycling the power. For flying carpet-like constructions, for now, you'll have to make sure you don't leave the area until it has arrived and has stopped somewhere. I don't imagine that should be a problem, usually. Why would you teleport off of a flying carpet?

    Nevertheless, if it becomes a big problem, let me know and I'll look into ways of mitigating it...

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

    dmower

    First off, thanks for the great plugins, love this one and the porticulis plugin.

    I read through the thread and saw some mention of changing which blocks are moveable, and while I agree that having it changeable per construction would be a pain, but maybe a simple config option for block id? I'd personally like to use a double wood slab instead of a single. Normally I would agree that the single slab looks "realistic" but in my case I have a very large castle that would look better with a ver large bridge. It would also suit the design of my bridge a bit more to have a full size block (instead of half) in order to make it blend with the structure better.

    Either way though, great work!
     
  15. Offline

    Captain Chaos

    You make a good point about the double slab block. I didn't think about that. A regular full wood or wooden planks block would be too common in the world to use, the chance would be too high that it would be touching some redstone by accident and start moving. But of course a double wood slab looks exactly the same, yet is a different and relatively rare block. Hmm...
     
  16. Offline

    Ryan Johnson

    I think you should make a config file, so you can set speed and block type there. So then people who want a realistic bridge can set a slower speed, and people using like a ferry or large bridge across the ocean can have higher speeds, and also set it to look how they want. Just an idea :D
     
  17. Offline

    Tallinu

    I just started using your Portcullis mod today, and I have to say it's quite nice. (Standing on top of one as it ascends is a rather odd experience, but at least no suffocation occurs, and you can move out of it!)

    The plugin could even treat double-stacked and single wooden slabs identically for the purpose of detecting the bridge size and shape, allowing a mixture of block heights to be used in a single bridge. It would take a little more work - it would need to move the whole bridge pattern forward or backward with each step, as opposed to simply altering the blocks at the leading and trailing edges - but I think it would be a wonderful addition beyond simply allowing uniformly full- or half-thickness bridges. For example, this would allow you to use full-height blocks for both the edge that contacts the far shore and the edge that slides out from under a covering deck to allow smooth jump-free walking up onto that deck, while using the thinner material for the rest of the span between those edges if desired.

    Excellent work - it's an ingenious solution even as-is! And that goes for your portcullis plugin as well, of course.

    (If only half-blocks could be placed inverted, to occupy the upper half of a space!)

    [Edit for reading fail: Completely missed thread page 2's existence.]
     
  18. Offline

    dmower


    I think ultimately the problem is that depending on which server and plugins are being used, some blocks become less rare. This seems to be an issue with many plugins. At some point it seems like people decided iron blocks were "rare" and used them for the special block in their plugin, but now about 20 plugins have iron blocks defined as a default for something or other. As an admin of a server we need to balance what blocks are being used by other plugins with what people are using to build with.

    A good example would be a person on my server deciding to build a house out of lapis lazuli blocks. Generally this would never happen, and took him quite some time to gather the materials, but that particular block was designated as a very large city protection block due to me thinking it was rare that anyone might use it, or even make a block for that matter.


    Anyway, having them configurable would be amazing, having single and double slabs as static options is ok too, just not as flexible :)

    Thanks again!
     
  19. Offline

    Captain Chaos

    @Tallinu, @dmower: you both make excellent points. You'll be glad to hear that I just released version 1.2.0 of the plugin, which allows double slabs as the bridge building material... :) Also, it allows stone or cobblestone slabs or double slabs (not sandstone, I just thought a sandstone bridge would be silly). You can't mix materials or heights though, to try and keeps things simple and avoid lag or bad performance.

    Download it here, or from the top post.

    That's your lot for a while though. I've been spending way too much time on this lately. I have some Actual Work™ to do, and I'm also working on this WorldPainter thing. So I'll be responding less frequently here and on the PorteCoulissante thread for a while...

    I also have code ready to move players and items standing or lying on the bridge along with it. However, there is a bug in the current recommended version of Bukkit which generates runtime exceptions and which needs to be fixed first. I reported it as bug #630, but it turned out to be a duplicate of bug #607. Please vote for that bug, it's four days old already, it's very nasty, and very easy to fix, it should have been fixed long ago...
     
  20. Offline

    TOAST7312

    You release this right after I spend ours, without worldedit, building a 1/2 slab wooden drawbridge in the gate.. XD

    I love the fact that it can be made out of other materials now, ESPECIALLY double blocks. Now people don't have to jump up off the fully extended bridge!

    So not adding the ability to combine different types of slabs into a moving bridge was mostly a performance decision right? I'm just curious because I would like to see that, as what was formerly where my bridge was was a geometric mosaic and I would rather like if I could have my cake and eat it too. :p

    Btw keep up the good work.
     
  21. Offline

    Captain Chaos

    The bug has already been fixed. That was quick! :)

    In CraftBukkit build 626 to be precise. Here is version 1.3.1 of the plugin, which adds support for moving players standing on the bridge along with it. Since it crashes on CraftBukkit versions earlier than 626 I'll keep it a separate download for now, until the bug fix is included in a recommended release.

    Sorry... ;)
    Yes. Like Tallinu says, it would involve changing *all* the blocks of the bridge every time, and as you can see in, for example, big explosions or forest fires, Minecraft doesn't handle many blocks changing at once well. I'm afraid it would introduce lag. Right now it only has to add blocks at the leading edge of the bridge, and remove them at the trailing edge.

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

    tiga05

  23. Offline

    Itssnowing

    @tiga05
    Try adding a dirt block under the bridge, and putting redstone on that. The redstone might not be high enough ;)

    Edit: Woops, i figured it out i think! Use wooden half blocks instead of just wooden blocks :)
     
    tiga05 likes this.
  24. Offline

    TOAST7312

    Ah, yeah, I get it now. Thanks for clearing that up. I think one WorldEdit is working again I'll just change it to a Cobblestone or Smooth Stone bridge and leave it at that; maybe make the walls intricate instead or something. Also, why make 1.3 in build 626? Isn't 617 the current recommended?
     
  25. Offline

    Itssnowing

    617 is breaking things, i think.
     
  26. Offline

    tiga05

  27. Offline

    Itssnowing

    @tiga05
    Awesome! What was wrong?
     
  28. Offline

    TOAST7312

    That sucks; lets hope they change it soon, seeing as plugin artists tend to focus around the recommended build. X_X
     
  29. Offline

    tiga05

    @Itssnowing

    As you said: I didnt use wooden half blocks.
     
  30. Offline

    Captain Chaos

    Because there is a bug in version 617 that makes version 1.3 of the plugin crash. It's only just been fixed in build 626, but that isn't a recommended build.
     
    TOAST7312 likes this.
  31. Offline

    Itssnowing

    Ah, ok, sweet ^_^
     
Thread Status:
Not open for further replies.

Share This Page