[TP] Round World v6 - teleports players who go off the edge [766]

Discussion in 'Inactive/Unsupported Plugins' started by Raphfrk, May 17, 2011.

  1. Offline

    Raphfrk

    RoundWorld - Round World
    Version: v2

    This plugin creates a virtual round world. If a player moves off the E/W edge, it is teleported to the other side of the map.

    If the player walks off the N edge, the player will be teleported so that they are facing S and at the opposite side of the N edge (and similar for the S edge).

    It doesn't do any map changes so, the edges aren't blended together.

    Features:
    • Players are teleported if they go off the edge
    Download
    Download

    Setup
    The only setup is to edit the /plugins/roundworld/roundworld.txt file and world_sizes.txt.

    You should set a size in the world_sizes.txt file for all worlds that you want to have a border.


    Change Log
    Version 1
    • Initial version
    Version 2
    • Added support for multiple worlds
    • Added a "fake-block" border
    Version 3
    • Fixed error in world size calculation
    Version 4/5
    • Added the ability to set the world centre
    • Added the ability to set the base height of the border
    • Removed code related to a pull request (so doesn't work, yet)
    Version 6
    • Filed null pointer exception if the world centre isn't set
     
    thepackett, peaced and angus22397 like this.
  2. Offline

    peaced

    Nice, I wasnt excpecting sucha fast reaction to the suggestion
    Thanks a lot.
    I'll be testing it soon (before next week).
     
  3. Offline

    narrowtux

    Couldn't you send fake blocks to the player when he reaches the "end" of the map?
     
  4. Offline

    peaced

    After a 1st short test, I noticed the Y axis is retained, so the map has to be carefully leveled at the edges.
    Not to mention players crossing the border underground.

    The solution i'm gonna try is to make an ocean surrounding the map. (bedrock deep)
    I'm not sure I can achieve that, but 'ill try (terrainmod+ terraingen)

    But a better solution would be to check the surface block Y loc on the destination, and adjust.
     
  5. Offline

    Raphfrk

    So, something like portal misty chunks?

    The other option is to copy the chunks from one side to the other. However, I didn't really want to actually change the map.

    Hmm, it is supposed to adjust Y values.
     
  6. Offline

    peaced


    This was a repport from a player, i'll test myself and let you know.
     
  7. Offline

    Lolmewn

    Hey, I remember someone requesting this! How friendly of you :p
     
  8. Offline

    4am

    I was thinking this - could you use the CHUNK_GENERATION event and just copy the chunks to the opposite side as they're created? Of course, then you get into maintaining them when players make changes (including posting BLOCK_CHANGE events for the copied chunks so that BigBrother can rollback griefing), and if you want to take it really far, you could mirror entities and players so when you're walking to the edge you don't even realize it because the inaccessible outter chunks have the same things going on as the other side of the map where you will be teleporting. But that's complicated:)
     
  9. Offline

    Raphfrk

    Well, I am already maintaining a few plugins. I figured this was a pretty easy plugin to do, at least in its basic form.

    Adding all that stuff would make it complex (ish) :). I don't really want to make changes to the underlying maps though. Otherwise, I would have to put a big disclaimer about not nuking your maps before installing it.

    They would still notice the teleport though, but all the blocks would reappear around them as if they hadn't moved.

    I actually submitted a long range teleport smoothing pull request which would make it smoother. However, the client would still unload most of the chunks. It is just a radius 3 circle around the player set of chunks are pre-loaded before teleport.
     
  10. Offline

    4am

    Is it possible to force a chunk load on the client?
     
  11. Offline

    Raphfrk

    No, but there is a fake set block method. This sends a fake update packet to the client.

    The same idea could be used for entire chunks. The nice thing is that it wouldn't update the actual world.
     
  12. Offline

    Plague

    changelog is missing
     
  13. Offline

    narrowtux

    Looking forward to it, seems cool ;)
     
  14. Offline

    monotonehell

    I don't understand why the different behaviour on N/S verses E/W edges. Why not wrap both the X & Z edges the same way? What you're describing above is some kind of fourth dimensional cylinder.
     
  15. Offline

    Raphfrk

    It's a sphere (ish) :).

    If you walk north from location 0 degress then you will be moved to location 180 degrees moving south.
     
  16. Offline

    Ashepherdspie

    Does this mod need some kind of boundary, or does it use the already rendered map as the boundary?
     
  17. Offline

    Clancy Dawson

    Cool idea, you could add that when you fall into the void you teleport to max hieght in the sky and fall to the ground? or you teleport to the nether roof?
     
  18. This applies to the main world, or all worlds?
     
  19. Offline

    Raphfrk

    All worlds. I guess I could add world by world based config.

    The edge isn't handled very well. I guess I should add mist or something.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jul 16, 2016
  20. Yea not all my worlds are same size, and I'd like to just enable/disable it per world.
     
  21. Offline

    Raphfrk

    Updated it so that you can list all your worlds.

    Also, there is a border. You can set how high you want it and also what block it is made of. These are fake blocks, so they only appear on the client and have no effect on the actual server map.

    It should be a soft block (like water, reeds or portal blocks), or people won't be able to walk into it. Lave wouldn't actually do damage, since they are fake.

    It sends around (64*height) blocks any time a player near the border changes chunks.

    The higher you make the border, the more data would need to be transferred. With the default height of 2, this shouldn't be a big deal (and probably not much of a deal otherwise).

    Also, if you set the height to 0, it doesn't check if the player is near the border at all.

    The border is placed one block above the ground, so it shouldn't overwrite any actual blocks.

    I may not have been very clear in my last answer, you have to tell the plugin where the edges are.

    You do this by adding the worlds to the world_sizes.txt file

    world=2048, 1024

    will set it so that the default world has a size of 2048, 1024.
     
  22. Offline

    peaced

    If I understand well, the fake border is at surface level. What about passing the limit underground?
     
  23. Offline

    Raphfrk

    The border exists from top to bottom of the map. It just doesn't get displayed.

    I was trying to trade off against having to send a large amount of data over the network.

    Minecraft's protocol does allow compressed data to be sent, but Bukkit doesn't give access to it.
     
  24. Offline

    Missnostalgia

    Does this work for The Earth map?
     
  25. Offline

    Raphfrk

    I don't see why not, all it does is teleport players from one side to another.

    I assume The Earth Map is a map that is the same as Earth?
     
  26. Offline

    Missnostalgia

    Yes the one that was just made XD, just wanted to be sure.
     
  27. Offline

    peaced

    Couldnt get any result. Plugin loads fine, creates conf files, but nothing happens. using CB798.
     
  28. Offline

    Raphfrk

    You need to set the size of your world.
     
  29. Offline

    peaced

    Ok I set it to this
    i'm surprised to see the border at these locations ? (my spawn is at 0,0)
    [​IMG]
     
  30. Offline

    Raphfrk

    Sorry, made a calculation error. I changed my divide by 2 from

    xDiv2 = x/2;

    to

    xDiv2 = x>>2;

    However, I should have changed it to

    xDiv2 = x>>1;

    I updated again, I accidentally left in code related to a pull request (so method doesn't exist).

    I also added the option to set the world centre as well as size.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jul 16, 2016

Share This Page