Flight networks
A flight network is a set of nodes in one world, joined by two-way links. Nodes with a name are destinations. A player picks a destination at a flight master NPC or a flight portal, and a mount flies them along the shortest chain of links to it. Networks live in plugins/EliteMobs/transport_networks/ and use the same mounts and journey rules as transport routes.
Each flight is built when the player asks for it. EliteMobs runs an A* search over the links, using the straight-line distance between nodes, and the mount follows a smooth curve through every node on the result. You never author a route for each pair of destinations: a new node or link is used by every flight it shortens.
How players fly
- The player right-clicks a flight master NPC or steps into a flight portal.
- A Flight paths menu lists every destination reachable from the NPC's or portal's node, nearest first along the links, up to 54. Destinations the player has not unlocked show as gray dye with their locked hint.
- Clicking a destination starts a countdown, 60 ticks (3 seconds) by default, at the end of which the mount picks the player up at the departure point.
- The mount flies the path and sets the player down at the destination, facing its
arrivalYaw.
A flight master or portal can also skip the menu and fly straight to one destination. See flight masters and flight portals.
The player has to stay within 8 blocks of the NPC or portal when clicking a destination, or the click does nothing. At an NPC, any movement during the countdown cancels the departure. At a portal, the countdown only cancels when the player leaves the portal's zone, 1.5 × sizeMultiplier + 2 blocks from its center.
Sneaking does not get a rider off mid-flight. The flight ends early on death, a teleport, a world change, leaving the dungeon instance, or the mount being removed. A flight that stops making progress for 5 seconds sets the rider down at the destination. A rider who disconnects mid-flight outside a dungeon instance is placed at the destination on their next login, and stopping or reloading the server places boarded riders at their destination too.
Build a network in game
The editor commands are player-only and require elitemobs.transport.admin.
- Stand in the network's world and run
/em transport network edit harbor_flights. A network without a file starts as an empty draft. - Stand where players should board and run
/em transport node add harbor. - Fly up and run
/em transport node add harbor_sky. With no neighbors listed, a new node links to the selected node, and the new node becomes the selected one, so a chain ofaddcommands builds a path. - Continue to the next destination and add it the same way. Use
/em transport node link <a> <b>to join branches. - Name each destination with
/em transport node destination harbor &6Harbor. - Stand at a destination facing the way players should arrive and run
/em transport node yaw harbor. - Check a path with
/em transport network preview harbor mine, and fly it with/em transport network ride harbor mine. - Run
/em transport network save.
Node and network IDs are 1-64 lowercase letters, digits, underscores or hyphens. A draft records your current world as the network's world. Inside a dungeon instance it records the dungeon's blueprint world instead. An existing network can only be edited from its own world.
Editor commands
| Command | Action |
|---|---|
/em transport network edit <network> | Open a draft of an existing network, or start a new one |
/em transport network list | List loaded networks |
/em transport network status | Show the draft's node count and selected node |
/em transport network preview [from] [to] | Show the path between two nodes; with no nodes, clear the preview |
/em transport network ride <from> <to> | Fly between two draft nodes without saving |
/em transport network generate <first> <second> | Replace the link between two nodes with generated nodes that clear the terrain |
/em transport network undo | Undo the last node or link edit, up to 32 retained edits |
/em transport network save | Save the draft |
/em transport network cancel | Discard the draft |
/em transport node add <id> [neighbors...] | Add a node where you stand, linked to the listed nodes or else to the selected node |
/em transport node select [node] | Select a node; with no node, select the one nearest you |
/em transport node link <first> <second> | Link two nodes in both directions |
/em transport node unlink <first> <second> | Remove the link between two nodes |
/em transport node move <node> | Move a node to where you stand |
/em transport node remove <node> | Remove a node and its links |
/em transport node destination <node> [name] | Make the node a destination with that menu name; with no name, make it a plain waypoint again |
/em transport node permission <node> <permission> | Require a permission to fly from or to this node; none clears it |
/em transport node hint <node> [text] | Set the message shown while the node is locked; no text or none clears it |
/em transport node yaw <node> | Set the arrival direction to the way you are facing |
Tab completion suggests network IDs for edit and the draft's node IDs for the node arguments. Every command except edit, list, save, cancel and status needs you in the draft's world. You can edit one network at a time. A draft stays in memory until you save or cancel it, disconnect, its world unloads or EliteMobs reloads.
/em transport network ride moves you to the first node and departs from there, even if you are elsewhere. It does not check node permissions, and the destination can be any node, named or not.
/em transport reload reloads network files along with route files. Flights already in the air keep their original path.
Editor view
Only the editing player sees the draft. Every node within 128 blocks shows its ID above it, with the destination name on a second line. The selected node's label is yellow. Links are drawn as light blue lines. After preview, the path is drawn in green. Otherwise a yellow curve runs through the selected node to where you stand, showing how a flight would bend if you added a node there.
Generate placeholder nodes
A straight link between two distant nodes can cut through a hill. /em transport network generate <first> <second> builds a chain over the terrain instead:
- It reads the ground height every 4 blocks along the line between the two nodes, three columns wide. It only reads chunks that have already been generated and loads at most two of them per tick, so it never creates new terrain.
- Each chain point flies 12 blocks above the highest ground within about 32 blocks either way and never below the straight line between the two nodes. It stays at least 4 blocks under the build limit.
- It places a node roughly every 48 blocks, plus a node straight above either end when the chain flies more than 2 blocks higher than that end.
- It removes the direct link and links the two nodes through the chain.
The nodes must be at least 16 blocks apart horizontally. Generated nodes are named <first>_<second>_1, <first>_<second>_2 and so on, and are saved with placeholder: true so you can find them later. One undo removes the whole chain. Ride the result before saving: the generator only looks at terrain, not at buildings or trees.
Network YAML
For harbor_flights.yml:
isEnabled: true
world: my_world
transportEntity: transport_cannon_seat.yml
speed: 24.0
acceleration: 16.0
countdownTicks: 60
nodes:
harbor:
location: 120.5,64.0,-340.5
name: '&6Harbor'
arrivalYaw: 90.0
neighbors:
- harbor_sky
harbor_sky:
location: 120.5,96.0,-340.5
neighbors:
- harbor
- ridge_pass
ridge_pass:
location: 310.0,110.0,-180.0
neighbors:
- harbor_sky
- mine_sky
- watchtower_sky
watchtower_sky:
location: 455.5,102.0,-60.5
neighbors:
- ridge_pass
- watchtower
watchtower:
location: 455.5,81.0,-60.5
name: '&6Watchtower'
arrivalYaw: -45.0
permission: elitequest.watchtower_supplies.yml
lockedHint: '&7Finish the quest "Watchtower Supplies" to unlock this flight point.'
neighbors:
- watchtower_sky
mine_sky:
location: 260.0,95.0,20.0
neighbors:
- mine
- ridge_pass
mine:
location: 262.5,70.0,24.5
name: '&6Old Mine'
arrivalYaw: 180.0
neighbors:
- mine_sky
| Key | Default | Description |
|---|---|---|
isEnabled | true | Loads the network |
world | none | The world the nodes are in. Required |
transportEntity | transport_cannon_seat.yml | An enabled file in custombosses/ used as the mount. Configure its entity type, model and powers there |
speed | 24 | Top speed in blocks per second. Must be positive |
acceleration | 16 | Blocks per second gained each second until top speed. Must be positive |
countdownTicks | 60 | Ticks between choosing a destination and boarding. Zero or more |
nodes | none | Map of node IDs to node sections |
A network with no world, a transportEntity that is not a .yml filename, or an invalid speed, acceleration or countdown logs a warning and does not load.
Node keys
| Key | Description |
|---|---|
location | x,y,z in the network's world. Required |
name | Menu name. A node with a name is a destination; one without is a waypoint that flights pass through. Color codes work |
arrivalYaw | Direction a player faces on arriving at this destination. Defaults to 0 |
permission | Permission needed to fly from or to this node |
lockedHint | Text shown for this node while it is locked. Defaults to &7You have not unlocked this flight point. |
neighbors | Node IDs this node links to |
placeholder | true on nodes made by the generator. Flights treat them like any other node |
Links work in both directions, so listing a neighbor on one side is enough. EliteMobs warns and drops a link to a missing node or to a node at the same position, skips an invalid node, warns about a node with no neighbors, and, in a network with more than one destination, warns about a destination that cannot reach any other.
Saving from the editor rewrites only the nodes section and keeps comments and unknown keys inside nodes that still exist. A new file also gets the network settings above, with the default values. The editor refuses to save over a network file that is disabled or failed to load; fix or remove that file first.
The mount flies the curve exactly. It does not steer around obstacles, so keep the space between nodes clear for the mount and rider. Mounts whose entity type is a chicken or a parrot shed feathers and beat their wings while flying. See route clearance and interruptions for what happens when the mount cannot spawn.
Flight masters
A flight master is an NPC with interactionType: TRANSPORT and a network:
interactionType: TRANSPORT
transportNetwork: harbor_flights
transportNode: harbor
Add these fields to an otherwise valid NPC definition. transportNode is the node the NPC's flights leave from. The mount picks the player up at that node, so place it next to the NPC. Add transportDestination: mine to fly straight to that destination without a menu. When transportNetwork is set, the NPC ignores transportRoutes.
Flight portals
A wormhole with a flight section opens a flight menu instead of teleporting:
isEnabled: true
location1: my_world,120.5,66,-336.5,90,0
style: ICOSAHEDRON
particleColor: 0xf0c060
sizeMultiplier: 2.0
flight:
network: harbor_flights
node: harbor
flight.node is the departure node, and the mount picks the player up there, so place that node at the portal. flight.destination flies straight to that destination without a menu. A flight portal needs only location1; with location2 set too, both ends open the same menu. It does not charge coinCost or apply blindPlayer, but its permission still applies. To reopen the menu, step out of the portal's zone and back in, at least 5 seconds after it last opened.
Wormholes do not trigger for a player who is riding a flight. A player set down inside a portal has to step out of it, and 5 seconds have to pass, before it triggers again.
Locked flight points
A node with a permission is locked for players without it. A flight checks only its departure and destination nodes, so a path can pass through locked waypoints. To unlock a destination with a quest, use the quest's questLockoutPermission marker, such as elitequest.watchtower_supplies.yml, as the node's permission. Players get it when they complete the quest.
When the departure node is locked, the player gets its lockedHint instead of a menu. Locked destinations stay in the menu, grayed out, and clicking one shows its hint.
Players with /em quest bypass on pass every node permission.
Flights inside instanced dungeons
Set world to the dungeon's blueprint world. A flight started inside a dungeon instance flies through that player's copy of the world. Use an instanced wormhole with a flight section, or an instanced NPC, as the flight point. A rider who disconnects mid-flight inside an instance is not placed at the destination on login; the dungeon's own rules for returning players apply.