[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

    CaptainArcain

    @redspider

    I would love you forever if you could get this to work:

    Let's say I have a piston that points west. Doesn't really matter where it points, but in this case... yeah.. Anyway-

    I activate the piston. The piston activates as normal and "extends" westward. Under the extension I have placed a vertical redstone torch. Is it possible to update the redstone event so that the extension becomes powered like a normal block would? I see that it already sort of does this.... almost.

    Sorry I don't have a diagram here, I know that would be helpful... For the sake of argument we'll say that the connecting circuit is one block west and one block down of the newly extended portion of the piston with a piece of redstone dust on top. This follows normal redstone convention. When I break and replace the redstone, the circuit completes as normal. Problem is - I have to manually break and reset it.

    Can there be a check to see when the piston is activated that the extension becomes powered just like a normal block placement? That would be super helpful.

    Thanks!

    P.S. I guess I should also mention that in the piston's current iteration, the redstone state does not change when the piston is either extended OR retracted.
     
  3. Offline

    RustyDagger

    Yes It needs a lighting update or a proper Block update in order to recalculate the redstone. Ass far as i know there is no way for a plugin to FAKE this. :/ Would be really handy.

    Also any news on an update to include the new sticky pistons ect?
     
  4. Offline

    redspider

    yes, it won't leave any repercussions, maybe some duplicated iron blocks

    already implemented in the next version
    http://forums.bukkit.org/threads/me...s-plugin-for-smp-740.12665/page-5#post-268852

    hm... i'll look into this

    i'm currently still working on the save file problem.
     
  5. Offline

    Jaxter

    Okay I found a big error, whenever sand is made to fly (if u put it on top of an up facing piston, and th sand is going to fly it literally restarts my server each time.

    2011-05-09 08:46:49 [WARNING] Task of 'BukkitPiston' generated an exception
    java.lang.ClassCastException: org.bukkit.craftbukkit.entity.CraftFallingSand cannot be cast to org.bukkit.entity.LightningStrike
    at net.minecraft.server.WorldServer.a(WorldServer.java:112)
    at com.bukkit.redspider.bukkitPiston.PistonBlock.shiftAway(PistonBlock.java:581)
    at com.bukkit.redspider.bukkitPiston.PistonBlock.extend(PistonBlock.java:529)
    at com.bukkit.redspider.bukkitPiston.PistonBlock.update(PistonBlock.java:214)
    at com.bukkit.redspider.bukkitPiston.PistonBlock$1.run(PistonBlock.java:167)
    at org.bukkit.craftbukkit.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:138)
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:358)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:285)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)

    That's the error I get.
     
  6. Offline

    sinkir

    Be brave ! :D

    thank you again for the creation of the piston plugin for Bukkit ^^
     
  7. Offline

    redspider

    seriously? which bukkit version do you use?
    thx, almost finished. should work tonight or tomorrow
     
  8. Offline

    Jaxter

    I tried it in Bukkit version 740 755 and 764 and all did that lol
     
  9. Offline

    Ludd

    @redspider,

    Thanks for the reply, that'll come in handy!


    Also, I've encountered what I believe is a problem with 0.51: pistons won't respond to very short pulses.

    I'm using a pulse limiter together with a piston to release just one minecart at a time in a pez dispenser setup, but I have to make the pulse longer since last version, thus releasing two carts. I know it used to accept the shortest pulse possible before, at least in 0.3 as I believe that was what I upgraded from.
     
  10. Offline

    RustyDagger

    Would love the update to fix the saving :/ Reseting all 12 pistons in my spider farm is not my idea of fun.
     
  11. Offline

    redspider

    please try the soon to be released version 0.52
    it's not a bug, it's a feature ;)
    extending of a piston is intentionally delayed. if you have two pistons pushing one block back and forth the extended piston is blocking the pushing one. to avoid invalid states and concurrence the powerstate is checked after 4 ticks.
    almost done
     
  12. Offline

    RustyDagger

    MUCH <3 For you man :) all seems good
     
  13. Offline

    Kelton_weigelt

    Ive been trying to make a floodgate using this piston mod but it says I cant push water. Can you fix this so it works like SSP version and I can use it to control water flow?
     
  14. Offline

    valdark

    Odd it pushes water for me.

    To the Dev, is there any chance you could add a yml config file that auto-generates. It is like pulling teeth to get an ini file added to the correct place on my server host.

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

    redspider

    check the config.ini, make sure, water (8 and 9) is in the replaceable list
    yml config files will be included in 0.7. have a look at the feature list.
    either i don't get your point or it was magically fixed. could you maybe provide a diagram or a video?
     
  16. Offline

    Achiles

    When i update to your new version (0.52), i left the save.bin supossing that your plugin will try to migrate to sqlite. This happens (i can see in the log), dump a lot of warnings the first time. The pistons work fine, but the piston that was extended (charged), no dumps separated irons when mining. After that, they are normal pistons, as usual. So, all extended pistons during the update are duplicated, to the pleasure and enjoy of my players :)
    The rest, all working fine (even with bukkit 766)
     
  17. Offline

    redspider

    yea i know. this is a problem with java. when you change fields of an serializable object it will mess things up.
    i neither had the time nor a old savefile with a matching world to test this.
     
  18. Offline

    sinkir

    0.52 is released :D i can't whait !

    YEAR ! THX redspider :D

    edit:

    Afther test is see the PistonBlockStrength param don't works ...

    for my serveur we chose 64 but only 16 blocks can move ...



    happy to have no error whis permission , and position are fine saved ^^
     
  19. Offline

    Deages

    2011-05-12 00:32:23 [INFO] DataSourcePool [BukkitPiston] autoCommit[false] transIsolation[SERIALIZABLE] min[2] max[20]
    2011-05-12 00:32:23 [SEVERE] FATAL: DataSourcePool [BukkitPiston] is down!!!
    2011-05-12 00:32:23 [INFO] Reseting DataSourcePool [BukkitPiston] min:2 max:20 free:0 busy:0 waiting:0 highWaterMark:0 waitCount:0 hitCount:0
    2011-05-12 00:32:23 [INFO] Busy Connections:
    2011-05-12 00:32:23 [SEVERE] Could not load 'plugins/bukkitPiston.jar' in folder 'plugins':

    I replaced the old .jar with this one and I'm receiving this error and BP isn't loading. Any hints?
    Update: It seems to be trying to access a db on this server with an old database I've set up - though I haven't set one up for BukkitPiston - what config is it reading from?
     
  20. Offline

    redspider

    the db config should be in the ebean.properties file in the main bukkit folder. try to replace it with an empty file
     
  21. Offline

    Deages

    ebean.properties? Such a file has never existed for me. I have bukkit.yml which has some SQL connection info (I use with a logging plugin for off-server based MySQL logging for block placement/deletion etc).
    Created the empty ebean.properties and it worked. Why didn't it autocreate the file? :(

    ebeans.properties isn't created if bukkit.yml exists and will resort to using the bukkit.yml connection info on localhost which is really painfully annoying.
    also it only moves blocks 16, regardless of what I change the variable to.
     
  22. Offline

    lolligertyp

    When I try to shoot sand with the pistons, nothing happend and in the console comes this:
    Code:
    2011-05-11 18:10:59 [WARNING] Task of 'BukkitPiston' generated an exception
    java.lang.ClassCastException: org.bukkit.craftbukkit.entity.CraftFallingSand cannot be cast to org.bukkit.entity.LightningStrike
        at net.minecraft.server.WorldServer.a(WorldServer.java:112)
        at com.bukkit.redspider.bukkitPiston.PistonBlock.shiftAway(PistonBlock.java:677)
        at com.bukkit.redspider.bukkitPiston.PistonBlock.extend(PistonBlock.java:611)
        at com.bukkit.redspider.bukkitPiston.PistonBlock.update(PistonBlock.java:390)
        at com.bukkit.redspider.bukkitPiston.PistonBlock$1.run(PistonBlock.java:342)
        at org.bukkit.craftbukkit.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:138)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:360)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:287)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)
     
  23. Offline

    War2k

    hi there i was just curious when you implement the sticky piston will it mimick the way the ssp version works such as sticking 2 or more pistons together to extend a longer lenth, or would it be possible to make a sticky piston that extends longer depending on how much power is applied?

    *edit*
    also is there a way to add more ID numbers to the list of different kinds of blocks, this way iron blocks don't get replaced as pistons?
     
  24. Offline

    gsgrego

    Love the way the plugin works but good we get a way to set multiple blocks as pistons each with different powers.

    Changing piston material is broken. Actually seems most of the config has no effect.
     
  25. Offline

    jedimaster0

    The ebean.properties file didn't get created, so i made one. However there isn't anything in the file.
    Also the config file in the bukkitpiston folder dosn't seem to do anyting. I love this plugin and you are doing a great job :) Hope i get this fixed soon.

    and i keep getting this:

    Code:
    2011-05-11 13:12:36 [SEVERE] Could not pass event REDSTONE_CHANGE to BukkitPiston
    com.avaje.ebean.ValidationException: validation failed for: com.bukkit.redspider.bukkitPiston.PersistentBlock: [errorKey=length.max type=com.bukkit.redspider.bukkitPiston.PersistentBlock property=worldName value=Jedimaster's World of Minecraft]
    at com.avaje.ebeaninternal.server.core.PersistRequestBean.validate(PersistRequestBean.java:507)
    at com.avaje.ebeaninternal.server.persist.DefaultPersistExecute.executeInsertBean(DefaultPersistExecute.java:89)
    at com.avaje.ebeaninternal.server.core.PersistRequestBean.executeNow(PersistRequestBean.java:527)
    at com.avaje.ebeaninternal.server.core.PersistRequestBean.executeOrQueue(PersistRequestBean.java:557)
    at com.avaje.ebeaninternal.server.persist.DefaultPersister.insert(DefaultPersister.java:404)
    at com.avaje.ebeaninternal.server.persist.DefaultPersister.saveVanillaInsert(DefaultPersister.java:377)
    at com.avaje.ebeaninternal.server.persist.DefaultPersister.saveVanillaRecurse(DefaultPersister.java:361)
    at com.avaje.ebeaninternal.server.persist.DefaultPersister.saveRecurse(DefaultPersister.java:308)
    at com.avaje.ebeaninternal.server.persist.DefaultPersister.save(DefaultPersister.java:282)
    at com.avaje.ebeaninternal.server.core.DefaultServer.save(DefaultServer.java:1577)
    at com.avaje.ebeaninternal.server.core.DefaultServer.save(DefaultServer.java:1567)
    at com.bukkit.redspider.bukkitPiston.PistonBlock.setPersistentBody(PistonBlock.java:153)
    at com.bukkit.redspider.bukkitPiston.PistonBlock.setBody(PistonBlock.java:182)
    at com.bukkit.redspider.bukkitPiston.PistonBlock.<init>(PistonBlock.java:233)
    at com.bukkit.redspider.bukkitPiston.PistonManager.getPiston(PistonManager.java:64)
    at com.bukkit.redspider.bukkitPiston.PistonManager.getPiston(PistonManager.java:53)
    at com.bukkit.redspider.bukkitPiston.BukkitPistonBlockListener.checkOnPiston(BukkitPistonBlockListener.java:153)
    at com.bukkit.redspider.bukkitPiston.BukkitPistonBlockListener.checkAround(BukkitPistonBlockListener.java:128)
    at com.bukkit.redspider.bukkitPiston.BukkitPistonBlockListener.onBlockRedstoneChange(BukkitPistonBlockListener.java:15)
    at org.bukkit.plugin.java.JavaPluginLoader$31.execute(JavaPluginLoader.java:388)
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:59)
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:257)
    at net.minecraft.server.BlockRedstoneWire.a(BlockRedstoneWire.java:110)
    at net.minecraft.server.BlockRedstoneWire.a(BlockRedstoneWire.java:155)
    at net.minecraft.server.BlockRedstoneWire.a(BlockRedstoneWire.java:165)
    at net.minecraft.server.BlockRedstoneWire.a(BlockRedstoneWire.java:165)
    at net.minecraft.server.BlockRedstoneWire.g(BlockRedstoneWire.java:40)
    at net.minecraft.server.BlockRedstoneWire.doPhysics(BlockRedstoneWire.java:287)
    at net.minecraft.server.World.k(World.java:386)
    at net.minecraft.server.World.applyPhysics(World.java:361)
    at net.minecraft.server.BlockButton.a(BlockButton.java:238)
    at net.minecraft.server.World.a(World.java:1714)
    at net.minecraft.server.World.doTick(World.java:1465)
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:361)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:285)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)
     
  26. Offline

    redspider

    well, it's a bukkit problem. i'll look into the property issues
    this is really weird. i'll see what i can do
    i don't know it yet. i don't think i'll put much effort in it, as it shouldn't take long, until the official piston is released. pushing pistons will need a lot of code changes, as i designed them in a static manner...
    multiple block types will come with the new yml config in the next major version
    hm... do you get this often?
     
  27. Offline

    Jack_ancalime

    my server sayes that could not load plugins\bukkitpiston.jar in plugins" WHAT DO I DO!!!! please help me
     
  28. Offline

    sinkir

    redspider have you see the error :


    ?

    @lolligertyp , @jedimaster0

    you have bukkit 766 ?
     
  29. Offline

    Ludd

    @redspider,

    Nice update. Not exactly what I meant for the cart pushing though. Here's a screen to clarify:

    [​IMG]
     
  30. Offline

    jedimaster0


    Well every time I place a Iron block, even though the cfg file is set to bedrock, and I activate redstone going to the piston it says that. I'm no coder, so what does it mean?

    Oh yeah and I'm running Bukkit 740.
    "Mod: Bukkit Build - 1.5_02 Recommend Build - 05/10/2011"
    Thats from my server on Go-Networks.net

    Here is a list of plugins.
    [​IMG]
     
  31. Offline

    lolligertyp

    Yes, I've just checked it. It's 766
     

Share This Page