[MECH] PlgRailBoost v2.0 - make powered rails boost much more [1.4]

Discussion in 'Plugin Releases' started by Plague, Jun 11, 2011.

     
  1. Offline

    Plague

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    PlgRailBoost - powered rails boost much much more
    Version: v2.0

    Because mechanical boosters were removed from the game and electric booster just boost too little, I had to create this plugin for my server.
    I cannot really tell you how much this boosts, because I just set the cart to have a really high momentum (the actual speed is still 8 m/s, it just lasts incredibly long).

    Thanks Afforess for his MinecartMania (used as an inspiration).

    Features:
    • Powered rails boost 3000x "longer" by default (the number is an approximation)
    • The boost is configurable
    • Unpowered rails stop immediately (you need only one unpowered rail to stop any minecart)
    • Unoccupied minecarts' behavior has not been altered
    Download(source code in the .jar)

    [IMG]

    Configuration:
    You need to add a file to the plugin folder (plugins/PlgRailBoost).
    The file name is the configured boost value!
    If you want to use the default value it should be 32, so you create a file plugins/PlgRailBoost/32.
    If you want it to boost more, rename the file to plugins/PlgRailBoost/256 for example.
    The default value is 100000.

    Changelog:
    Version 2.0
    • updated to new bukkit API
    Version 1.1
    • Boost configurable
    Version 1.0
    • Initial release

    This post has been edited 1 time. It was last edited by Plague Feb 20, 2012.
  2.  
  3. Offline

    captainawesome7

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    That seems helpful
    Anthony13 likes this.
  4. Offline

    Linkage

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Awesome, the amount it costs to create those things is just way too much for the boost it gives you.
  5. Offline

    lipe123

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Would it be possible to change the boost value to slightly less? The idea of one booster track to go around the world seems a little overkill to me.
  6. Offline

    Plague

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    It's not THAT much, but I think I'll create some sort of config file for this today...
  7. Offline

    Plague

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    The boost is now configurable.

    (tagging @lipe123 )
  8. Offline

    lipe123

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    sweet dude, good job. works great.

    Now I just need to figure out why im taking random fall/squish damage from going around bends or declines...
  9. Offline

    Plague

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    I thought bumping into objects in bends was fixed in 1.6, apparently not all of it.
  10. Offline

    gobo77

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Does the plugin boost the minecarts to more than 8 m/s or do I understood it wrong?
    A boost to more than 8 m/s wouldn't go amiss because in my MP is a 1 km railway...
  11. Offline

    Plague

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    No, 8m/s is the maximum speed, but I increase the momentum, so the speed does not diminish after ~30 tiles, but continues for much more.
  12. Offline

    phrstbrn

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Any idea how to change the max speed of minecarts on powered rail?

    I tried playing with your plugin source and setMaxSpeed() with onVehicleMove and onVehicleUpdate but couldn't get the minecart to speed up. I couldn't get onVehicleUpdate to trigger for the minecart for whatever reason.

    The value of getMaxSpeed() kept resetting every time I moved to another piece of powered rail (I kept calling setMaxSpeed every time it entered powered rail), however, the minecart didn't seem to go any faster.
  13. Offline

    Plague

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    set/getMaxSpeed() change the momentum, that's what I use, so I don't think it's easily doable via bukkit API, I think you'd have to use craftbukkit obfuscated functions for that.
  14. Offline

    lollo333

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    lol my server crash when im using max value
  15. Offline

    Plague

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    I never actually tested that high a value
  16. Offline

    makotech222

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Does it continue/increase momentum when going up an incline? seems to cancel its effect when going up
  17. Offline

    Plague

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    It doesn't increase momentum if not on a powered rail. This just makes the powered rail block boost like hell, that's all.
  18. Offline

    makotech222

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    So, if i put down 3 powered rails, then regular rails, it wont keep it's momentum? I'm a bit confused.
  19. Offline

    Plague

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    The momentum behaves exactly the same like when you have no plugin. Powered rail increases the momentum, without it the momentum is lost over time.
    The only thing this plugin does is that powered rail does not give 16 momentum, but 1000 momentum (those numbers are just guesses, but the ratio is like that).
  20. Offline

    makotech222

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Yes, so it's supposed to last longer when you're off the powered rail, right?
  21. Offline

    Plague

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    yes that's right
  22. Offline

    makotech222

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Okay thats what i wanted to do. When i create a file to modify it, should it just be a plain text file? It said it was invalid when i tried it.
  23. Offline

    Plague

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    doesn't matter what it is, it just has to be named like number, like "122"
  24. Offline

    bennyX.X

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    hi,
    i didn't understand how to config the Boostpower.
    i have to create a file a .txt file and i rename it e.g. 32
    and i put the file in the plugin folder am i right????
  25. Offline

    Plague

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Basically yes. Create a file called "32". If on windows you don't know how then create a .txt file and rename it, but watch out for windows hiding extensions by default.
  26. Offline

    bennyX.X

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    called PlgRailBoost?
  27. Offline

    Plague

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Code:
    plugins/PlgRailBoost/32
    
  28. Offline

    bennyX.X

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    so the file is calle 32.txt and is in the plugins folder but in the console
    "32.txt is not a valid configuration file nam for PlgRailBoost!
    and what is the max speed number?
    sorry if i'm annoying you but i'm a newb in these things
  29. Offline

    Plague

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    who ever said anything about .txt in the name? get rid of it
  30. Offline

    bennyX.X

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    oh thanks for waisting your time:D
  31. Offline

    MCTSS

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Hey its been a while since we talked....... Ummm What have i messed up on here?

    import java.util.Scanner;

    class java{
    public static void main (String agrgs[])(
    Scanner java = new Scanner (System.in);
    double fnum, snum, answer;
    System.out.print1n("Enter first num: ");
    fnum = java.nextDouble();
    System.out.print1n("Enter second num: ");
    snum = java.nextDouble();
    answer= fnum + snum;
    System.out.println(answer);
    }
    }
    and what do i run it as?

Share This Page