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

    Captain Chaos

    Possible, yes. Will I do it, no. ;)

    One of the major reasons I wrote PorteCoulissante is because I wanted a portcullis that would act realistically, not magically. Same for the bridge. There already is another portcullis plugin which does what you want (called Portcullis; I don't know if it's been kept up-to-date though). I don't know about other bridge plugins. Sorry!
     
  3. Offline

    Kahl

    Ah alright thanks. We were hoping to make a very long bridge but seeing as we'd have to hide the whole thing on one side it doesnt seem practical :p

    Great plugin nonetheless.
     
  4. They did for me, i used wooden double-halfstone as the bridge itself, then i covered the top in normal halfstone and sides with cobble (except the side where it slides out).
    When i activate the bridge, it slid out perfectly fine, except the normal halfstones moved with it, and when the bridge itself came to a stop, they kept moving forever :( and i was using 1.2.0
    That's why i would like to see a config where i could specify the only type of block(s) that it could move
     
  5. Offline

    Captain Chaos

    Hmmm. I wasn't aware I'd changed anything in the redstone handling, but it sounds like the plugin is seeing the normal halfstone cover as a second bridge! Could it be that you have some redstone two blocks beneath it (i.e. directly beneath the bridge proper)?
     
  6. Nope, i only had 1 block connected to redstone, it was powering a cobblestoneblock right below the bridge, but any halfstone blocks connected to the bridge itself moved (some even moved in opposit direction of the bridge itself)
     
  7. Offline

    Captain Chaos

    Can I come take a look on your server?

    Edit: or can you post a picture showing exactly what you built, so I can try to replicate the problem?
     
  8. Offline

    slay_mithos

    Seeing how good your two plugins are, you should try tu submit to Mojang for it to be implemente ingame when you think you have finished them.

    I mean, they already put the light mod, and plan on putting the piston mod.

    Your mod giving a good playability, being "inside" the game (no console etc) and fitting with the rest of the existing features, it could be great to see them in single player too.
     
  9. I got it working, apparently the server thought the blocks were the same or something, because after a restart they were turned into the same type. Now when i recreate it with the correct blocks it all works perfectly!
     
  10. Offline

    Kahl

    Code:
    03:46:47 [SEVERE] java.lang.NullPointerException
    
    Got this on 617. Only running "world", we have no separate worlds.
    Any idea what it could be? Because we really like this mod.
     
  11. Offline

    LtDan

    i cant get this to work.....is anyone going to post a video anytime soon? i followed the instructions in usage and put redstone under the bridge but it wont work
     
  12. Offline

    Captain Chaos

    Alright, I'm glad to hear that! :)

    You need to give a bit more information. How do you know that line pertains to this mod? What exactly were you doing at the time? There should be a lot more lines beneath that one in the log, which indicate where exactly the exception occurred, can you post those lines too?

    You probably need to put the redstone lower down. It shouldn't be directly underneath the bridge, it should be beneath the blocks that are directly beneath the bridge.

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

    Kahl

    Sorry, I thought it had posted the whole thing but I guess it didnt.

    Here it is:
    Code:
    03:46:46 [INFO] §f[§9Mod§f] Zippyspeed§f: pool
    03:46:46 [WARNING] Can't keep up! Did the system time change, or is the server overloaded?
    03:46:47 [SEVERE] java.lang.NullPointerException
    03:46:47 [SEVERE]     at org.pepsoft.bukkit.retractablebridge.BridgeMover.moveBridge(BridgeMover.java:94)
    03:46:47 [SEVERE]     at org.pepsoft.bukkit.retractablebridge.BridgeMover.run(BridgeMover.java:65)
    03:46:47 [SEVERE]     at org.bukkit.craftbukkit.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:122)
    03:46:47 [SEVERE]     at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:356)
    03:46:47 [SEVERE]     at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:283)
    03:46:47 [SEVERE]     at net.minecraft.server.ThreadServerApplication.run(SourceFile:375)
    03:46:47 [SEVERE] Unexpected exception
    java.lang.NullPointerException
        at org.pepsoft.bukkit.retractablebridge.BridgeMover.moveBridge(BridgeMover.java:94)
        at org.pepsoft.bukkit.retractablebridge.BridgeMover.run(BridgeMover.java:65)
        at org.bukkit.craftbukkit.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:122)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:356)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:283)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:375)
    03:48:21 [SEVERE] java.net.SocketTimeoutException: Read timed out
    03:48:21 [SEVERE]     at java.net.SocketInputStream.socketRead0(Native Method)
    03:48:21 [SEVERE]     at java.net.SocketInputStream.read(SocketInputStream.java:146)
    03:48:21 [SEVERE]     at java.net.SocketInputStream.read(SocketInputStream.java:199)
    03:48:21 [SEVERE]     at java.io.FilterInputStream.read(FilterInputStream.java:83)
    03:48:21 [SEVERE]     at net.minecraft.server.Packet.b(Packet.java:73)
    03:48:21 [SEVERE]     at net.minecraft.server.NetworkManager.f(NetworkManager.java:130)
    03:48:21 [SEVERE]     at net.minecraft.server.NetworkManager.c(NetworkManager.java:229)
    03:48:21 [SEVERE]     at net.minecraft.server.NetworkReaderThread.run(SourceFile:68)
    03:48:52 [SEVERE] java.net.SocketTimeoutException: Read timed out
    03:48:53 [SEVERE]     at java.net.SocketInputStream.socketRead0(Native Method)
    03:48:53 [SEVERE]     at java.net.SocketInputStream.read(SocketInputStream.java:146)
    03:48:53 [SEVERE]     at java.net.SocketInputStream.read(SocketInputStream.java:199)
    03:48:53 [SEVERE]     at java.io.FilterInputStream.read(FilterInputStream.java:83)
    03:48:53 [SEVERE]     at net.minecraft.server.Packet.b(Packet.java:73)
    03:48:53 [SEVERE]     at net.minecraft.server.NetworkManager.f(NetworkManager.java:130)
    03:48:53 [SEVERE]     at net.minecraft.server.NetworkManager.c(NetworkManager.java:229)
    03:48:53 [SEVERE]     at net.minecraft.server.NetworkReaderThread.run(SourceFile:68)
    03:49:37 [SEVERE] java.net.SocketTimeoutException: Read timed out
    03:49:37 [SEVERE]     at java.net.SocketInputStream.socketRead0(Native Method)
    03:49:37 [SEVERE]     at java.net.SocketInputStream.read(SocketInputStream.java:146)
    03:49:37 [SEVERE]     at java.net.SocketInputStream.read(SocketInputStream.java:199)
    03:49:37 [SEVERE]     at java.io.FilterInputStream.read(FilterInputStream.java:83)
    03:49:37 [SEVERE]     at net.minecraft.server.Packet.b(Packet.java:73)
    03:49:37 [SEVERE]     at net.minecraft.server.NetworkManager.f(NetworkManager.java:130)
    03:49:37 [SEVERE]     at net.minecraft.server.NetworkManager.c(NetworkManager.java:229)
    03:49:37 [SEVERE]     at net.minecraft.server.NetworkReaderThread.run(SourceFile:68)
    
     
  14. Offline

    MeinerHosen

    Hey there, don't know if this was suggested or not, but having bridges move for only as long as they are built would be a GREAT option. By that I mean if the bridge section is 2x6, it can only move 6 blocks or so without running off and you having to go chase it.

    I know I could use this plugin with minimum problems, but then there is everyone else on the server that may screw up on purpose/accident.

    Thanks for your time
     
  15. Offline

    xxduby

    Its a very good plugin and good job, just one problem with me, is that i cant make the bridge come back
    any ideas why thats happening?
     
  16. Offline

    Captain Chaos

    I like that it can extend further than its own length, as it enables you to create ferries (if you put it over water), flying carpets, etc., so I don't think I will put in this restriction.

    Did you log out around that time? What I think is happening is that the world was unloaded while the bridge was still moving. I fixed that bug in version 1.3.1, but you'll need CraftBukkit build 626 or higher (the current recommended build is 670) to use that version of the plugin. Would you mind testing it out and letting me know the result? You can download version 1.3.1 of the plugin here.

    The bridge is probably not over a redstone-powered block when it is on the other side. Remember, you're powering a block beneath the bridge, not the bridge itself. It goes (from top to bottom):

    [bridge]
    [block]
    [redstone dust]

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

    Kahl

    I'll do that as soon as I update to the new recommended build. I am just going to make sure it won't cause any conflicts with my other plugins first :)
     
  18. Offline

    srhadaham

    I'm new to this so if this is a dumb question so be it.
    Do the numbers in the title indicate that this only works in build 556 through 617?
    I am currently using build 646
     
  19. Offline

    Captain Chaos

    No, it just means that it has been tested to work with those versions. It should work fine with any later versions.

    Actually, I'm about to release version 1.3.1 of the plugin, which will only work with CraftBukkit build 626 or later (including the current recommenden build, 670).

    Alright, I just officially released version 1.3.1 of the plugin, since the current recommended CraftBukkit build (670) has the needed bug fix in it:
    • Entities standing on and items laying on a bridge are now moved along with it when it opens or closes!
    • A bug has been fixed which caused server errors when a bridge was still moving when a world was unloaded.
    Download it here, or from the top post. Please note: it only works with CraftBukkit build 626 or later (including the current recommended build: 670)! If you accidentally upgrade the plugin you can download version 1.2.0 from the top post.

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

    DizzitY

    have u released source codes for this yet?
     
  21. Offline

    xieno

    I would like you to take a look at my server, I am more than likely doing something wrong, but I can't figure out what. PM me if you're willing to check it out.

    My server crashed upon building a big bridge, then crashed upon me building a smaller one. However when i rejoined after the smaller one, I notice it TRIED to move the blocks, but it just extended the wooden slabs by 1 block. This is the error:

    Code:
    2011-04-10 01:28:36 [SEVERE] java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to [Lnet.minecraft.server.Entity;
    2011-04-10 01:28:36 [SEVERE]     at org.bukkit.craftbukkit.CraftChunk.getEntities(CraftChunk.java:84)
    2011-04-10 01:28:36 [SEVERE]     at org.pepsoft.bukkit.retractablebridge.BridgeMover.moveEntities(BridgeMover.java:184)
    2011-04-10 01:28:36 [SEVERE]     at org.pepsoft.bukkit.retractablebridge.BridgeMover.moveBridge(BridgeMover.java:156)
    2011-04-10 01:28:36 [SEVERE]     at org.pepsoft.bukkit.retractablebridge.BridgeMover.run(BridgeMover.java:67)
    2011-04-10 01:28:36 [SEVERE]     at org.bukkit.craftbukkit.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:122)
    2011-04-10 01:28:36 [SEVERE]     at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:356)
    2011-04-10 01:28:36 [SEVERE]     at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:283)
    2011-04-10 01:28:36 [SEVERE]     at net.minecraft.server.ThreadServerApplication.run(SourceFile:375)
     
  22. Offline

    Captain Chaos

    Which CraftBukkit build are you running?

    Not yet, but I intend to.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 13, 2016
  23. After updating my server to 670 and redownloading the plugins that needed updating (including yours) i now get this error whenever i try to activate a bridge, but nothing happens:

    Code:
    11:30:00 [SEVERE] java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to [Lnet.minecraft.server.Entity;
    11:30:00 [SEVERE]     at org.bukkit.craftbukkit.CraftChunk.getEntities(CraftChunk.java:84)
    11:30:00 [SEVERE]     at org.pepsoft.bukkit.retractablebridge.BridgeMover.moveEntities(BridgeMover.java:184)
    11:30:00 [SEVERE]     at org.pepsoft.bukkit.retractablebridge.BridgeMover.moveBridge(BridgeMover.java:156)
    11:30:00 [SEVERE]     at org.pepsoft.bukkit.retractablebridge.BridgeMover.run(BridgeMover.java:67)
    11:30:00 [SEVERE]     at org.bukkit.craftbukkit.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:122)
    11:30:00 [SEVERE]     at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:356)
    11:30:00 [SEVERE]     at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:283)
    11:30:00 [SEVERE]     at net.minecraft.server.ThreadServerApplication.run(SourceFile:375)
    11:30:00 [SEVERE] Unexpected exception
    java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to [Lnet.minecraft.server.Entity;
        at org.bukkit.craftbukkit.CraftChunk.getEntities(CraftChunk.java:84)
        at org.pepsoft.bukkit.retractablebridge.BridgeMover.moveEntities(BridgeMover.java:184)
        at org.pepsoft.bukkit.retractablebridge.BridgeMover.moveBridge(BridgeMover.java:156)
        at org.pepsoft.bukkit.retractablebridge.BridgeMover.run(BridgeMover.java:67)
        at org.bukkit.craftbukkit.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:122)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:356)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:283)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:375)
    
    And that then completely crashes the server...
    please fix this :(
     
  24. Offline

    kahlilnc

    So where does the redstone have to be to make this work? UnderNeath?
    I am about 100.1% this does not work for CB 670 or I am doing it wrong which I doubt, someone help by repling or make a video please.
     
  25. Offline

    fullwall

    Looks like a bukkit exception to me.
     
  26. Offline

    Captain Chaos

    That exception is the result of a bug in CraftBukkit which was fixed in build 626. If you really are running build 670 I can't explain how you can be seeing this. Are you quite sure you're actually running build 670? Can you show me the part of the server log where the server is just started and it lists the build number?

    I've released a new version of the plugin: version 1.3.2. It checks the CraftBukkit build number, and disables the functionality which triggers the CraftBukkit bug if your CraftBukkit version is too old (older than 626). This makes the latest version of the plugin work again on all supported CraftBukkit builds, and will hopefully prevent the exceptions which people are seeing.

    Download it here, or from the top post.

    It does work in CB 670. The redstone does not go directly underneath the bridge, but one level further down. If you look carefully at the images in the top post you should be able to see how it goes.

    I also made a few schematics which may make things clearer in this post. And Greylocke put up some detailed images of his bridge to help people out on Flickr.

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

    KrazyBonez

    Does this thing cap out at 4 powered blocks on the speed? Made an epic dungeon but my path wont go any faster than the rest of them, and its powered by 5 blocks, not 4. 4 blocks is barely fast enough man, i agree with others and say you should up the speed a little bit, i agree not much, or just make it possible to multiply speed one more time with more powered blocks? aka switching 4 blocks to 5 giving you a very nice speed boost.

    Edit: Im going to download fraps and try to make a video of my automatic walkway to show you why i would want a little more speed
     
  28. Offline

    Captain Chaos

    Actually it maxes out at three powered blocks. For now I'm not going to make it any faster, because it becomes unstable. Minecraft/CraftBukkit can't handle such speeds, it becomes jerky and laggy, people fall off, etc. If that situation improves I may add more speed.
     
  29. Offline

    KrazyBonez

    But i want people to fall of man, its a dungeon....come on at least make 2 seperate versions one with 3 max one with 5 max or something...for those of us who want to make dungeons out of ur walkways :)

    Prime example here in this short, laggy video



    Just started to learn redstone about 3 days ago, but im gettin the hang of it xD
    Anyways, yeah, im just trying to pressure you about the speed cuz its a big drawback right now, i want to build more epic parts of the dungeon but need MOAR SPEED! I want my members falling into lava over and over trying to get to the prize area :(
     
    Captain Chaos likes this.
  30. Offline

    Captain Chaos

    No, because then everybody will come to me to complain about my bridges being laggy and jerky. ;-)

    I promise I will keep an eye on the situation, and when I think I can increase the speed and still maintain reliable operation I will do so. But it doesn't have high priority, as this plugin is really meant for bridges and all these other things are just nice side benefits, and for bridges the highest speed is already a bit high if you ask me... ;-)

    I'm sure you'll find ways... ;-)

    How about having the bridges pass underneath things that you must jump over?

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

    KrazyBonez

    New video, take a look, edited it to replace the old one, hated the 30 second thing. You are more than welcome to use it in your original post as an example and i can record other things if you would like just so you can replace those pictures with videos bro.
     
Thread Status:
Not open for further replies.

Share This Page