End gateway

The end gateway portal is created after defeating the ender dragon and is used to gain access to the surrounding islands containing chorus plants and end cities quicker than by other means.

Generation


A new end gateway portal generates near the edge of the main island each time the ender dragon is defeated. A maximum of twenty portals can be generated for each world, arranged in a circular fashion around the island at Y-level 75, approximately 70 to 100 blocks away from the center (0,0). Killing the ender dragon afterwards will not generate further portals.

An additional end gateway portal will generate in the outer End regions after activating one at the main island. These gateways generate at Y-level 66 to 69. If there are no blocks within a five-block radius from the gateway below these Y-coordinates however, then it generates above the usual level until there is a block below the structure within the radius. The exact X-Z position where the gateway generates in the outer islands is random, but it is always within ~1000 blocks from the center and relative to the X-Z coordinates of the first gateway portal and (0,0).

Structure
The end gateway portal is composed of an end gateway block confined within a small formation made up of twelve bedrocks.

Behavior
A purple beam shoots out vertically from the top and bottom of the gateway portal when generated, which disappears after about 5 seconds. When an entity enters the gateway, it emits a yellow beam momentarily.

Throwing an ender pearl directly into the end gateway block will teleport the player to the outer End islands. Any entity that moves into the end gateway block are also teleported. The bedrock arrangement prevents the player from directly doing so however. Entities riding on another entity (e.g. pigs and minecarts) are unable to be teleported until they dismount. Once teleported, another end gateway portal generates near where the player landed in the outer end islands that teleports the player back to the original gateway portal, providing a way to return to the main island.

The position that the player or entity lands after teleporting is based on an systematic algorithm; the gateway searches for a non-transparent block starting from the north-west corner at the topmost height (Y=255) within a 5 block radius around the gateway portal block. If there is a block at that position, then the entity is teleported on that block. If there is no block, then the next position along the Z-axis is searched (shown as the lapis lazuli block on right). This continues along each column in an 11 × 11 area at the same Y-level with the exception of blocks above, below, or directly adjacent (including diagonals) to the portal block. If there are no blocks, it moves one Y-level down and repeats the sequence from the north-west corner again. It will continue doing this until every height is checked, and if there are no non-transparent blocks within any of these points it will always teleport the entity exactly two blocks above the gateway portal block.