Minecraft Nether Portal Connection and Creation Mechanism Many players want to know. Minecraft has a very high degree of freedom, and various versions are constantly updated. Many players like this game. Let's take a look at the introduction of the connection and creation mechanism of the Minecraft Nether Portal.
Minecraft Nether Portal Connection and Creation Mechanism
"Eight-fold Relationship": Roughly speaking, every 1 square moved in the Nether is equivalent to 8 squares moved in the main world.
The connection mechanism of the Nether Portal is relatively complicated, but it is very useful if used well. Typical examples are fast travel and various multi-dimensional monster towers. If you are a bionic player, this mechanism is really worth your time to understand.
The coordinates in the text are all block coordinates, not the decimal coordinates owned by players and other entities.
If you are not familiar with these mechanisms, please read them carefully. The author has tried hard to help you understand w
I. Mechanism of finding the corresponding door when teleporting

1. "Corresponding coordinates"
When you enter a nether portal at the coordinates (x, y, z) of the main world, the "corresponding coordinates" in the nether are (floor(x/8), y, floor(z/8)); when you enter a nether portal at the coordinates (x, y, z) of the nether, the "corresponding coordinates" in the main world are (8x, y, 8z). Among them, floor() is rounded down (the largest integer less than or equal to the number in the brackets). From here we can see the 8-fold relationship between the main world and the nether, for example, if you enter the nether portal at the main world (403, 64, -235), the "corresponding coordinates" in the nether are (50, 64, -30).
2. Corresponding gate search range and selection method
After entering the portal from the main world and finding the "corresponding coordinates" of the netherworld, the search range of the portal is as follows: every block with any y coordinate, and [the sum of the difference between the x coordinate and the "corresponding coordinate" and the difference between the z coordinate and the "corresponding coordinate" does not exceed 16] is within the search range. If you want to teleport from the netherworld to the main world, this sum does not exceed 128 (following the 8-fold relationship between the two latitudes). Based on this, if you enter the portal at (32,64,160) in the main world, and the corresponding coordinates in the netherworld are (4,64,20), the search range is a rhombus with a diagonal length of 16x2+1=33 blocks (don't think too much, generally this rhombus is the same no matter where it is):
Minecraft netherworld portal connection and creation mechanism
The gold block is at x=4, z=20 (i.e. "corresponding coordinates"), the north corner (negative z coordinate) of the rhombus is x=4, z=4, the west corner (negative x coordinate) is x=-12, z=20, and the midpoint of the northwest side is x=-4, z=12. The blocks on the edges of these rhombuses are all blocks where [the sum of the difference between the x coordinate and the gold block and the difference between the z coordinate and the gold block is exactly 16]. In fact, the complete search range is from the lowest point to the highest point in the world, which can be regarded as a column several hundred blocks high made of this rhombus.
The same applies to teleporting from the Nether to the Overworld, except that the diagonal length of this diamond becomes 128x2+1=257 grids.
After searching for all portals within the range, the entity will be teleported to the portal closest to the "corresponding coordinates". The distance here is the straight-line distance in the general sense.
2. Create a portal
There is not always a portal within the search range of the "corresponding coordinates", especially when the player first enters the Nether. When a portal cannot be found, the game will try to create one. The range for trying to create a portal is different from the above. Here is a cuboid with a length and width of 33 from the bottom of the world to the top (except for the part above the upper layer of the Nether bedrock) centered on the "corresponding coordinates" (regardless of the Overworld or the Nether, the length and width of this cuboid are 33, not following the 8-fold relationship), and a 3x4 buildable area with 4 air blocks on top is a valid location. The game will always create a portal as close to the "corresponding coordinates" as possible in a straight line. If no valid location is found, a portal is forcibly created within the bounds of the box, either inside a pile of blocks or in mid-air.