[INACTIVE][FUN] BetterMechanics v1.10 - Bridges, Doors, Gates, Cauldrons and more [1000/953/935/860]

Discussion in 'Inactive/Unsupported Plugins' started by Edoxile, Jun 10, 2011.

     
  1. Offline

    Edoxile

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    BetterMechanics - The Mechanics Plugin:
    Version: v1.10

    Works on the latest RB (1000).

    This plugin is written to replace CraftBook and CraftBookMechaisms, because they lacked some features I needed on the server.

    I've also added a new feature, called the pen.

    Features:
    • CraftBook-stuff (take a look at the CraftBook wiki to find out how you build these):
      • Door
      • Gate
      • Bridge
      • Lift
      • Hidden switch
      • Cauldron -> Updated the cauldron completely, now leaves non-recipe blocks intact. Using new recipe format as of 1.7
      • Ammeter
        Bridges, Gates and Doors need a chest with the items, so they're not spawned.
    • Added:
      • Small door (door with width 1, sign label is [sDoor]/[sDoor Up]/[sDoor Down])
      • Small bridge (bridge with width 1, sign label is [sBridge]/[sBridge End]
      • Pen
        you can put text in your memory and paste it on a sign. This only works if you can build in the area.
        Very useful if you have a plugin like MinecartMania running. How this works:
        • Commands:
          /pen set <text> » set the sign text (the char '^' is a line break)
          /pen setline <line> <text> » set one line of the text (lines start at 0)
          /pen clear » clears the current text
          /pen dump » dumps the current text
          /pen clearline <line> » clears the line (set to "", lines start at 0)
        • Control:
          Right clicking a sign will either place the text on the sing, or, if your memory is emtpy, load the text in your memory.
          The tool can be changed in the config, but the default tool is a piece of (char)coal.
    All these features have permission nodes, and a (Meaglin's) Zones and/or WorldGuard check is possible. Just edit the config to enable or disable these features. The permission nodes are:


    Code:
    bettermechanics.small_bridge.use
    bettermechanics.small_bridge.create
    
    bettermechanics.bridge.use
    bettermechanics.bridge.create
    
    bettermechanics.small_gate.use
    bettermechanics.small_gate.create
    
    bettermechanics.gate.use
    bettermechanics.gate.create
    
    bettermechanics.small_door.use
    bettermechanics.small_door.create
    
    bettermechanics.door.use
    bettermechanics.door.create
    
    bettermechanics.lift.use
    bettermechanics.lift.create
    
    bettermechanics.hidden_switch.use
    bettermechanics.hidden_switch.create
    
    bettermechanics.ammeter
    bettermechanics.cauldron
    bettermechanics.pen
    
    And for reloading the config:
    bettermechanics.reloadconfig
    


    Download BetterMechanics
    Zip: https://github.com/downloads/Edoxile/BetterMechanics/BetterMechanics_v1.10.zip
    Source code: https://github.com/Edoxile/BetterMechanics

    If you find any bugs, or if you have a brilliant new feature that should be added, please let me know!

    Credits go to sk89q for both the idea, and pieces of code that I've used of him. Also thanks to Meaglin and GuntherDW for fixing some bugs.

    Changelog:
    Version 1.10
    • Fixed a -1 block issue.
    • Chest-searching now starts with the nearest blocks.
    Version 1.9
    • Added a /bettermechanics reload (cauldron) command. Alias is /bm, so you can reload with /bm reload as well.

    Version 1.8a
    • Removed redundant (debug) logs.
    Version 1.8
    • Added tallgrass to non-solid blocks, and removed cobweb from it.
    • Added /pen clearline <line>
    • Added new permission nodes/checks
    Version 1.7a
    • Fixed some bug of never-changing gates. If it still occurs, use [dgate] instead of [gate].
    Version 1.7
    • Cauldron now uses new file (YAML) and format
    Version 1.6.1
    • Implemented small bridges
    Version 1.6
    • Cauldron now supports a glass floor. Keep in mind that the recipe shouldn't contain glass, else you'll probably get an error saying the recipe does not exist, or your glass floor will disappear!
    Version 1.5.1
    • Fixed some dupe bug
    Version 1.5
    • Implemented small doors
    Version 1.4.1
    • Fixed a typo
    • Using a better comparing function for MatieralData
    Version 1.4
    • Fixed the last bugs, it's ready for the bukkit forum now.

    More details of changes can be found at github.
    kahlilnc likes this.
  2.  
  3. Offline

    woodzy

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Edoxile talk to gemo of falsebook maby u 2 can work together
  4. Offline

    PatrickFreed

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    I got the redstone to work :)

    One request, a /bettermech reload command to reload the config.
  5. Offline

    Edoxile

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    /bm reload is on the to-do list, but I'll do that when I'm at home again.
    Falsebook is not my kind of thing (programming-wise), and atm I'm woring on 3 other plugins that haven't been released yet, so I'm quite busy :)

    Edoxile
  6. Offline

    Jan Tojnar

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    @Edoxile You probably haven't noticed my post. Here is scheme of my system (more in original post quoted bellow):
    Code:
    _##
    #~#
    
    # = block
    ~ = lever
    _ = redstone
    
  7. Offline

    Edoxile

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    I don't see a hidden switch sign there, it has to be close to the switch. As of the redstone: redstone + lever works as it normally would, I can't test this setup now (still holiday), but I'm sure it should work. So your setup should look like this:
    _###
    #~ |#

    where | is a sign with [x].
  8. Offline

    Jan Tojnar

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Hidden switch is behind lever:
    Code:
    Layer 0:
    ###
    #%#
    
    Layer 1:
    ###
    #x#
    
    Layer 2:
    _##
    #~#
    
    % = hidden switch block
    # = block
    ~ = lever
    _ = redstone
    x = hidden switch sign
    
    As i said: Lever is switched but redstone isn't powered. It is powered if i switch the lever manually.
  9. Offline

    Edoxile

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    That's not my fault, it's bukkit/server not updating the redstone. Unfortunately I cannot help you with that.
  10. Offline

    askreet

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Does this not include light switches? Can it?
  11. Offline

    richdaddyy89

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    does the redstone work with netherack (i mean can you have a live stream for fire?)
  12. Offline

    ashaoaoao

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    make a video!
    ill try it but i wont know all the right commands.
    do u have a wiki or website .
  13. Offline

    mutiny

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    seems to work well.
  14. Offline

    Edoxile

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Don't know, I did not really saw the purpose for this, so I did not implement it. If many people want it, I could always still implement it.

    That's not CraftBookMechanisms, it's CraftBookCircuits; run that next to this plugin and it'll work.

    I've thought about making a video, but I haven't found the time to do that yet. As for the wiki/website, most things are the same as CraftBook, and the other feature (the pen) is documented in the OP (this is the only mech that uses any commands at all). Small bridges and doors work the same as the normal ones, the only difference is the width (normally 3, with small 1).

    Of course! It's been tested by a load of people ( it runs on a well-known dutch server I play on normally, so it should work well ;) )
  15. Offline

    Skacey

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    I too would like the light switch, but in keeping with the chest thing I could see this working as a block switcher instead.

    So, for example, if you wanted a block to toggle from soulsand to glowstone with power, you would need a chest with glowstone in the same circuit. Alternatively, you could use the same system to toggle any other blocks too. For example, have a traffic light that toggles between red wool and green wool. The plug in would just swap the block with whatever is in the chest.

    Also, make sure you update your title with the latest version supported, I almost skipped this plugin thinking it was dead (still shows [860] which was before 1.7 was supported)
  16. Offline

    Jan Tojnar

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Is it possible to make some workaround?
  17. Offline

    Edoxile

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    First of all, my title says 860+, because that is the case (any build above 860 works). Second of all, the idea for toggling blocks you have is a nice one, only it is difficult to implement this in a good way. How would I know what block to toggle, and to what? This is something that's difficult to implement, so I'd rather not do this, unless you have a very solid layout for the setup that can't interfere with other setups. I'll think about it, but I can't promise you that I'll implement it (soon).

    This would include forking CraftBukkit and changing the code to the same as the native Minecraft code. It can be done but it's a load of work. I'll look into it as soon as I find the time (I agree that this should though).
  18. Offline

    Skacey

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    The easiest way to set the toggle would be with a sign. Not much different than bridge or door. The sign could be on the back side with the keyword [switch] followed by the blocks to change.

    You can choose to not update your title, but some admins will skip your post as it looks outdated. I don't want to argue about it, I'm just telling you how I saw your post.
  19. Offline

    Edoxile

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    And if you want an entire region changed? You'd have to make 9000000 signs? See, the sign thing is a must-have (performance wise), but the region to be changed, and the blocks to change from & to are the most difficult thing to set up simple and efficient (both for the server and the user). I'll think about it, but I still can't promise you anything.
  20. Offline

    Zerafas

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    this seems like an improvement to craftbook and falsebook. ive been using falsebook alot, but wondered if switching to this would keep my existing gates or will it throw errors at me. i dont mind redoing the gates in any case.
  21. Offline

    fatmarley

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    @Zerafas I switched frm craftbook and it was a simple change...just add chests to your gates and bridges and you are good to go.
  22. Offline

    Danelli

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    doors won't work 4 me
  23. Offline

    Edoxile

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    This depends on how you built your gates, but as fatmarley stated it should work fine (after you've added chests of course).

    What does the console/chat say if you right click a sign? Is it properly loaded?

    Also, I've updated for a reload command, I'll edit the OP now.
  24. Offline

    Skacey

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    I've never seen someone try to use falsebook to change a region. A resonable middle ground would be to only change the similar blocks touching the one with the sign. Since this would be a recursive search i would also limit it to 15 blocks away, much like redstone current fading after 15 blocks.

    Then in you example, you would need about 200 signs to change 9,000,000 blocks (and a crazy good server and connection to prevent lagging out on such a large area)

    The code wouldn't be that hard, though a recursive search has risk if not done right.
  25. Offline

    mutiny

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    issue reported from users that multiple bridges near each other interfere with block chests, blocks disappearing from chests after bridge toggled, attempting to verify etc.
  26. Offline

    Edoxile

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    First, I did not mean region as in WG region, I meant it as an area of blocks. Second, I want to avoid recursive searches as much as possible, because they cause a lot of overhead and are very slow.

    Now, as for the issue of the [switch], I still don't know why you'd need this? In what situation would this be useful? It's a lot of work for something most people will probably never use, so I don't see the value of it. Now if you could give me multiple examples of situations where this is useful, I'll reconsider implementing it.

    I know the problem and I will address it in the next update that will be released (so I won't do a separate release for this, as it only occurs in very rare cases).
  27. Offline

    chelben9

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    please make a tutorial idk how to do any of this it says when i try to make a gate "no fences found to close bridge!" heeeeelllllllpppppp mmmmmeeeeeeee ppppllllzzzzzzzzz
  28. Offline

    kimitsu_desu

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Here's a wierd bug I found: if you have less than 64 blocks in the chest, but more than (64-amount of blocks in the bridge/door), when you retract the bridge/door it will fill up the stack to 64 and create an infinite block in the next slot. note: to make this bug work, the blocks in the chest should not be distributed among several stacks, keep them tight, for example, like this: [64][64][63]. When you retract the bridge it will become [64][64][64][1], and that last block is infinite.
    Also, your Pen thingy is incompartible with lockette
  29. Offline

    fatmarley

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    @chelben9 Here is a tutorial for you. Help is spelt H e l p. Being a spazz usually doesn't heeeeelllllllllpppppp.

    Anyways this what you do.
    1. make a doorway or entrance of some kind.
    2. fill said doorway with fence.
    3. place a chest on the ground, near to the doorway.
    4. place sign above or infront of, or near said chest
    5. on second line of sign write [gate]
    6. click gate and enjoy
    7. spazz out
    8. also if you have ANY sort of fence near to the chest it faks it up, so remove those.
  30. Offline

    Skacey

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    The original request from @askreet was to include the light switches which are part of the original Falsebook set. I was trying to help you understand how it could be implemented as it seemed that you didn't see a way to do it efficiently. If you don't want to do it, then don't.

    The advantage that I see is that it closes the loop on a dupe risk in Falsebook (or at least a resource exploit) - so instead of players having to risk life and limb to obtain glowstone, they can dig up soulsand, which is plentiful, and apply redstone to it. The exploit comes in if they can then break the glowstone for resources. With your plugin, a player would have to already have mined the glowstone and would simply be using the [switch] command to put it in play. That seems to go nicely with the theme of your plug in.

    Again, I'm not trying to argue the point - it's your plugin, and your development time. I'm not going to spend more time trying to convince you that this is needed, or generating multiple examples to prove the point (as it is now, it may have been less work to just write the code than to beleaguer the point.)
  31. Offline

    mutiny

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    New issue to report, if a blockbag (chest) contains the same block that is used for a bridge/door then said bridge or door is retracted/opened then the chest will produce an infinite block
  32. Offline

    Th4natos

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)

Share This Page