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

    xorvious

    Tested my new project that incorporates 2 large Portcullis and 3 Bridges, all normal operation and no errors logged. RB740, Bridges 1.3.6 and Portcullis 1.2.1
     
  3. Offline

    Captain Chaos

    Thanks for testing it!
     
  4. Offline

    Willobe

    Can i have SandStone slabs too, i know it seems silly but i think it would work for some designs
     
  5. Offline

    airsoftinva

    Hey I havn't seen any so I think I'm gonna go ahead and make a video tutorial on how to use this for you guys!
     
  6. Offline

    valdark

    Just made a great pit trap using this mod. Hid all the works and left a 1 block wide tunnel on the front edge of the bridge. When players trigger the pressure plate it retracts just slow enough that they are already on the blocks when movement begins and fast enough that they cannot cross the three block wide bridge in time.

    So this is now a triple use plugin. First bridges, then secret doors, now trap doors...... and I'm pretty sure it makes for great floating transport platforms but I haven't tested thoroughly.
     
    Captain Chaos likes this.
  7. Offline

    xorvious

    Captain Chaos likes this.
  8. Offline

    Brain

    Great plugin, I love it! Unfortunately I can't continue using it. :(
    On my server there are a few halfstep stairs with redstone wiring beneath and people have complained that some stair landings have started wandering around since I installed RectractableBridges. Quite a funny sight actually. :)
     
  9. Offline

    Captain Chaos

    Ouch. That's exactly why I'm so conservative about the materials with which can you build these things and picky about how you build them. But apparently not yet conservative enough...

    It should be relatively easy to stop the stair landings from wandering though, so maybe you don't need to disable the plugin altogether. You can add or take away a block so that the "bridge" isn't rectangular any more. Or mix different materials or steps and double steps. Or make sure the "bridge" is blocked on all sides by some other kind of block.
     
  10. Offline

    ShadowDrakken

    Loving this plugin as well as your portcullis plugin, and wanting to make a request :)

    Normally, redstone stops functioning on block-stairs if you place a block cutting the corner of one of the steps, this is normal and expected behavior. But something about the way your bridge plugin updates blocks isn't triggering the server to recalc redstone wires.

    Now, I'm not wanting to ask you to do a full recalc with every bridge update, but it would be nice that if during the extension or retraction process the bridge would check left and right sides for redstone and tell the server to recalc that redstone... this could be used for auto-triggering redstone events :)

    For example, in my attached screenshot, when the bridge moves towards the portcullis, it should recalc the redstone causing it to deactivate (and open the portcullis in this case XD)

    The screenshot was just a test setup to find out if it updates the redstone properly, it's not meant to be the final design, just to show the principal... so many things could be done with this "tripwire" effect :D traps anyone? >:]
     

    Attached Files:

  11. Offline

    Captain Chaos

    Intriguing request. Unfortunately I don't think there is anything I can do about that. I'm just removing and adding blocks, I don't have any influence over whether Minecraft correctly recalculates the redstone surrounding it. If it's not doing it correctly that's a deficiency of either Bukkit or Minecraft, over which I have no control...

    I don't think it should be necessary though. If redstone is triggering a bridge which is triggering redstone then you should always be able to just cut out the middleman (the bridge) and wire up the redstone directly to have the same effect, possibly using redstone repeaters to delay the signal.
     
  12. Offline

    ShadowDrakken

    because timing is everything, and with my bridge I want to use this on being some 90 blocks long, I don't want to deal with that many repeaters ;) Also, it's very handy for other scenarios besides just opening the portcullis, various different traps and triggers could be made if the redstone behaved properly.

    I know your plugins currently has no influence, that's why I asked if you could make it influence by checking either side of the bridge as it adds the blocks, and if it finds redstone wire tell the server to update that block :)

    hrm, did some more testing, fails to update the redstone wire when a player manually places a block as well... so... how do I report bugs to the Bukkit team? XD

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

    lordzombiejesus

    Hey there! I’ve been using your mod for a weeks now (and also your portcullis mod too) and just wanted to say how much i love them! Fantastic ideas designed beautifully, and i hope you never stop keeping them up to date. I thought you might like these two videos, the first showing the creation and the second showing how it was made using your drawbridge mod. Comment on YouTube or on here with any thoughts you have!



     
    Brain and Captain Chaos like this.
  14. Offline

    Captain Chaos

    To anyone who is still seeing sporadic NullPointerExceptions from this plugin in their server logs, please vote for bug 717. It's not getting any attention, and it could be causing problems for other plugins as well, so let's try to bring it to the attention of the Bukkit developers.
     
  15. Offline

    petteyg359

    A thought to make elevators: Check redstone as it is done with PorteCoulissante, on the sides of the bridge. If every block is powered, then move vertical until blocked, and move back down when unpowered. Would only work for two levels, but would be simpler than some big multi-floor multi-command elevator plugin. Also, maybe add a check (maybe optional if you add a config file, or with a configurable range X) that makes it so a bridge/elevator doesn't move if no blocks are detected within X blocks across/up so that a bridge/elevator doesn't end up floating away across the map or up in the sky.
     
  16. Offline

    ShadowDrakken

    I think the biggest problem with elevators is that MC doesn't like objects defying the built in gravity... it causes weirdness to happen :(
     
  17. Offline

    Captain Chaos

    The problem isn't so much coming up with a mechanism to identify and control the elevator. It's more that moving players around programmatically seems to be unreliable.

    The problem can be seen with RetractableBridge. If you're standing on the bridge when it moves it tries to move you along with it, but for some unknown reason this sometimes fails. You'll suddenly remain standing in same spot while the bridge moves out from under you, dropping you to the ground and possibly to your death if you don't react quickly. I have no idea why this happens, or whether it's a problem in Minecraft or in Bukkit. It just seems the teleport functionality is very unreliable.

    Until this problem is fixed I don't really want to make an elevator mod (although I'm not promising one even if it is!), because I'd want it to be absolutely reliable. The consequences of remaining in the same place would probably be worse for an elevator, especially when it's moving up. You'd end up inside the elevator blocks, and there not being any blocks beneath you, would instantly fall through it to the ground, possibly to your death.
     
  18. Offline

    dompie

    I installed your plugin on my server and it works fine!
    But I think sooner or later someone will forget to put a stop block on the beginning/end resulting in a flying bridge over half the map? Could you introduce a max-slide-distance value? Is this maybe already build in?

    Cheers
     
  19. Offline

    Captain Chaos

    It's not built in, and I don't really want to add it, for several reasons: firstly I like the simplicity that comes from having no configuration options. Secondly, I don't like arbitrary constraints; there might be legitimate reasons why you would want bridges to be able to travel huge distances (you can make a flying carpet-like means of transportation with it, for instance). And lastly, it would entail adding the entire configuration mechanism first, since there are no configuration options now, which would be relatively a lot of work.

    It's a minor nuisance when a bridge gets loose. It won't destroy anything, so you can't grief with it effectively, and it doesn't take up much server resources or cause lag or anything. It will stop on its own once it reaches the edge of the known world, or you can stop it relatively easily by quickly building a column of dirt or something in its path.
     
  20. Offline

    dompie

    Ah, that's a great idea with the flying carpet...didn't think of that usecase. I'll see how my players will use this new feature, they're already making plans and discussing the new possibilities ;)

    Thanks a lot!
     
  21. Offline

    Captain Chaos

    Let me know if they build anything cool, I'd like to come by and take a look! :)
     
  22. Offline

    errdivideby0

    Is there anyway you could make it so that minecart tracks would move with the bridge when it's pushed out/pulled in?
     
  23. Offline

    Captain Chaos

    I agree that would be very cool, but unfortunately it has the same downside as allowing the bridge to be made up of different kind of blocks: it would mean having to move every block every time the bridge moves, instead of only having to add blocks on the leading edge and remove them on the trailing edge, which would cause lag, especially with larger bridges.
     
  24. Offline

    ShadowDrakken

    I don't know if it's true of mine tracks or not, but I know fence posts turn invisible if they don't have solid blocks next to them... I've used this to make what appears to be retracting side rails :) if the same holds of minetracks, it could be an equally useful exploit
     
  25. Offline

    Fawa

    Anyone else having any issues with the mod tonight?? I had a working bridge, and decided it was not progressing fast enough so I added a few more redstone underneath the bridge, only to have it cease functioning. So I removed said redstone, nada, the bridge still refused to budge. I rebuilt the entire section of bridge, again to no avail. So I reinstalled the mod, nothing, lastly rebuilding the entire bridge again with no success.

    P.S. - Built miniature versions in a different location to test, and still saw no functionality.
     
  26. Offline

    errdivideby0

    I know in movecraft he has it so stuff will move with the blocks underneath. Maybe you could take a look at his coding to figure it out, Idunno if that'd be of any help.
     
  27. Offline

    Captain Chaos

    Are you sure you're powering the correct blocks? You say you added redstone underneath the bridge; are you laying it directly beneath the bridge? Because that would be the wrong place. You should be powering a block beneath the bridge with redstone (from underneath or from the side), not the bridge itself.
     
  28. Offline

    ShadowDrakken

    Buil 793 fixed my redstone wire issue :D

    So I now have portcullises that automatically open when a bridge is fully extended, and automatically close when the bridge begins retracting :D Making these two plugins pure awesome now XD
     
    Captain Chaos likes this.
  29. Offline

    Fawa

    To my chagrin I was creating the wrong setup, not really sure how they managed to receive power beforehand. Sorry for the misconception there. Forever and ever, this mod will remain on my top 5 favorite lists. Friend and I are building an immense castle-like structure/town. Will have to send a pic once its done :D
     
  30. Offline

    Captain Chaos

    Yeah, it's easy to power the bridge by accident by laying redstone directly underneath it. The redstone is powering the blocks to the sides of it, and those might be beneath the bridge.

    The reason it works this way is that it allows you to hide the redstone completely, even if the bridge is fully closed. If you would have to lay the redstone directly beneath the bridge it would be exposed when it closed.

    Please do, I'd love to see it. Or better yet, invite me over! :)
     
  31. Offline

    jamescosten

    Hey i have just reviewed this Plugin : Check it out.



    Love this plugin Well done Captain Chaos.
     
    Captain Chaos likes this.
Thread Status:
Not open for further replies.

Share This Page