Nethrar
Nethrar
Unrestrictive Nether / multiworld portals, with ridden and riderless minecart and boat support, multiworld, and many options for the power server admin.
Version: v2.3.1 (Dev v3.0-alpha1)
General
Nethrar is a Nether portal plugin that aims for simplicity and easy usage. Portals behave like SSP portals, except that you control them. There are no requirements to start. Just drop it in and you get portals essentially identical to SSP, but with smarter placement and linking. You can also configure practically any part of Nethrar, even adding multiple worlds or changing what worlds are linked together.
Features
- 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.
- 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.
- Custom world generator support.
- 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.
- It works.
Configurable settings
- 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).
- relative scale of each world.
- what worlds get linked together, and in what manner.
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 server.properties, or add it at the end. This will not delete your existing Nether, it will just prevent the portals from teleporting you if you stand too close for too long.
Downloads
Nethrar (.jar, config.yml, worlds.yml) (.zip, .tar.gz)
Other downloads also available direct from the files section.
Dev build: (http://dev.bukkit.org/media/files/658/189/Nethrar-3.0-alpha1.jar)
Source (github) (LGPL licensed)
Configuration / Installation, most people
Download Nethrar.jar. Put it in your plugins/ directory. For most people, this is enough. Have problems? Check out the Help section below labeled "read me first".
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
# Set to true to use Permissions, otherwise everyone gets all permissions. usePermissions: false # Set to false to use builtin vanilla respawning behavior. listen: 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. TrainCarts users should set this to 'true' to allow # TrainCarts to teleport correctly. riderlessVehicles: false # Set to 1 or 2 to increase the amount of console messages Nethrar will # show. debugLevel: 0
worlds.yml
world: environment: normal destination: world_nether scale: 8 world_nether: 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 -> skylands -> 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_end: # environment: normal # destination: world # worldGenerator: # name: SkylandsPlus # args: if there were any args to pass to your world generator, they would go here # 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 here.
New Permissions nodes
# Allows usage of Nethrar portals. nethrar.use # Allows usage of Nethrar teleportation. nethrar.tp
New Commands
# Teleports the invoking player to the destination world. # Places a single block of glass at the destination under the feet. /nethrar tp worldname
Help (read this first)
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
- New in recent versions of CB You can experience random teleportation 'loops' where if you step into a portal you'll get spontaneously re-teleported after stepping out, or teleported back and forth really fast. Setting "allow-nether=false" seems to prevent this. This is an issue with vanilla Nether by Notch et. al., or the new client, or both. Unfortunately, this also causes CB to send some false move events, and Nethrar doesn't play well with those.
- 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
- 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.
- Per-world teleportation permission (eg. if player has permission for world, can take portal to that world).
- Auto-link / generate nether for new normal worlds, as option.
- Teleport delay. Obviously incompatible with vehicles.
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.
Nitty gritty details
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.
Changelog
- Version 2.3.1
- 1.2.4-R1.0 support.
- No major changes besides updating to remove dep
- Version 2.3
- 1.1-R3 API support.
- Added support for custom world generators. Environment is still required, add key values worldGenerator.name to specify a world generator plugin, worldGenerator.args for additional args for the generator.
- Version 2.2.1
- Removed 'physics!' spam.
- Version 2.2
- 1.0.1-R1 update. Supporting portals to The End. If the portal gets extinguished, no guarantees it'll be possible to re-light!
- 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 http://forums.bukkit.org/threads/permissions-faq.25080/ 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 actually 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.
More changelog available at the Changelog page.
@the55anon
Also, sorry for making you and everyone else wait. I'll try and see if 1.4.4 works better with vehicles or not, and also get on updating to allow anything to teleport, asap.
@the55anon
That's weird, any errors in the server logs? Usually this would cause some sort of error. Are newly created portals made very very far away from the one that failed, or all in the vicinity?
Nice to see it works on 1.4.2. Any problems on 1.4.4?
Also, when using it on 1.3.2, I noticed a little bug. Sometimes, someone creates a portal on overworld, but it does not link to any portal on nether, it just wont teleport. After this, all later created portals wont link to nether either, until server restarts. After server restart, they work properly. While this bug happens, the already created portals continue to work, just the new ones won't. Its just a guess, but I think this happens when the nether portal would spawn on lava.
Hope the entity teleport comes soon, its the last thing I am waiting to updaqte my server. Im not sure how the chunk loading would behave thou.
News flash: Nethrar *mostly* works with the 1.4.2 beta.
tl;dr disable default Nether, don't ride vehicles, other entities don't teleport yet.
Very important information: You must set allow-nether=false in server.properties otherwise Nethrar will not work correctly. The new teleportation system introduced in 1.4 will actually pre-empt Nethrar, causing you to teleport in very wacky ways.
Also, if you are riding in a vehicle through a portal, you will come through the other side 'partially attached' to the vehicle. In the server's mind, you're in the vehicle, but to the client, you are not. I am trying to work around this, and if I can't, will file a bug against Bukkit to get it fixed. This has happened at least once before.
Edit: bug is https://bukkit.atlassian.net/browse/BUKKIT-2899
So here comes another weekend! Lets hope for an update.
@the55anon
Ok, I'm wiped. Party last night ran til the DST change, got 6 hours of sleep. Odds of an update this weekend: approximately 0. Sorry :(
@PhanaticD
Nethrar has to actually load up the worlds when the server starts. This involves a non trivial amount of hdd seeking and processing by the server.
just wondering, when I start my server it hangs for about 5 seconds after this line is outputted
[INFO] [NETHRAR] Restricted worlds:
then it says enabled. Im just wondering why it hangs compared to the rest of the plugins which get enabled very quickly
@the55anon
I'll see if I can whip it together this weekend, throw it into a release version with the beta-that-never-ended, and call it a day.
@akrieger
Yes, itens, mobs, carts, even arrows! Good to see a response, love this plugin <3
@the55anon
I haven't kept up with the new 1.4 update - by entities, do you mean items you throw, or things like pigs and zombies? In either case, I'm sure I can update Nethrar to do the same.
At this point, do you already know if nethrar will have any limitation when updating to 1.4?
Since this version, entities can go through portals, do you know if it will be possible with nethrar, or using nethrar will force the protals to behave as they are now, with only players being able to cross?
@greg2725d
Thanks!
I should probably make the beta official at some point...
I thank you very much for this plugin. We used to use an old plugin to fix the portal radius issue but it stopped being developed. I tested this one out and it works very well. Please keep it updated! :)
@aehooo
Yeah I'm not surprised. I think I only have a binary flag for creative/not creative, whereas it should actually be creative/easy/hard. Thanks for reporting! I'll try to add a fix to the beta soon.
@akrieger
Yes, the game is actually on easy mode. The mob damage is lower, people do not starve to death, zombies do not break doors... those two last ones are caracteristics from the hard mode, on the overworld all of those happen, but not on nether.
Also, this is an old issue, I remember this on 1.2.5, but I forgot to report this here lots of times.
@aehooo
I'm not sure how world difficulty works off the top of my head. Is the game *actually* in easy mode, or does the client just believe it is? Do players take easy-mode levels of damage, or hard-mode?
@akrieger
Ok, thanks for the tips :) Today I will try tweaking a little bit everything, as well testing the keep chunk loaded on portal thing. Server has low players, and I see that bukkit is not using even 20% of the avalible RAM, so I will give that a try.
Also, can you give one little more help? My server is set to hard difficulty, but when player is on nether, I see that it is on easy difficulty. The player does not die of starvation, or other caracteristics of the hard mode. Is it a plugin issue, or should I configure that on somewhere of my server?
On server.properties it is set as difficulty=3.
@aehooo
Well, causing teleportation is of course going to cause lag, since it makes the server spin up new worlds from disk and load and unload chunks. I recommend running nolagg *without* doing Nethrar teleportations, and seeing what the results are. That way you're more likely to find the cause of your issues over a longer term.
If you find that people are just teleporting a lot, well... that's probably your server, then. Another test you can do is get people into another world, then start nolagg (again without doing any more teleportation) and seeing what's up then. If nothing stands out, it's likely your server is just overloaded.
Also, I was having some TPS issues with my server, and begun a witch hunt.
Using the nolagg plugin, the function nolaggexamine, I fount that nethrar is a huge performance consumer on my server, heavier then bigger plugins like worldguard, bpermissions and logblocks.
Im not sure if its a "normal" behavior, or if its a problem on my server only. Do you know anything about that? Any tips to minimize that?
For information, I used the nolagg plugin, issued the "/nolagg examine" and used a little bit of every plugin, did 2 teleportations with nethrar. After that, I opened the .exam I found that whatever is "task 18" was a huge resource eater.