Nether portal – official minecraft wiki gas density of air

#

When a player in the Overworld or the Nether stands in a nether portal block for 4 seconds, the player is taken to the other dimension. The player can step out of a portal before it completes its animation to abort the teleport. However, in Creative, there is no wait time – the player will immediately transfer between dimensions. If there is already an active portal within range (about 128 blocks) in the other dimension, the player will appear in that portal. Otherwise, a portal will be created at or near the corresponding coordinates. If a portal is deactivated, and the matching portal in the other dimension is used before it is re-activated, a new portal may be created (not if there is another, active portal within range). The usual case for this is a when the player’s Nether-side portal is deactivated by a ghast, and then the player dies in the Nether and then re-enters the Nether. However, multiple portals can be exploited to farm obsidian.

Most entities can travel through portals, including mobs (except the wither and ender dragon), thrown items, and even boats, minecarts or horses without passengers (neither mobs nor player). Storage minecarts and powered minecarts can pass through. Note that wolves will not travel through portals in the Legacy Console Edition after a player, but can be pushed through. [ verify] Thus, inter-dimensional railways are limited to cargo. Note that mobs have a much longer "cool-down" time than the player, so they can’t go back for approximately 30 seconds, by which time they will have wandered or been led away from the portal. If the chunk on the other side of the portal is not loaded, entities passing through (including projectiles) will effectively be held in suspended animation until the chunk is loaded.

Zombie pigmen have a chance to spawn on the bottom frame of the portal in the Overworld if any nether portal block above receives a block tick. They spawn twice as often on Normal difficulty as on Easy, and three times as often on Hard difficulty compared to Easy. No other mobs can be spawned by nether portals in this way, in any dimension.

In single-player modes, or if distant from other players, moving between dimensions will cause the chunks around the area you left to be unloaded. This effectively stops time in the dimension you left, until you return. This affects all ongoing processes, including animal and plant growth, furnace smelting, brewing, and even primed TNT. This also means that when dying in the Nether (and respawning in the Overworld), your items will remain (lava and fire notwithstanding) until 5 minutes after you return to the Nether, or nearby regions thereof (the chunk update radius also applies in the Nether). Note that in multiplayer modes, a nearby player can keep the chunks loaded, so this may not apply.

Horizontal coordinates and distances in the Nether are proportional to the Overworld in a 1:8 ratio. That is, by moving 1 block horizontally in the Nether, players have moved the equivalent of 8 blocks on the Overworld. This does not apply on the Y-axis, despite the Nether having only 128 layers. Thus, for a given location (X, Y, Z) in the Overworld, the corresponding coordinates in the Nether are (floor(X ÷ 8), Y, floor(Z ÷ 8)), and conversely, for a location (X, Y, Z) in the Nether, the matching Overworld coordinates are (floor(X × 8), Y, floor(Z × 8)).

The Java floor() method used in these conversions rounds down to the largest integer less than or equal to the argument (towards smaller positive values and towards larger negative values), so a coordinate of 29.5 rounds to 29, and a coordinate of -29.5 rounds to -30.

First, if the portal block in which the player is standing has been used recently, then it will re-use the destination that was chosen the last time; in this sense, portals do "remember" their linked pairs, but only for about 15 seconds (300 game world ticks, or 150 redstone ticks). One side effect of this behavior is that the cached destination is not validated before being re-used, so if a player travels through a portal and immediately deactivates it on the other side, other players can still follow them through for the next 60 seconds and appear at the same destination, even though there is no longer an active portal there. After 60 seconds have passed without anyone using the same origin portal, the cached destination will expire.

If the player’s origin portal has not been used recently, then a new destination will be computed. First, the game converts the entry coordinates into destination coordinates as above: The entry X- and Z-coordinates are multiplied or divided by 8 (or 3) depending on direction of travel, while the Y-coordinate is not changed.

Starting at these destination coordinates, the game looks for the closest active portal. It searches a bounding area of 128 horizontal blocks from the player, and the full map height (128 for the Nether, 256 for the Overworld). This gives a search area of 257 blocks by 257 blocks, at the full height of the dimension being traveled to.

An active portal for this purpose is defined as a portal block which does not have another portal block below it, thus only the 2 lowest portal blocks in the obsidian frame are considered. A single portal block generated in and placed using server commands would be a valid location.

If a candidate portal is found, then the portal will teleport the player to the closest one as determined by the distance in the new coordinate system (including the Y coordinate, which can cause seemingly more distant portals to be selected). Note that this is Euclidean distance, not taxicab distance. The distance computation between portals in range is a straight-line distance calculation, and the shortest path will be chosen, counting the Y difference.

If no portals exist in the search region, the game creates one, by looking for the closest suitable location to place a portal, within 16 blocks horizontally (but any distance vertically) of the player’s destination coordinates. A valid location is 3×4 buildable blocks with air 4 high above all 12 blocks. When enough space is available, the orientation of the portal is random. The closest valid position in 3D distance is always picked.

If that fails too, a portal is forced at the target coordinates, but with Y constrained to be between 70 and 10 less than the world height (i.e. 118 for the Nether or 246 for the Overworld). When a portal is forced in this way, a 2×3 platform of obsidian with air 3 high above is created at the target location, overwriting whatever might be there. This provides air space underground or a small platform if high in the air. In Bedrock Edition, these obsidian blocks are flanked by 4 more blocks of netherrack on each side, resulting in 12 blocks of platform.

If a portal is forced into water or lava, the liquid will immediately flow into the generated air blocks, leaving you with no airspace. However, a glitch can prevent this water from flowing into the portal: if liquid would flow both vertically and horizontally into the air pocket, it instead flows only vertically, so the blocks on the platform’s outer corners never become water source blocks.