Inactive [TP/MECH] Nethrar v2.3.1 - No-command minecart supporting Nether / multiworld portals [1.3.1]

Discussion in 'Inactive/Unsupported Plugins' started by akrieger, Apr 1, 2011.

  1. Offline


    Nethrar - Unrestrictive Nether / multiworld portals, with ridden and riderless minecart and boat support, and many options for the power server admin.

    Version: v2.3.1 (Dev v2.3.2a)

    Nethrar is a Nether portal implementation that aims for simplicity and as unrestricted usage as possible. Portals are created and used almost exactly like in SSP. Build a portal, light it on fire, and go! No commands, no required Permissions, and nothing else meta-gamey to use. Spatial compression is implemented, with configuration settings allowing varying ratios, even a Nether which is larger than the Normal world it is attached to! Portal pairs are automatically created, and even saved between reloads.
    Nitty gritty details (open)
    A somewhat conservative heuristic is used to link portals in the smaller world to portals in the larger world (the Nether is the 'smaller' world, usually), to avoid portal spamming the larger world. Additionally, portals will never destroy a pre-existing portal; rather, they will simply link to that portal.
    Stepping into a portal in one world will first try to find a portal to link to in the destination world, then build a new one if none is found. The tl;dr version of this search is "Is there a portal in the destination world, that, if newly created and stepped into, would link to this portal in this world?" If so, link to that portal, otherwise build a new one. What determines whether a portal in one world links to one in the destination world? Essentially, if the hypothetical 'perfectly positioned' counterpart, in the destination world, to the first world's portal would conflict / intersect with an existing portal in the destination world, then the already-present portal is chosen as the destination. Note that this overall strategy is to prevent creating portals unless absolutely necessary, but can make generating distinct unique portal pairs in close proximity difficult.
    If you really want to know what the name comes from, you can ask, but it's really not important.

    • Drop-and-go: defaults provide full, basic SSP-like functionality for most servers. Just drop the .jar file into your plugins directory. Nethrar should now be able to guess most parameters, but if there is any doubt, check the generated worlds.yml file. **Current bug: due to changes in the way configurations work, the default worlds.yml file is no longer generated. This will get fixed in the next release.**
    • Total multiworld support. Whatever arbitrary world configurations you wanted, now you can have them.
    • Portals 'remember' their destination, so world loops are possible. For example, if I have it set up that portals from world A go to world B, and portals in world B go to world C, and then finally portals in C go to A, what would happen if I build a portal in A, which leads to B, and then step back through it? I will go back to A, not to C. This 'memory' is preserved with clean server shutdowns.
    • Facing, orientation, and when applicable velocity, are preserved going through the portal, for the smoothest transition possible for players.
    • Minecarts carrying players function seamlessly. Minecart tracks should lead to and from the portal on both sides, on the same elevation, for minecarts to work properly.
    • Minecarts can now go through portals riderless! Powered minecarts are not supported, but empty minecarts and storage carts both go in and out unassisted. For best results, use with the force-chunk-loading feature.
    • Boats can be driven through portals too! If you are linking between two water worlds, or a water and normal world, you can now paddle through between the two.
    • Chunk keep-alive: For servers strapped on disk IO, or lower-performance servers, teleporting can be a real bummer for everyone on the server. Nethrar can be configured to keep chunks loaded in a radius around portals, increasing RAM usage, but decreasing the amount of resulting lag from teleporting through portals.
    • World blocks: Each world can have a 'world block' assigned to it, like wool or a gold block or stone. If you create a portal with a particular world's world blocks in the top two corners, then that portal will link to that particular world. This lets you make permanent 'special' portals that go places regular ones won't.
    • Custom world generator support for any world.
    • Configurable settings include:
      • whether to use permissions or not.
      • whether to redirect respawns or not.
      • how many chunks around a portal to keep loaded.
      • whether to allow riderless vehicles.
      • how much debug logging to print (currently there is very little even at the most verbose setting, this is more for helping me with debugging).
    • It works.
    **** Important Note: You should turn off the default Nether functionality if you are going to use Nethrar. Failing to do so can cause random and unpredictable double teleports, teleport loops, or worse. Set "allow-nether=false" in, or add it at the end. This will notdelete your existing Nether, it will just prevent the portals from teleporting you if you stand too close for too long. ****

    Download Nethrar (.jar, config, worlds) (.tar.gz, .zip)
    Dev build: (.jar). Changes: see my post.

    Source (github) (LGPL licensed)

    Configuration / Installation, most people: Download Nethrar.jar. Put it in your plugins/ directory. For most people, this is enough.

    Configuration / Installation, fewer people: If you had trouble with worlds not being what you expect, or if you want more power, then do the following. The plugin will put a config.yml inside a directory called "Nethrar" in the plugins/ directory. Set the following parameters in config.yml for your particular server. Also, edit worlds.yml to describe the world setup YOU want for your server. Assign the relevant Permissions nodes as you see fit.
    config.yml (open)
    # Set to true to use Permissions, otherwise everyone gets
    # all permissions.
    usePermissions: false
    # Set to false to use builtin vanilla respawning behavior.
        respawn: true
    # Set to some number > 0 if you experience server-wide lag
    # when anyone teleports.
    forceLoadRadius: 0
    # Set to true to allow minecarts / boats to pass through a
    # portal without a Player passenger.
    riderlessVehicles: false
    # Set to 1 or 2 to increase the amount of console messages
    # Nethrar will show.
    debugLevel: 0
    worlds.yml (open)
            environment: normal
            destination: world_nether
            scale: 8
    # Note that the environment field is *required*
            environment: nether
            destination: world
            scale: 1
            peaceful: false
            respawnTo: world
    # Add more worlds here, or edit the ones above as you see fit.
    # For example, to make a loop of normal -> Nether -> SkylandsPlus -> first normal, do the following:
    # world:
    #        environment: normal
    #        destination: world_nether
    #        scale: 8
    #        worldBlock: 57
    #        ^ Any portal made with diamond blocks in the corners will link to 'world'.
    # world_nether:
    #        environment: nether
    #        destination: world_skylands
    #        scale: 1
    #        peaceful: false
    #        worldBlock: 42
    #        ^ Any portal made with iron blocks in the corners will link to 'world_nether'
    # world_skylands:
    #        environment: normal
    #      worldGenerator:
    #              name: SkylandsPlus
    #              args: if there were any args to pass to your world generator, they would go here
    #        destination: world
    #        scale: 8
    #        worldBlock: 41
    #        ^ Any portal made with gold blocks in the corners will link to the 'world_skylands'
    # Note that to make a SkylandsPlus world, you'll first need the SkylandsPlus mod, which you can get [URL='']here[/URL].
    Permissions (open)
    # Allows usage of Nethrar portals.
    # Allows usage of Nethrar teleportation.
    Commands (open)
    # Teleports the invoking player to the destination world.
    # Places a single block of glass at the destination under the feet.
    /nethrar tp world 
    Not issues:
    • "I'm using MinecartMania and when I go through a portal I don't keep moving!" Obsidian is the default "minecart stopper" block in MinecartMania. Either power the obsidian block on both sides of the portal with redstone, or change the stopper block to be something other than obsidian.
    • Transitioning between worlds can be a little laggy. I am trying to mitigate this, the Bukkit devs and community are making great progress making teleports suck less, but there is nothing we know of that we haven't done to make things better. Sorry.
    • "Help I fall and sometimes die when I teleport between worlds!" Best thing I can say is: make sure you're running an up-to-date build of CraftBukkit, and it's lag-related, but it's nothing I believe I can solve any more than I have already tried.
    • "Why didn't I respawn at my bed?" Recent versions of CB should fix this, and Nethrar will support this soon as well even with respawn redirects.
    • "Help I am always respawning in the default world." Unless you are using Nethrar respawn redirects to keep people who die in one world to respawn in the same world, this is working as the Bukkit devs seem to want it to work.
    Known issues:
    • Chunks can sometimes, but less commonly with newer (860+) builds of CB, fail to load when transitioning between worlds, and only load on relog. Portals can also stop functioning when this occurs. Set "forceLoadRadius" in config.yml to something greater than 0 (reports say that 4 tends to work, I would recommend something between 2 and 4).
    • Camera orientation is not preserved when travelling through a portal in a minecart. I suspect some deeper issue with the server when putting a player into a minecart.
    Potential future development (open)

    • Pre-emptively generate or load chunks in the Nether which are 'known to be needed.'
    • Allow minecarts with any passengers to teleport between worlds. Works best with force-loaded chunks to enable physics with no players present.
    • Enable teleportation of *any* entity - animals, mobs, mobiles, etc.
    • Auto-link / generate nether for new normal worlds, as option.
    • Teleport delay. Obviously incompatible with vehicles.
    • Per-world End support., if possible.
    A note about future development: This is a side project first and foremost. Development was primarily driven by my and my friend's needs on our personal server, and future development will be heavily influenced by that. If there is sufficient demand by the general public and users, then I can implement other features, but I am not compelled or otherwise forced to do so. Just FYI.
    Version 2.3.1:
    • 1.2.4-R1.0 support.
    • No major changes besides updating to remove deprecated API usage.
    Version 2.3:
    • 1.1-R3 API support.
    • Added support for custom world generators. Environment is still required, add key values to specify a world generator plugin, worldGenerator.args for additional args for the generator.
    Older changes (open)
    Version 2.2.1:
    • Removed 'physics!' spam.
    Version 2.2:
    • 1.0.1-R1 support.
    • Added support for teleporting to The End. Set the target world's enviroment to 'the_end' or the equivalent. Portals might not be able to be reignited once in The End, so beware!
    • Misc fixes and logging.
    Version 2.1:
    • Implemented world blocks. World can have an optional "worldBlock" property, an integer, defining a block ID for that world's "worldBlock." Any portal made with that block in the top two corners will link to that world.
    • Updated to use Bukkit builtin permissions. You must use a compatible permissions plugin to use this. Read for more information.
    • Still uses sync threads to do teleportation.
    Version 2.0:
    • Added easier drop-and-go installation code and support.
    • Added true multiworld support. See worlds.yml for syntax and examples.
    • Added per-world custom destination world.
    • Added per-world custom destination world for respawns.
    • Added command "/nethrar tp world"; Use it as a server admin to get between worlds to set up portals for people.
    • Added portal destination persistence to help with more complicated world setups.
    Version 1.5.1:
    • Fixed teleporting when riding a minecart so that everything happens in a thread, instead of half in a thread and half synchronously (it's not okay to be a passenger of a vehicle in another world, eh?).
    Version 1.5:
    • Fixed "moved too fast" issue causing disconnects. Unfortunate side effect: teleports exhibit just a wee bit of lag before actuall occuring once you hit a portal. Depends on the server's load at the time. This will have to wait for if/when the Bukkit team fixes the checks around that disconnect.
    • Riderless minecart teleportation! Hidden Netherworld logic, long-distance unassisted storage cart teleportation, possibilities abound! Supposedly will work great with Evercart.
    • Boats! Now you can enable your crazy multiworld water coaster. Not tested as thoroughly as it should have been, buyer beware...
    • Various refactoring to help prepare for Nethrar v2.0.
    Version 1.4:
    • Added option for it to always be night in the Nether (default true).
    • Changed Permissions support to default to false, change to true if you want to use Permissions.
    • Added chunk loading prior to teleporting through portals, to help alleviate more transition issues.
    • Nethrar now generates a config file if one is not found.
    • Added some checking around where Nethrar determines which block a player has interacted with, due to people reporting a situation where a player can be "in a vehicle" but either the vehicle, or it's location, are null. This will help prevent NPEs.
    Version 1.3:
    • Added configuration option to enable a 'peaceful' Nether, empty of Ghasts and Pig zombies.
    • Switched to using a more polite chunk unloading function.
    Version 1.2:
    • Added configuration option to keep chunks loaded in a variable sized radius around portals. Set "forceLoadRadius" in config.yml to > 0 if you are having issues with falling or with chunks not loading after transitioning.
    • Added "NethrarMinecartTeleportEvent" which is called after a player is teleported with a minecart. Plugin devs, listen for this event if your plugin does things with minecarts, and needs to know when minecarts suddenly move or get added/deleted.
    Version 1.1:
    • Added Permissions support for permission node "nethrar.use" - give users this permission to enable use of Nethrar.
    Version 1.0:
    • First release, with minecarts and conservative portal linking and configurable spatial compression, etc.

    If you like this, and you use Bitcoins, and you feel like being generous, send some my way at 1Lwcw5awgpHyrhpWd4qc3dKPaDHpttm1Vh . It doesn't have to be more than 0.001 BTC, I'm very much a penny BitCoiner, but the thought is appreciated :)
    iWeirdo, Lizardbones, woodzy and 6 others like this.
  2. Offline


    @JeffJitb: It's the server, it's not me. I'm using the "teleport" function provided by Bukkit - sit on the Bukkit devs if you want teleport between worlds to work better.

    As far as the counterpart portal being suspended in midair, this is intentional - the y coordinate is preserved between worlds, so you might just be unlucky and the portal will appear in midair in the Nether, or vice versa if you build one high in the Nether that appears high in the normal world. Given how much more random the Nether is in terms of air/ground mix, odds are about even that you'll appear either in midair or underground. That's why the portal comes with a (small) platform to stand on.

    Our server also suffers from the "chunks not loading" issue; there is nothing we as players can do about it. That issue is caused by the chunk never getting sent to the client, but I'm fairly certain the chunk is actually there - if you walk into it, you'll collide with things (I believe) normally. But don't test it with anything in your inventory!
  3. Offline


    Alright, so if you try to walk off the missing chunk, your character will begin to move rapidly up and down until you walk back onto the platform =/ Guess I'll have to wait for the server to keep the entrance chunk loaded.
  4. Offline


    is it normal that i see the sun/moon because the normal nether (background) is supossed to be red i even tried a nether world generated by the official server but the back is still the normal world one on bukkit

    Attached Files:

  5. Offline


    No, it's probably not normal to see that, but again, this is an issue with Bukkit and not this plugin.

    @ Vend @JeffJitb:
    Here's a link to a hacked-together version I came up with. Overwrite the old .jar with this one. You'll need to add a line to your config.yml file that says something like "forceLoadRadius: #" where # is anything >= 0. Try it with 2 (which'll keep a 3x3 square of chunks loaded around every portal) and see if that does it for you.

    Force-chunk-load jar file

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


    There's a strange bug. I created a new portal in the basement, went in there and back out. For some reason, the world won't load the chunks where the portal is. I teleported myself out and logged out and back in. I went back to the portal and the portal doesn't work anymore. I tried other portals I created earlier and it can load the world just fine. I created another portal 20 blocks nearby at top of my house and the same problem happens again. I manged to move to the side. For example, I logged off and the chunk reloads. The portal doesn't work and I tried the same portal at nether, doesn't work either. I came back to outside portal and I see this.
    I'm using CB #617

    EDIT: I downloaded the forcechunk version and set radius of 4. It fixes the problem, even the portal starts working.
  7. Offline

    Don Redhorse


    would it be possible to make it support Multiple Multiworlds?

    Like I have 5 worlds in Total
    creative and creative nether
    survival and survival nether

    and I would like to have creative nether portals go to the creative nether and survial nether portals to go to the survial nether.

    I don't need travel between the "normal" worlds.
  8. Offline


    Glad to hear the forceload version is helping you - although I'm not sure how much is due to force loading, and how much is just from restarting the server. Unfortunately, I can't play with the plugin in a 'production' setting since the server I play on is currently waiting for other plugins to update :( I hadn't seen these sorts of issues before, although I have heard of the 'portal not functioning' issue, but I haven't been able to reproduce it. That being said, the portal not teleporting someone is almost certainly an issue with Bukkit - there is *no reason* that my portals shouldn't teleport someone, short of a Java exception. My plugin will either make a new Portal, or link to an existing one, always. Did you see any sorts of Java error messages popping up on the console when it happened? If not, then it was Bukkit refusing to teleport someone. I suspect this may happen on servers which aren't as capable, or if someone tries going back and forth *really fast* through portals, causing the server to get bogged down in chunk loads and unloads.

    I could do it, but I think there are other plugins which let you do similar things. This would require a lot more meta-game configuration, and my goal with this plugin was to be drop-and-go simple :) Nothing says I can't add that in the future, but for now I want to concentrate on the chunk issues people are having.

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


    Had the chunk load problem when returning to normal world. Downloaded the force load.jar and set it to 4 looks to be working great. I never did restart the server just did a reload of the plugins so something in that fixed it. I will post a update if I have any problems.
  10. Offline


    Good to know! I'll merge the functionality into the main build later this week, after I clean up the code and add some optimizations to make it be less terrible.
  11. Offline

    Don Redhorse


    well atm there is no other plugin I know of which can do that.. all the plugins to my knowledge miss some stuff, it is either autocreation of portals, auto linking of portals, scaling etc.. I think yours which is doing all that but is missing the multiworld (like I described) support..

    But I can understand your position ;)
  12. Offline


    COuld you add sometyhing that makes it so the portal is pushed into open sapce like in ssp? So that people don't need to dig out of mountains, which can take a long time
  13. Offline


    Not anytime soon. One of my goals with this plugin was to have consistent and predictable portal mechanics. Having portals move around semirandomly to other locations causes portals to link and generate in a highly inconsistent manner, and this is not desireable for me.

    In the future, it may become a configurable option, but it is a very low priority for me. The algorithms and heuristics I'd use are, frankly, nebulous. There's another Nether plugin that has a mechanism wherein portals only function if both sides are in empty air, you could take a look at that one (I don't remember what it is called).
  14. Offline


    This forcechunk version is working great and I never have a problem with it.
  15. Offline


    But isnt it rather annoying that a player may get stuck inside of a mountain in the nether, which causes someone to have to spend some time trying to hopefully find a way out, which can lead to death rather than freedom
  16. Not really, nether stone is really easy to dig through, plus look on the bright side, you're protected from ghasts that way :D
  17. Offline



    I'd appreciate it if you could create and call a custom event when you teleported a minecart (as actual teleporting involves destroying and creating a new minecart) to let MM know. Otherwise, data get's lost on the minecart, and MM throws errors from the dead cart.

    All you would need to do is create a custom event (similar to this one) and call it once you're done "teleporting", roughly around here. Just use getServer().getPluginManager().callEvent(...) to call it. That way your plugin does not need to be MM aware.

  18. Offline


    Sure, I could definitely do that. I'm not entirely certain how this solves the issue, but if I understand correctly, all this would do is provide MM a mechanism to pair up the two minecarts? I wonder if remove()ing the old minecart won't cause any issues, or if I should call remove() after firing the event. Regardless, it will be in the next version, which is getting put together now.
  19. Does the coordinate compression apply vertically as well as horizontally? or do the nether and regular world match up 1:1 y coordinate wise?
  20. Offline


    Compression is only horizontally; the y coordinate is preserved as much as feasible (eg. no portals extending above the world or punching into bedrock).

    @Afforess (how do you do the tag bit? I tried and failed at figuring it out :( )

    v1.2 fires a "NethrarMinecartTeleportEvent" when a player is teleported with a minecart; functions "getOldCart()" and "getNewCart()" do the obvious. Let me know if that does it for you (source line where I call the event).


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


    You mean with guthub source code? You click on the line number on the side of the page.

    No, thank you!
  22. Offline


    Actually I meant the "@akrieger" part, but the post did that automatically, which is strange cause it wasn't doing that before. Ah well, glad I could help!
  23. Offline


    Thankyou! I never expected such a quick response. Also nice one on the gate location mechanics. This plugin has really made the nether awesome. My server thanks you!
  24. Offline


    problem using this with CB670 after a few hours people have not been able to warp back out of the nether using a portal. Only log error is .
    2011-04-08 20:12:56 [SEVERE] Could not pass event BLOCK_PLACE to Permissions
        at com.nijiko.permissions.Control.getGroups(
        at com.nijikokun.bukkit.Permissions.Listener.onBlockPlace(
        at org.bukkit.plugin.RegisteredListener.callEvent(
        at org.bukkit.plugin.SimplePluginManager.callEvent(
        at org.bukkit.craftbukkit.event.CraftEventFactory.callBlockPlaceEvent(
        at org.bukkit.craftbukkit.event.CraftEventFactory.callBlockPlaceEvent(
        at net.minecraft.server.ItemBlock.a(
        at net.minecraft.server.ItemStack.a(
        at net.minecraft.server.ItemInWorldManager.a(
        at net.minecraft.server.NetServerHandler.a(
        at net.minecraft.server.Packet15Place.a(SourceFile:57)
        at net.minecraft.server.NetworkManager.a(
        at net.minecraft.server.NetServerHandler.a(
        at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
        at net.minecraft.server.MinecraftServer.h(
    Note this is not a new portal one we have been using.
  25. Offline


    It sounds like Permissions is exploding, and as a result when my code tries to check Permissions to see if it is possible to teleport, then the call is failing because Permissions is failing. I'll look into this and see if I can duplicate, or have some sort of fall-back in case Permissions fails. However, the error is not from my code.
  26. Offline


    I may have messed up my permissions file adding a group I will check it. Thank you for the info.
    Edit- sure thing the permissions plugin updated to multi world suport and left the nether permissions blank with no copy. I'm sure this was half of the problems I was having with this update Thanks again.
  27. Offline


    What happens if a portal is built in a world where the config file isn't pointing to? Can you have multiple nethers with this plugin, also?
  28. Offline


    If you build it in a normal world, it will link to the named netherworld. Similarly, if you build it in a nether world, it will link to the named normal world.
    The behavior is undefined for the case of multiple worlds. I legitimately do not know what will happen; I can find out, but after I get some sleep.
  29. Offline


    Hey not sure if this is a bukkit thing, but is it possible to make it so when you die you respawn to the regular world?
  30. Offline


    Yes! There is a configuration option:
    As a more thorough answer: I dislike hacking things together. When I originally wrote this, I wrote it for the purposes of having one normal world, and one nether world. This makes things much simpler for me, the developer, and for my intended user base (people who want a simple, drop-in-and-go Nether). I *could* theoretically have it support arbitrarily many nethers and normal worlds, or, more easily, multiple pairs of normal and nether worlds. The former would not behave in a predictable, or in a useful, manner, the latter requires a significant rewrite of most of the code, so that it is as if it *always* supported multiple pairs of worlds. I do intend to get around to it at some point; there was already a request for portals linking a normal/nether, and a creative normal/creative nether. It will take some time to realize, though.

    As far as multiple worlds, my previous assertion is correct: a portal built in any normal world will link to the same / named Nether, and a portal built in any Nether will link to the same normal worlds. Those portals will correctly link *back* to the world they came from, until the plugin resets. Then, unless you enter those portals from the world they were built in, things will change. Eg. if you build a portal from a non-named normal world, it will spawn a portal in the named Nether world. Assuming that was a new portal, or one which hadn't yet been linked to, they will be linked together. If a plugin reload or server start occurs, and one of your players enters the Nether portal, it will have no idea it was spawned by a non-default normal world portal, and will try to link up to a portal in the named normal world. However, if instead your player steps into the original portal in the non-default normal world, then the pairing will occur successfully as if the normal portal had just been built.

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


    This is the best nether plugin that I have found to date.
    That said, having this plugin makes it to where it takes forever to join and most of the time it refuses connections and gives end of streams errors. It also periodically crashes my server after awhile.
    I know it is this plugin because when I took it out of my server files, everything went back to normal.

    Is there anything I can;t post here that can help you find the problem, is it common, or am I screwed?

Share This Page