The classic portal plugin, ported to Sponge.
7

Gates

The nether-portal design is all right, but you can absolutely make your own gates!

To start off with, create a new gate file in your gates folder. Refer to nethergate.gate for an example. The file has two sections, the options section and the diagram section.

Block states

A blockstate is an extended form of a block ID which encompasses both the ID and the data value. For example: minecraft:stone[variant=granite] would be the blockstate of a block of granite. All blockstate variables must be defined; e.g. minecraft:piston[sticky=true] is not valid but minecraft:piston[sticky=true,facing=east] is. Don’t worry about incorrect facing directions or axes, they don’t matter in the frame definition and they’re auto-rotated in the entrance/exit (but you still have to give them a value).

Options section

In this section, you define the various options. They are key=value format.
portal-open is the blockstate that the portal is filled with when it is open.
portal-closed is the blockstate that the portal is filled with when it is closed.
toowner is a boolean defining whether the use cost of this portal goes to the owner, or is just subtracted.
usecost is the cost of using portals of this type.
createcost is the cost of creating portals of this type.
destroycost is the cost of destroying portals of this type.
Any single-character key such as X should have a blockstate value, and it will be used in the diagram section. The - blockstate is special, and must also be included.

Diagram section

After a blank line between this and the options section, it’s time to draw the portal.
Portals are in a 2D format, with each character representing a block that you defined in the options section.
Certain characters are special:
A space represents ‘any block’. If you specifically need air, make a block for it in the options.
. represents the portal entrance. This block will be affected by portal-open and portal-closed, and must be minecraft:air when the portal is created.
* acts identically to an entrance, but is also the exit - any players leaving this portal will be teleported in front of this block. There must be exactly one of these.
- is special - it is still defined in the options, but also represents the blocks that the sign and the button are placed on. There must be exactly two of these.

Warning

Don’t use fluid such as water or lava in portals in any version created while this warning is on this page. It will flow everywhere and make a mess.

Default

nethergate.gate for reference:

portal-open=minecraft:portal[axis=x]
portal-closed=minecraft:air
toowner=false
X=minecraft:obsidian
-=minecraft:obsidian

 XX 
X..X
-..-
X*.X
 XX 

Category: Gameplay

Published on Jul 3, 2017

views

stars

watchers

total downloads

Licensed under GNU Lesser General Public License (LGPL)

Promoted Versions

Members