Disable Piston Push Block Limit?

Discussion in 'Archived: Plugin Requests' started by Derf321, Jul 17, 2011.

  1. Offline

    Derf321

    I propose a mod to remove/edit the 15 block limit that pistons can push. I would appreciate it so much if someone could make this!
     
  2. Offline

    Derf321

    Le Bump?
     
  3. Offline

    Fallen_Advent

    I have intrest in this as well, Would be nice if someone could take this on
     
  4. Offline

    taiiat

    this... seems like a bad idea. i think i would prefer being able to set pistons to be able to push certain types of blocks indefinitely, others with a limit, and others not at all. if you remove it entirely, you could accidentally make a piston to push out the bottom of the map.... and... yeah.
     
  5. Offline

    Nitnelave

    I don't think it'd be that hard to do. I'd do it if I had time, but unfortunately I don't.
     
  6. Offline

    Derf321

    @taiiat Yes, that sounds great! I dont think you'd have to worry about the bottom of the map though, bedrock should never be pushable.
     
  7. Offline

    Dazzel

    Ive tryed it some houres ago, but with this rudimentray piston api you can not do this... No event is fired when the piston can not push anything like another expanded piston. We have to wait for an better piston api

     
  8. Offline

    Nitnelave

    Well, you could cancel the push event, then simulate one yourself, without the tile entities moving (yeah, I know, it'll look like crap). Or with, if you can figure them out ^^
     
  9. Offline

    Dazzel

    But no push event is fired when the length is higher then 12 blocks... so you can not cancel it and do it manualy ;)
     
  10. Offline

    Nitnelave

    Catch on_redstone_change as well, then. Cancel all piston push events, and when it receives power, you implement your own moving system.
     
  11. Offline

    Elusive92

    You should not do this. If a piston is able to push an infinite number of blocks, it is very likely that you kill your server with that, as it would result in a VERY expensive calculation if the server needs to load all chunks to the end of the generated world and needs to move hundrets (or thousands) of blocks afterwards. Now think of what happens if this is done by 10 pistons simultaneously. This is definitely not practical. Even extending the push limit to, say, 30 blocks could increase the server load dramatically.
     
  12. Offline

    Derf321

    @Elusive92 Not unlimited, but editable. Only an idiot would put it high enough to crash the server. I'm thinking like 20-30. It would increase the load, but only if you are in the area and set it running. If you have solid server equipment, it's no problem.
     
  13. Offline

    Fallen_Advent

    I will look into this once I can learn a bit more about Java, I am still really new at it but it sounds like you would just call the variable/integer that controls the amount of spaces a piston can push, Then null that variable/integer and add in a user set # either through commands or a config file. If I am wrong, please correct me
     
  14. Offline

    Nitnelave

    I don't think there's such a variable. As I said above, you would have to cancel any piston push event, and catch the redstone event associated with powering the piston. Then you can implement your own block pushing method.
     
  15. Offline

    Fallen_Advent

    Lol ok, Sorry I am still really new to java, So forgive me if I sound like I know nothing.... cause in all reality I don't ^_^
     
  16. Offline

    Nitnelave

    But you should still try and do it! It would be a great learning experience. You should start with this tutorial :
    http://wiki.bukkit.org/HUGE_Plugin_Tutorial
     
  17. Offline

    Fallen_Advent

    Lol I am following a guy called "ANewBoston" on youtube atm, to try and just learn how to write java, Then I would be more than willing to try and pull this off
     
  18. Offline

    Nitnelave

    If you need help, you can ask me ^^. Although I have to say that everyone in the bukkit forums are on the whole quite reactive (depending on the hour you log in^^) and they might answer your question faster( and better) than me.
     
  19. Offline

    RazorFlint

    Hmm i took a look at the Java Docs and found.
    Code:
    public int getLength()
     
  20. Offline

    HuntMASTER15

    This is a very, very, very, very, very, very, very, very, very, very, very, very, very bad idea. No dought at some point this WILL crash your server.

    Edit: At the most maybe make it go like 50 blocks.
     
  21. Offline

    Nitnelave

    This is only useable when the piston CAN push the blocks, not when it is blocked. And anyway, the getLength() only returns the number of blocks modified, it's like getBlocks().length. You cannot modify it.

    But I just thought of something : modifying CraftBukkit to allow for the limit to be set through a method, and then implement this method in the plugin. It would require you to dig into the code, though, and to make a pull request in the github project.

    It's not the tools that's bad, just the use people make of it ^^. Allowing to change the limit is fine, setting it to 2000 is not :p

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

    RazorFlint

    Thats all i could find, i didn't say anything would work.
     
  23. Offline

    Stig-Rune

    My server runs on a i7 3,06Ghz with 12 Gb 1333Mhz Memory. Now, can I please get the ability to change the limit?! :p

    JK, folks. But seriously; It would be VERY nice if somebody figured out how to modify the max length :)
     
  24. Anyone on this ? There might be servers able to handle it, after all. I mean, with reasonable limits.
     
  25. Offline

    acuddlyheadcrab

    Erm... I'm not sure but this might need a craftbukkit mod. If you can find out all the references the pistonAPI makes, then it would prolly be possible.

    EDIT: Mentlegen, (javadocs)...BlockPistonExtendEvent.html
     
  26. Offline

    acuddlyheadcrab

    Hey you know this might actually be possible... you could get a vector in the direction the piston is facing (idk how to figure that out though), and "simply" move all the blocks over in the direction... It wouldn't really be good looking or work like the pistons but it's kinda possible... Maybe
     
  27. Offline

    lawldavid

    Anyone working on this? I just all day building a 76 block long self building/repairing wall, but it's only building 12 blocks on each end! sadface
     
  28. Offline

    Baba43

    With that event you dont even need a vector. Just check the direction by analysing two different blocks you get with getBlocks() and continue moving.

    /edit
    Well that event is not triggered if you TRY to move more then XX blocks.
    Otherwise this would work: event.getDirection().ordinal()
     

Share This Page