[INACTIVE][MECH]BukkitPiston v0.54 - Pistons plugin for SMP [860]

Discussion in 'Inactive/Unsupported Plugins' started by redspider, Apr 12, 2011.

  1. Offline

    redspider

    BukkitPiston - Piston plugin for SMP:

    Since I don't have the time to continue developing, I've decided to release the source code.
    Hopefully someone can create a new mod out of it.

    Source


    Version: v0.54

    This mod changes iron blocks (by default) into pistons, which extend, when powered with redstone or redstone torches.
    Much like the original piston mod by Hippoplatimus. Right click on a face to change the orientation.
    Power it with redstone to make it push max. 16 blocks. (obisidan, iron and bedrock won't be pushed!)
    It is possible to change the piston properties like strength or block type. Take a look at the config.ini in the plugin/BukkitPiston folder.
    If you get an error like ebean.properties not found, create an empty file named "ebean.properties" in the bukkit main folder

    Download

    Jar File (doesn't contain config file)

    Support


    thx @MinecraftTutorialify for the vid

    thx @marvinody for the vid


    Changelog:
    Version 0.54
    • fixed: updated to 860 (fixed nether, saving problems, etc)
    • added: autosave (interval is changeable in config file)
    • changed: max worldname length is now 255
    If you had problems with that (open)

    open bukkitpiston.db with an sqllite editor of your choice (e.g. http://sourceforge.net/projects/sqlitebrowser/)
    and modify the table bp_piston_bodys (edit, modify table)
    edit the field world_name to varchar(255) (use the ...)
    same with the table bp_piston_owner.


    Version 0.53
    • fixed: exception on pushing sand
    • fixed: config.ini was not read
    • ebean.properties is created, if not present
    • known bug: /reload causes exception
    Version 0.52 (Beta)

    • Minecarts are pushed in the direction, in which they are driving
    • Sugarcane / crops fixed (thx meskeba)
    • Nullpointer event fix (runecraft and some other plugins)
    • Config file is generated if not present
    • Pistons are stored in a database (thx @Sammy for his tutorial)
    • A LOT of code refactoring
    Version 0.51

    • Few event fixes, you should REPLACE ALL PISTONS if you use worldguard or any other world protection plugin, to reset the owner
    • Owner is used as the one, who pushes the blocks
    • Protection plugins might work, not tested. (owner dependent, not activator)
    Version 0.5

    • Piston material is always immovable!
    • Added block place / break events
    • A few other fixes involving redstone
    • Config option to choose tools which can change the piston orientation
    • Warning if save file is readonly
    • Option to restrict changes in direction to owner (only pistons placed since 0.5)
    • Option to restrict building pistons to ops
    • Piston strength corrected
    Prior changelog (open)


    Version 0.43
    • Fixed iron duplication bug
    Version 0.42

    • Piston extension is a few ticks delayed, to ease the build of toggled blocks
    Version 0.41

    • Fixed PistonBlockStrength was not used
    • Integrated powered & detector rail in default config
    Version 0.4

    • Fixed player was hurt when a block was above the piston extension, player still gets hurt on purpose, when squashed
    • Custom cancellable event fired upon extension / contraction
    • Config file (set strength, change piston block id, set immovable, destructible stuff etc. (don't mess with this too much!))
    • Improved player / sand movement
    • 1.5 support (ready when you are, bukkit)
    Version 0.3

    • Flying sand / gravel !! (thx gmfreaky)
    • Piston won't stay extended when power source is destroyed by piston
    • Content of chest / furnace / dispenser will be moved, too
    Version 0.2

    • Some bugfixing
    Version 0.1

    • Internal release


    Future plans / Known bugs (open)

    here's a rough timeline, no guaranty though:
    0.6 piston edit mode via command, sand pushed like in the original pistons, block crushing
    0.7 improved x/yml config file
    0.8 sticky pistons
    0.9 permission plugin support
    1.0 final release
     
    zhuowei, CamudX, Geen117 and 7 others like this.
  2. Offline

    redspider

    first of all: i'm currently on vacation until thursday, and my laptop is to slow to play minecraft, so i can't test the code. expect the next version next weekend.
    @crosis: you'll have to power the pistons from 2 different sides
     
  3. Offline

    cr0sis

    Oh yeah... lol. Thanks!
     
  4. Offline

    unusualbob

    Ok so I had some free time this evening and made an unofficial version which blocks moving doors, signs, furnaces, chests, and dispensers. This is totally an unofficial fork and if you want me to get rid of this redspider just let me know.

    I have only confirmed this to work on 677.
    Here's a download of the modded version: http://dl.dropbox.com/u/1315494/BukkitPiston.jar

    Specifically I changed the blockisimmovable method to include these:
    Code:
    (id == Material.CHEST.getId())
          (id == Material.IRON_DOOR.getId())
          (id == Material.IRON_DOOR_BLOCK.getId())
          (id == Material.WOOD_DOOR.getId())
          (id == Material.WOODEN_DOOR.getId())
          (id == Material.SIGN.getId())
          (id == Material.SIGN_POST.getId())
          (id == Material.FURNACE.getId())
          (id == Material.DISPENSER.getId())
          (id == Material.BURNING_FURNACE.getId())
          (id == Material.WALL_SIGN.getId())
    Its a cheap and dirty hack, but for those of you who want this plugin but dont want to worry about LWC headaches, here ya go. Let me know if there's some block ID I forgot about so that I can add it in there. :)

    Disclaimer: I have never made a bukkit mod and I don't really know much java.
     
  5. Offline

    Da_Norc

    /squeals like a schoolgirl

    Pistons!
     
  6. Offline

    RustyDagger

  7. Offline

    unusualbob

    Possible problem, bukkit still has random failures in the block.gettype() function which can lead to duped blocks of iron. Not really sure how to best deal with that. :/
     
  8. Offline

    Albinobear

    I have one problem. The piston's direction is reset after server restart. Does it do this for anyone else or is it just me?
     
  9. Offline

    unusualbob

    The only thing I could figure is that this happens if the server gets shut down improperly. I just double checked on my test server to make sure, all the pistons were correct after using the stop command to stop the server and then starting it again. This includes pistons that were on and off.

    Disclaimer: All of this tested on my fork, not the original code.
     
  10. Offline

    Albinobear

    Yeah I checked it now too. Something probably went wrong somewhere with the server.
     
  11. Offline

    RegaIia

    Just curious, I know you said you'd release it probably this weekend and all, so I was wondering what you'll be adding. I know you've got permissions listed as your next fix and all, but can't hurt to ask. Also, is there a way to adjust how far the pistons launch sand, gravel and active tnt? We've been talking about compact tnt cannons and this seems to be the best way about doing that
     
  12. Offline

    Toro

    I'm sure that this mod with development can be much better than the official integration of piston.
    Noch will stay basic with the features. There is so much to do with such mechanic.
    Some ideas of features :
    • option to adjust the power of the piston like asked above. (Ex : how far the piston launch sand).
    • option to adjust angle and direction when the block is on the top of the piston to simulate a catapult.
    • option to add randomness to the previous parameters to add more fun.
    • option to choose the lenght of the piston. Be able to extend the piston for 2 blocks should be great. Door, traps... often need 2 blocks to be moved.
    (sorry for my poor english, it's not my native language)
     
  13. Offline

    redspider

    permissions won't be part of the update ;)
    i will add a config file, wich can be used to define, which blocks can't be moved (e.g. chests) and i will improve some movement stuff (player / sand / tnt).
    @Toro: sounds interesting, but i don't think i will integrate that, as my aim is to rebuild the official piston
     
  14. Offline

    RegaIia

    Oh, dur, totally misread that. Makes sense now though, thought you meant you were adding who could use pistons haha. And no worries about not integrating how far blocks can be pushed, it's your mod and as you said you're aiming to replicate the original, so there's no stress there. Thanks again for the great mod!
     
  15. Offline

    gnarf

    see these screenshots http://imgur.com/a/FRo5m

    the top down / bottom up door isnt too hard just mess around with pathing, and remember any repeaters need to be put for both top and bottom

    edit: since i figure you'll want the pathing for my door here it is http://i.imgur.com/UAHrM.png glow stones have buttons behind them and this allows exterior and interior door opening. you just have to be very quick or the door will close on you and you'll lose a few hearts. I could re-rig the whole thing with repeaters for longer opening but I dont have the room.
     
  16. Offline

    Ludd

    Awesome! Love this mod, eagerly awaiting Bukkit for 1.5.
     
  17. Offline

    cr0sis

    Hate to sound like a knob but nope, didn't want pathing or any of this lol. I'm waaaaaaaaaay ahead of you. Not a bad design though. Peace
     
  18. Offline

    BasBloem

    Yea, I'd like to see it in this one too, because I'd like to build a transportation thing so people fly around etc. xD
    But it launches players too gentle(A)
    Maybe diamond blocks will be superpowerful :D
    But great things in this one :)
     
  19. Offline

    redspider

    pistons! now tweakable
     
  20. Offline

    aussie1579

    Just a quick question, But wont this plugin allow an infinite supply of Iron? furthermore would there be any way to stop people from taking the top part of a piston once it is extended?
     
  21. Offline

    unusualbob

    There's a catch for this, if you have an extended piston and either end is destroyed the plugin auto-destroys the existing iron block. There is no duplicated iron, save bukkit.getblocktype() errors :p
     
  22. Offline

    Zelif

    Great plugin love using it on my server, only since the upgrade I keep getting lag spikes everytime i activate them(more then one at a time).
    I currently have 4 in one part of the server and when I activate it everyone but my self gets kicked off the server and I face quite the hefty lag spike.

    Strange as the other version just before this did not do this.
    CB:#714
    Plugin Ver:0.41

    The server it self is quite a good computer and I do not get any concole warnings which is strange since it is clearly lagging but does not say it is. Might be a bukkit bug not sure.

    Once again love the plugin and I too cannot wait for Notch to bring this to the game. ;)
     
  23. Offline

    Ryoma

    Nice plugin, but can you add a feature where you have to use a specific item to change the orientation, like a stick or something because it's really annoying when you want to build a house made out of iron or place a block next to a piston.
     
  24. Offline

    redspider

    strange thing. are any other plugins are installed? anyone else facing this problem?
     
  25. Offline

    Strahan

    I have some odd behavior with it. I wanted to build a light switch, so I want it to push lightstone back and forth. I noticed it worked the first time, then failed on the other piston. I found that if I extend piston 1 and deleted the arm, it will work for one cycle.

    ???
    Vid:
     
  26. Offline

    Achiles

    One guy in my server has created a iron block generator using this plugin. The mechanism is easy. Is a known bug?
    (or feature? (; )
    My players tell me that it is not a bug, but a miracle :)
    I havent tested yet against 0.41 (only in 0.3 and 0.4), but in the changelog dont say anything about a duplicated iron bock bug.
     
  27. Offline

    redspider

    @Strahan: problem is, when one piston tries to push while the other one is still extended, it can't because the arm is in the way. should be fixed in 0.42
    @Achiles: iron duplication should not happen. which other plugins are installed?
     
  28. Offline

    Strahan

    Hmm. You can see it do it in my video too, hehe. In my case, I'm using:

    Backup
    BigBrother
    bukkitPiston
    EpicZones
    Essentials
    EssentialsGroupBridge
    EssentialsGroupManager
    EssentialsProtect
    EssentialsSpawn
    FenceStack
    Lockette
    mcbans
    Nether
    SleepAnnounce
    Vanish
    WorldEdit

    Update: Just tried 0.42. My single lightstone block demo worked great now, yay! Also the iron collection was fixed. So I moved on to making the "real" lightswitch. Set it up with a bunch of LS, then it failed the same way :( Maybe I'm building it wrong. I destroyed it all and frap'd myself building it:

     
  29. Offline

    Achiles

    Yes, it is possible. When 2 vertical irons are charged, and the expansion on one crash the redstone circuit that feeds both, the another iron remains expanded (while the redstone breaker iron is compacted), and can be mined as two different irons. I will try to upload a example this night...
    I only have Permissions and Quickbelt.
     
  30. Offline

    redspider

    @Strahan try inserting a repater on the side near the switch or move the not torch to the other side. both sides need to have the same count of repeaters/torches +1 on one side.

    @Achiles thx, i'll look into this.
     
  31. Offline

    Achiles

    The 3 pistons points to the right. Each time the button is pushed, the extra iron must be mined and 2 of the redstones must be replaced (the piston dropped it ti the ground).
    (i forgot, the dirt column of the right is mandatory)

    [​IMG]
    [​IMG]
     

Share This Page