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.
@chessmaster42
It might be - it could also be some other plugin playing with vehicles. Do you have anything else that would affect minecarts in any way? You're not the first person to report this.
Just to confirm, you're using 1.2.3-R0.1, and the beta version of Nethrar download from here? Or from github?
I've been experiencing an issue getting minecarts with a rider to travel through the portal. I have the default nether portals disabled in server.properties so that Nethrar is the only thing controlling the portals. However a rider in a cart cannot get through. I can send riderless carts without issue though.
Might this be a bug with CB 1.2.3-R0.1 or a compatibility issue between Nethrar and the 1.2 CB build? That's the Bukkit server version I am running presently.
@marshallq Try something like this (if you don't want a Nether). All portals made in the normal world will go to the nordic world.
If you want a Nether, then try something like this. Portals made in either the Nether or in the normal world, with stone in the corners, will go to the nordic world.
Hello,
I have used the nordic plugin to generate a nordic map and i wanted to create portals to this map from my normal world.
However i seem unable to accomplish this. Could someone tell me what i should add into the worlds.yml to be able to create portal to this world (named Scandanavia)?
Thanks!
Ps. I've tried the suggested line for the worlds.yml however i find it strange this suggested config style is so much different then the present contents of the yml file.
The forum / plugin page states that this should be used / present in my worlds.yml, however it is not. And i've tried some combinations of the suggested code but nothing seems to work.
@akrieger - Ah. Much better with a lot less guessing about where the portals are. I wasn't sure if I should light the second portal or not. I will try it out and post my results.
It may be post Minecraft 1.2/Craftbukkit R6 update since I think the people on my server want to be eaten by zombles at the end of a maze or something. They might just want cats.
@lizardbones
You should do this:
@akrieger - Should I dismantle the existing destination portal? For instance: Log in, use /nethrar tp dungeon to teleport to the dungeon world. Dismantle the existing dungeon portal. Move to the location where I want the new portal and construct it (but don't light it). '/nethrar tp world' to get back to the world. Log out, shut down the server, edit the portals.yml file with the new location and then start everything back up.
Of course, no guarantees, I could portal into my brain and kill myself, etc., etc., but if I'm careful, it *should* work. Yes?
@lizardbones
Yes, although not recommended, it is totally allowed. To maximize your chances of success, you should first build a portal at the intended destination, and then manually edit the coordinates of the portal you want to 'move' there to match. How Nethrar works is it loads up the portals file, then looks for portals at each location. If it doesn't find one, it just drops it on the floor - the portals file is a non-authoritative record of what portals exist, just a 'suggestions' list.
Is it possible to fiddle with the destination locations using the portals.yml file? I've gotten the BananaMaze dungeon world to generate and the maze exists, but it's near the bottom of the world. The players spawn through the portal 50+ meters above the maze. Which is kind of neat, but it would be cool if the players spawned inside the maze or right on top of it instead of waaaaay above it.
@akrieger - Thank you. That makes sense. I do plan on having some restrictions, but it will be using something like MultiInv so that a planet full of diamonds isn't ferried back to the main world.
@lizardbones
You have 3 different 'world' listings - that's wrong. All of them need to have different names, and you should only have one entry for each actual world. In your case, you seem to have 4 worlds: world, world_nether, world_dungeon, and world_planetoids. So, what you want is probably something like this:
Note that this means your plays *can* make portals from dungeon to planetoids, and vice versa - they just have to use the special worldblocks. If you don't want this, you'll have to enforce it yourself; Nethrar does not currently support blocking specific worldblocks inside specific worlds.
I've gotten Nethrar setup, and it mostly seems to work. The Nether portals went to different locations in the nether, but it wasn't too big a deal, some tunneling and I was back to a known location.
However, I also have portals to two other worlds. One uses a Planetoids world generator and the other uses the BananaMaze generator. The BananaMaze doesn't teleport me in, but I think that's an issue with Minecraft since I can /tp to the world. What happens is that the portal with the Dungeons world block goes to the Planetoids world, and the portal with the Planetoids world block seems to be trying to take me to the Dungeons world.
Here is my 'worlds.yml'. Am I doing something wrong here?
@bergerkiller
If you have any questions, let me know via PM or you can find me as akrieger on irc.esper.net.
@akrieger Ok, if you put the needed info on this main page, I'll fiddle around with the plugin for a bit. (need to find out how portals even work :) )
EDIT
Sigh I really can't figure out how to make portals...how do I define the 'from' and 'to' portals? The 'worldBlock' type id system really is confusing... What does it set? I tried to use id 1 and made a portal with stone. The lighter didn't turn it into a portal, placing portal blocks and then entering didn't change anything. Maybe a tutorial video would be nice to help the 'newbies'...
@bergerkiller
Sure, I spawn a duplicate, but then I transfer over the relevant attributes. No items get lost, players are preserved, etc.
If riderlessVehicles is false, the teleport event won't fire, so there won't be a need for TrainCarts to do anything. Users of TrainCarts should be instructed to set the flag to true if they want unridden trains to go through portals.
@akrieger Well, not really, my function keeps the physical minecart referenced in the server. Yours will lose certain info (max speed, movement, items, passenger, you name it) because you spawn a duplicate of the vehicle.
Now there is a bit of an issue in the configuration bit:
Without a player passenger. While TrainCarts will teleport trains regardless if they have a passenger or not... So when exactly should I send my train to the other side?
@bergerkiller
Thanks, but I've already implemented everything I need (and have had it implemented) w/o resorting to nms code. In fact, our teleport functions are pretty darn similar, modulo the fact that I use strictly Bukkit code.
@akrieger Fixed all known issue for the day, time to add support. :) I'll test everything out a bit, guess it won't be too hard to allow it to function.
Btw, if you need help teleporting *any* entity cross-world, check BKCommonLibs' 'teleport' function under EntityUtil. Using that you can teleport any entity cross-world, even if they have a passenger.
@Skrufbajs
http://forums.bukkit.org/threads/mech-traincarts-v1-54-link-minecarts-of-different-types-together-to-form-trains-1575.29491/page-62#post-980115
@Skrufbajs
There already is a teleport event - NethrarVehicleTeleportEvent and NethrarMinecartTeleportEvent. Link him to https://github.com/akrieger/Nethrar/blob/master/src/org/akrieger/Nethrar/NethrarMinecartTeleportEvent.java, but also tell him that the event file will be getting a slight change (shouldn't break the API though) for 1.2. I'll also comment on the thread itself.