Monday, February 27, 2012

Does length dilation affect the Y axis in the Nether?

Question

It's known that traveling one block in the Nether is equivalent to traveling 8 blocks in the real world, and I can confirm that along the X and Z axes by building four portals: two in the Nether and two in the real world.

But I can't seem to corroborate the length dilation from the Nether to the real world along the Y axis (height).

That is, if I build the following portals:

  • Nether:
    • Portal 1 at n height
    • Portal 2 at n - 8 height
  • Real world:
    • Portal 3 at m height
    • Portal 4 at m - 64 height

I expect Portal 1 and 3 to link up while portal 2 and 4 should link up. But in my testing, if I use portal 1 or 2, they lead to portal 3, and if I use portal 3 or 4, they lead to portal 2.

Is there any evidence—in the form of a video, a world save file, or notch—that one nether block equals 8 real world blocks along the Y axis? I'm trying to determine if my error is in calculation or if it's in execution.


    Y     
    │      
    │      XYZ reference system
    └───X  for this question.
   ╱
  ╱ 
 Z
Asked by Mark Trapp

Answer

According to this thread in the Minecraft Forums that seems to have peeked into the code, length dilation does not affect the y-axis.

http://www.minecraftforum.net/topic/345806-nether-portal-science/

Summary version

  • Calculate coordinate of destination based on entry coordinate. (X, Y, Z) <---> (X*8, Y, Z*8)

  • At destination, look for the closest active nether portal within a 128 block radius of the player (257x257x128 area centered on destination) (the Euclidean distance (the 3D distance)). Teleport player there if one exists.

  • If no portal exists in the 128 block radius, the game creates one by looking for the closest possible nearby position within a 16 radius column (33x33x128 area) that has enough space to spawn a portal. And teleports the player there.

  • And if there's no possible spawn position with solid ground, it just creates a portal at the destination anyway, converting any blocks in the way into a portal.

Answered by runaros

No comments:

Post a Comment