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


    Argh. No, since I want to have accurate download stat tracking, I'll just have to keep poking GitHub til it finally gets the right file in the system. I hope that'll be done in the next few hours.

    It should work now.

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


    Can I omit the destination or set it to the same world just in order to have Nethrar load that world? I don't want nether portals going anywhere from this world and if I can get Nethrar to load it that means I don't need MultiVerse anymore.
  4. Offline


    If you set it to the same world, then it would just teleport users to the other side of the portal when they hit it. Currently Nethrar doesn't officially support 'no-destination' portals, I can add that in tonight. It might pitch a fit if you just remove the destination.
  5. Offline


    Thanks! I'll just set it to the same world for now.
    Also FYI, I seem to be getting some errors on shutdown passing custom events to MinecartMania here's the log:
    01:38:06 [SEVERE] Could not pass event CUSTOM_EVENT to MinecartManiaSignCommands
    java.lang.NoClassDefFoundError: org/akrieger/Nethrar/NethrarMinecartTeleportEvent
            at com.afforess.minecartmaniacore.event.MinecartManiaListener.onCustomEvent(
            at org.bukkit.plugin.RegisteredListener.callEvent(
            at org.bukkit.plugin.SimplePluginManager.callEvent(
            at com.nijiko.permissions.ModularControl.closeAll(
            at com.nijikokun.bukkit.Permissions.Permissions.onDisable(
            at org.bukkit.plugin.SimplePluginManager.disablePlugin(
            at org.bukkit.plugin.SimplePluginManager.disablePlugins(
            at org.bukkit.craftbukkit.CraftServer.disablePlugins(
            at net.minecraft.server.MinecraftServer.stop(
    Caused by: java.lang.ClassNotFoundException: org.akrieger.Nethrar.NethrarMinecartTeleportEvent
            at Method)
            at java.lang.ClassLoader.loadClass(
            at java.lang.ClassLoader.loadClass(
            ... 14 more
    I'm getting the same error and callstacks for MinecartManiaAdminControls and MinecartManiaStation. I'm not seeing an issue with the MinecartManiaCore plugin anywhere. Could this be a problem on Afforess's end?
    Using CB #935, Nethrar 2.0 and MinecartMania 1.2.8
  6. Offline


    If this is happening on shutdown, then what might have happened is Nethrar got unloaded, and then a custom event got passed to the listener, but Nethrar's class was unloaded which would cause errors in MinecartMania. If it's on shutdown, there will *probably* not be any errors. I don't think there's anything I can do about this, but I'll doublecheck to make sure. This doesn't happen during regular runtime?
  7. Offline


    How is skylands currently implemented in bukkit? Do the plugins that support it include the terrain generation within it or does it just call it in bukkit or what? Not quite sure how useful it would be with nethrar without making portals out of new blocks or key blocks as normal->nether->skylands->normal seems a bit tedious.
  8. Offline


    I don't think it's tedious :p Keyblocks will make things easier. As far as skylands, the generator was included in nms, Bukkit added it as a default Environment that you can pass to createWorld().
  9. Offline


    I just finished testing running a cart with a rider and riderless through a portal many times with no errors of any kind. Since it appears to happen only during shutdown looks like it's a non-issue. Should I tell Afforess about it anyway?
  10. Offline


    Might be worth telling him, yeah. I was going to poke him on IRC, but he appears gone, and I think he'd like it in a centralized place anyway.

    Also, you're not seeing any minecart duplication problems? That is good to know. Some users had experienced that with MM + Nethrar, and I was never sure if it was a onetime problem or not.
  11. Offline


    I haven't looked into Nethrar in full detail yet, so I apologize if I missed the obvious.
    I just wanted to check this before I get cracking; is it possible to allow portal creation only from a single world?

    To elaborate, certain regions in our normal world are fairly crowded, but I want to provide access to the Nether.
    Building a nether portal in the normal world would spawn a matching portal in the nether world.
    However, I would prefer to disallow the creation of new portals while in the nether world, to reduce the risk of a portal appear in the middle of a user's house in the normal world.

    In a nutshell: is it possible to allow new portals to only be created in a single world?

    Unrelated (but a possible solution to my question I guess);
    The 'nethrar.use' permission, does that cover both creating portals and using portals?
    If yes, could these be split off? That might already allow me to disallow the creation of portals back into the normal world using custom multi-world permissions.
  12. Offline


    Currently, it is not possible to do portal creation permissions by-world. I can do a rough-hashed version which either globally allows or denies it, however, bear in mind that if a ghast blows up a portal in the Nether, then those players won't be able to reignite it if this happens, at least for the first iteration. You may wish to look into in the meantime.
    'use' only covers going through; anyone can light the portal. However, lighting the portal does not make the counterpart. If they don't have the 'use' permission, then they can walk through it however much they want and it won't create a portal in the other world. I am also planning to split this into 'use' and 'create' already.
  13. Offline


    Thank you for this explanation. I'll see how far I can get with this.

    I guess the portal creation code is a bit more complex than I expected.
    Am I correct to understand the portal on the other side doesn't get created until someone walks through it?

    As for ghasts blowing up the portal, I can probably setup a plugin to make them unable to destroy obsidian.
    If 'use' and 'create' end up separated, I can probably already achieve this option by using different permissions per world.
  14. Offline


    Ghasts can't blow up obsidian, they extinguish portals. Portal creation prevention would involve preventing players from lighting portals. I guess I could pull a Notch and make it such that if a player puts down the last block of a portal, it blows up in their face, like beds in nether used to.
  15. Offline


    Aha, I guess there's no way to prevent portals from being extinguished?
    I'll just learn to live with it :)

    Thank you for explaining it to me.
  16. Offline


    There probably is, but it's hard, and probably doesn't work in call cases.
  17. Offline


  18. Offline


    Could there be a delay added to teleports to stop people getting stuck in teleport loops(going back and forth rappidly between worlds.), to allow a player to get out of the portal before it teleports them again. Either that or make the platform radius one larger and place the player outside of the portal.
  19. Offline


    This is something I observed in Nethrar 2.0 that wasn't in prior versions, but because of all of the changes to teleportation in Bukkit's end, I'm not entirely sure what is causing this. I can try making the platform larger, but I'm not certain that will fix it - the exist Nethrar code should already put the player far enough out of the teleporter to not have them teleport back, but it's a mystery to me why it sometimes does and sometimes doesn't. I am looking into this though.
  20. Offline


    could we have an option to delay teleportation a few seconds? sometimes I go through a portal and I bounce back and forth between two portals
  21. Offline


    Read the post right above yours. Currently I don't have Internet at my house, so I can't do any development. I am answering posts through my phone.
  22. Offline


    I have mine on 1:1 ratio (for compatibility for an old nether world created by older dead plugins which was set up to have the ratio as 1:1, so my players can still get to there stuff in nether.), it does help if I remake the gate 1 block off from the corresponding gate, they will still connect to each other without making another gate as long as both sides remain active.

    If there is a way you should also cancel the vanilla teleporting which happens if you stay in the portal for long enough without touching a portal block.
  23. Offline


    Set allow-nether=false in
  24. Offline


    Any idea when there'll be swirly-purple teleport delay?
  25. Offline


    @Bacu At least not til I get Internet at home. Comcast is pulling it's usual crap with terrible service and I still don't even have a date arranged to install Internet. I am going to sit on my comcast guy until he gives me Internet.

    Oh, and I'm traveling this weekend. Bleargh. Sorry :(
  26. Offline


    Hi @akrieger

    Nethrar 2.0, love it.
    My multiworld setup is working out great with Nethrar in combination with the multiinv plugin.
    I have 2 questions/suggestions:

    - Is it possible to disable portals from a specific world leading to anything? I dont want ppl creating more portals in my creative world... those will interfere with my survival world. (healing).

    - Do you still have plans to implement a 'keyblock' feature for access to specific worlds?
    I now have 3 worlds, normal-nether, and creative, I temporarily changed the settings for the normal world to lead to the creative, made the portal, and changed the settings back to normal<->nether, I'd like to have an easier way in case I want to make more one-portal worlds or if I need to rebuild that portal for some reason.
  27. Offline


    1) try either setting the destination to itself, to nothing, or NoPortal (I think that's the name)

    2) yes.
    OrtwinS likes this.
  28. Offline


    Ok, I came home for the weekend and got steady internet, so I did some looking into the random re-teleporting problem. It seems that the way / reasons PlayerMoveEvents get fired for is broken, so it's throwing some rather spurious events (for example, when the camera rotates, but not when the player moves). There also seem to be some issues with when you step into a portal, and the move events that fire afterwards. I've filed a bug, Rigby of MultiVerse fame / infamy says he'll look into it, and is aware of some other issues with them that need to be resolved. For now, I'm not going to work on fixes in Nethrar which will probably become unnecessary after they go into Bukkit, but I might look into supplying a patch for Bukkit to fix it.
  29. Offline


    That bug where you get stuck in a teleport loop has produced another bug. Sometimes I'm flung into wrong world.

    My setup is as follows: World -> World_Nether and Survival -> Survival_Nether. I got stuck in a loop when entering a portal from Survival, and was flung into a newly created portal in World_Nether, which then exited to World at another new portal. Somehow the world redirect got messed up, I guess. Could having nether enabled in my be causing this problem?
  30. Offline


    That could very well do it. I've sorta figured out the cause to be an issue with CB spamming move events cause one of the deva broke / removed the checks to prevent it. Enabling default nether might allow the server to accidentally teleport you the 'normal' way.

    Edit: It's not that Nethrar is sensitive to too many move events, but it's sensitive to *wrong* move events. One such event is that, immediately after a teleport, Nethrar gets a move event indicating that the player moved from their new-world coordinates, to the coordinates they *would* have moved to in the old world had they not teleported. But, the from and to world for that event are both the new world.
  31. Offline


    When I use the minecart nether function the minecart teleports through the portal, but just stands still on the other side (momentum gets reset?), I'm using CB 935 with MM 1.2 (also for CB 935).
    It enters from the south side and exits (in the nether) from the north on equal level and straight tracks.

Share This Page