Skip to main content

Creating Wormholes

webapp_banner.jpg

What are Wormholes?

Wormholes are a kind of highly efficient portal-to-portal teleportation system. The portals are marked with visual effects.

Wormhole mechanics

Wormholes can do the following:

  • Go through one portal to reach the destination portal, and go from the destination portal back to the first one.
  • Play a sound when players go through them
  • Temporarily blind players while going through them to smooth the transition
  • Lock players out of teleportation until at least 5 seconds have passed and they have stepped back out of the destination portal's activation radius, to avoid getting caught in a teleport loop
  • Automatically disable flight mode when players teleport
  • Play elaborate visual effects
  • Require permissions to use the wormhole
  • Require the use of currency to use the wormhole
  • Notify players and admins when the destination portal is not available

Players are only checked against a wormhole every 5 ticks (a quarter of a second), and only while they are within 30 blocks of it.

Creating a Wormhole

Wormholes are added as configuration files to the wormholes folder. It is possible to create subfolders, and it is recommended to do so if you are adding wormholes for specific dungeons, under the format ` ~/plugins/EliteMobs/wormholes/dungeonName/dungeonName_identifier.yml`.

Placing a wormhole in-game

Instead of writing the coordinates by hand you can stand where you want the portal to be and run:

/em place wormhole <filename> <1/2>

1 sets location1, 2 sets location2. The command requires the elitemobs.place.admin permission, must be run by a player, and writes the new coordinates straight into the wormhole's configuration file. The portal is anchored one block (times sizeMultiplier) above where you were standing, so players arriving through it drop onto the block you were on.

Arrival direction

Yaw and Pitch (the last two numbers in the coordinates) in location1 and location2 set the direction the player is facing when they arrive at that side of the wormhole. Let's look at this example:

location1: my_world,20,10,20,180,20

With Yaw set to 180 the player arrives facing North. Pitch follows the Minecraft convention where positive values look down and negative values look up, so a Pitch of 20 means the player arrives looking slightly downwards.

Note that the wormhole does not push players anywhere; the arrival location is simply the other side's coordinates, including its yaw and pitch.

Wormhole Config

The following is an example of a valid Wormhole config:

isEnabled: true
location1: em_primis,1288.5,19,452.5,135,-23
location2: em_primis,1288.5,-39,451.5,180,-1

isEnabled

Sets if the wormhole is enabled.

KeyValuesDefault
isEnabledBooleantrue
Example
isEnabled: true

location1

Specifies the first location for the wormhole.

KeyValuesDefault
location1Stringnone
Example
location1: world_one,50,100,50,0,0

location2

Specifies the second location for the wormhole.

KeyValuesDefault
location2Stringnone
Example
location2: world_two,100,33,100,0,0

location1Text

Sets the display text of the first location.

KeyValuesDefault
location1TextStringnone
Example
location1Text: Awesome Wormhole In World One

create_wormhole_location1text.jpg


location2Text

Sets the display text of the second location.

KeyValuesDefault
location2TextStringnone
Example
location2Text: Awesome Wormhole In World Two

create_wormhole_location2text.jpg


permission

Sets the permission required to use the wormhole.

KeyValuesDefault
permissionStringnone
Example
permission: elitemobs.mypermission

coinCost

Sets the cost, in elite coins, of using the wormhole.

KeyValuesDefault
coinCostDouble0
Example
coinCost: 2.5

style

Sets the visual shape of the wormhole.

The shape is drawn as a rotating wireframe made of block displays, with a light dusting of particles added on top every 5 ticks. Setting style to NONE skips the shape entirely.

The effects that make up these shapes can cause lag in certain clients. To turn them off go into Wormholes.yml and set noParticlesMode to true.

KeyValuesDefault
styleNONE / CRYSTAL / ICOSAHEDRON / CUBECUBE
Example
style: CRYSTAL

create_wormhole_style.jpg


particleColor

Sets the color of the particles used in the style setting. The wireframe blocks do not use the exact color; EliteMobs picks the concrete block whose color is closest to the one you set.

The default of 0 is black, so it is worth setting this on every wormhole you make.

KeyValuesDefault
particleColor0x followed by a hexcode0
Example
particleColor: 0x9f5cdd

create_wormhole_particlecolor.jpg


blindPlayer

Sets if the portal blinds the player for a smoother teleport.

KeyValuesDefault
blindPlayerBooleanfalse
Example
blindPlayer: true

create_wormhole_blind.jpg


sizeMultiplier

Multiplies the size of the portal and the shape set by style. The sizeMultiplier also affects the activation radius - players must be within 1.5 × sizeMultiplier blocks of the wormhole to trigger teleportation.

KeyValuesDefault
sizeMultiplierMultiplier1
Example
sizeMultiplier: 3

Keep in mind that you will have to adjust the Y coordinates of the wormhole after applying the size multiplier.

create_wormhole_size.jpg


customModel1

Sets a custom model to use for the wormhole display at the first location. Uses a model identifier string. This overrides the shape defined in style for location 1.

Custom models on wormholes only work with FreeMinecraftModels; the model must exist or the wormhole falls back to the style wireframe. The model is purely decorative and cannot be clicked - teleporting is still based on proximity.

KeyValuesDefault
customModel1Stringnone
Example
customModel1: my_custom_wormhole_model

customModel2

Sets a custom model to use for the wormhole display at the second location. Uses a model identifier string. This overrides the shape defined in style for location 2. The same FreeMinecraftModels requirement as customModel1 applies.

KeyValuesDefault
customModel2Stringnone
Example
customModel2: my_custom_wormhole_model

Wormhole Config Example

In this example we will make a simple wormhole that takes us from one world into another. Do not forget that wormholes can also just teleport players to a different location in the same world.

isEnabled: true #We enable the worm by setting this value to true
location1: my_world,1.5,11.0,1.5,108.0,5.0 #this is where the wormhole will appear in my_world
location2: my_other_world,766.5,29.0,517.5,-136.0,5.0 #this is where the wormhole will appear in my_other_world
location1Text: "&aGo to My World" #makes a nice display text above wormhole location1
location2Text: "&aGo to My Other World" #makes a nice display text above wormhole location2
permission: eliteperm.coolplayers #only players with this permission will be able to use the wormhole, both for location1 and location2
coinCost: 2 #the players will need to pay 2 elite coins to be able to use the wormhole
style: CRYSTAL #this wormhole will be in the shape of a crystal
particleColor: 0x00ff00 #this will set the wormhole particles to green
blindPlayer: true #the wormhole teleport will blind the player for a short duration to make the transition less jarring
sizeMultiplier: 1.0 #sets how big the shape of the wormhole should be

Performance Issues

The wormhole effects can cause client performance issues for players that are running bedrock. You can configure their performance in ~plugins\EliteMobs\Wormholes.yml:

  • reducedParticlesMode: true (default) - Halves the number of points traced along the shape, for better performance
  • noParticlesMode: false (default) - Setting this to true completely disables the wormhole shape and particles

While either of those two options is enabled, Bedrock players connected through Geyser/Floodgate are additionally shown a simple marker entity in place of the shape, scaled by sizeMultiplier and tinted with particleColor. Java players never see it.

Note: Wormholes only render for players within 30 blocks, and only while at least one of those players has line of sight to the portal.