[REQ] Zone Gravity

Discussion in 'Archived: Plugin Requests' started by AcidicTaco, Jul 5, 2011.

?

What do you think of this?

  1. Yes

    7 vote(s)
    100.0%
  2. No

    0 vote(s)
    0.0%
  1. Offline

    AcidicTaco

    I'm really surprised there isn't a single gravity mod for bukkit. However if gravity effected the entire world it would be quite bad actually. So here goes my request for a gravity mod...

    Only certain set zones can have different gravity levels. You must set the zone by the following.
    • use commands to select the 2 corners to contain the region
    • you could also use the world edit wand to and use the X and Z of the current selection for a zone
    • signs that say, line 1 = [gravity], line 2 = (zone name), line 3 = corner1/corner2, line 4 = grav:(0.01-1)
    you can use the following commands to edit or set zones:
    • /zg help (lists commands)
    • /zg set [zone name] [c1/c2] (sets a zones corners)
    • /zg remove [zone name] (removes a zone)
    • /zg gravity [world/zone] [name] [0.01-1] (changes the gravity of a zone or world, supports multiple worlds)
    • /zg rename [zone name] [new name] (renames a zone)
    gravity can only be set between 0.01 and 1 because any stronger gravity would cause you to not be able to jump over 1 block. Which would be pretty dumb.
    You would gain permission to use this via the node:
    zonegravity.admin

    The following is really not required and I understand would require some complex math possibly. But it would make this plugin unique and very, very interesting.

    Basically use signs that say: line 1 = [mass], line 2 = (1-10000), you can make masses in a zone that would drag players toward it. Think more like super mario galaxy and how there are tiny planets that you hop between, but are pulled into. This would be very similar except you could place a [mass] sign where there isn't really anything except one floating block.
     
  2. Offline

    AcidicTaco

    bump
    kinda could use this for a project I'm working on
     
  3. Offline

    gameswereus

    sounds really interesting :p
     
  4. Offline

    oxguy3

    Hmm, I suppose this could be done by performing this code, where 'gblock' is every block every block in the region:
    Code:
    gblock.setData(gblock.getData(), true);
    I'll look into this if I get the chance.
     
  5. Offline

    Simon Welker

    Why are ALL gravity plugin requests so empty? Is this so hard to implement, or not possible to do as a installable mod?!
    I would also like it if you could set gravity for a whole world (when using MultiWorld plugins, e.g.)
     
  6. Offline

    AcidicTaco

    yeah I think I'll bump this every now and then until somebody tackles this project or provides a good explanation on how it isn't possible to put into minecraft

    bumpedy

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

    Vandolis

    Hey, just wanted to let you know that I am looking into this, to at least see if it is possible. Currently just have the base done but I should be able to test it and tweak by tonight/tomorrow.

    Question regarding persistence though, did you have a preference between MySQL, SQLite or YML or anything? Also I changed /zg gravity [world/zone] [name] [0.01-1] to /zg gravity [name] [0.01-1]. Just have unique names and all will be well.
     
  8. Offline

    Simon Welker

    Awesome, man!
     
  9. Offline

    Vandolis

    First off sorry for the late response, had a midterm, but I finally got around to testing this enough to draw a conclusion.

    So far here are my impressions:

    So the idea MIGHT be possible, but not in the sense you might think. When I first read this idea I was picturing 0 gravity to be like flying, all nice and smooth, but that is just not possible. What is possible is changing around the players velocity, but this is an EXTREMELY iffy approach due to some under the scenes calculations minecraft does.

    The first killing factor is that you cannot have make a consistent enough way of changing the players velocity, as it all depends on the server load. If the server is dealing with a lot of things, it wont work in the slightest. If the server is free, then it will * technically* work.

    The second killing factor is that somewhere in minecraft there is a snippet of code that makes it so that players are always decelerating. So if you jumped off of a post and into a zero-g zone you will eventually just get stuck in the middle of it as you cannot control your forward direction while in air AND minecraft is constantly slowing you down in mostly unpredictable ways. I have also been unable so far to be able to stop the slowing minecraft is doing.

    This might be fully possible, but I bet it would involve either full modding support from mojang, or some sort of client side mod so we can continually grab where the player is trying to go, as well as directly modify their speeds.

    Here is my progress in case you or anyone else wants to take a look/pick it up: Github
     
  10. Offline

    Simon Welker

    Notch seems to have implemented bukkitloads of nice movement logic... *sigh*
     
  11. Offline

    AcidicTaco

    @Vandolis , sweet I didn't think anyone was actually going to work on this! I'll be eagerly awaiting the first release that I cant test on my server
     
  12. Offline

    Specops343

Share This Page