Monday, June 20, 2011

Minecraft Nether Portal Adjustment

Recently I finished the first project I'd ever decided to do in Minecraft: turning a mountain next to my base in my singleplayer world into a tower.  I put a Nether portal in the tower and activated it.

Then I sailed to my second base and built a Nether portal there.  My intention was to connect the two resulting portals in the Nether with a covered walkway, so I could safely travel from my main base to my second base via the Nether.  However, when I entered the portal in my second base, I came out the same portal that the one from the first base generated.

Lots of people have encountered this, and there's a simple solution.

The Nether is "compressed", every step you take within it is the equivalent of eight steps in the overworld.  If you figure out the distance between your portals in the overworld, you can figure out approximately where the portal should be in the Nether.  The problem that causes two overworld portals to link to one portal in the Nether is that when you use a new portal for the first time, it won't create a portal in the Nether that isn't safe.  It will move the portal to the nearest safe area, where once you go through the portal you can move and so forth.

In my case, the nearest place happened to be close enough to the already existing portal that I guess Minecraft decided to just re-use it.  However, while this worked brilliantly for fast travel back from my second base to my first, it wouldn't work the other way around.

The solution is to go to both of your affected overworld portals and press F3.  Stand in the same place relative to each portal, preferably right in front of it, and write down the X, Y, and Z coordinates of each.  In my case, the two sets of coordinates were:

Main base:
x: -93
y: 66
z: 80

Second base:
x: 44
y: 59
z: 205

The distance between these coordinates can be found by simple math.  Start with the coordinates from your original overworld portal.  Subtract each respective coordinate of the second overworld portal from these values, and take the absolute value of the result.  You won't always need to take the absolute value, for instance, if you go in a negative direction from one portal to the other.  In my case, though, the absolute value is necessary.  I'm sure there's a much simpler way to explain this, but it escapes me at the moment.  It's almost like you really should be multiplying the result by -1, except that I can see that not working in some cases.

The math so far:
Δx = -93 - 44 = -137, abs( -137 ) = 137
Δy = 66 - 59 = 7, abs( 7 ) = 7
Δz =  80 - 205 = -125, abs( -125 ) = 125

Now, divide your results by 8.  This gives you the distance you'll have to walk in each direction in the Nether to find where the missing portal should be.  You'll want to round everything down (the floor() function in most programming languages).

More math:
Δxnether = 137 / 8 = 17.125, floor( 17.125 ) = 17
Δynether = 7 / 8 = 0.875, floor( 0.875 ) = 0
Δznether = 125 / 8 = 15.625, floor( 15.625 ) = 15

Now, enter the first portal you created (the one that goes to the correct place).  Press F3 again, while standing the same distance from the portal as you did from the two in the overworld.  Write down its coordinates.

In my case:
xnether: -3
ynether: 81
znether: 12

Add your Δxnether, Δynether, and Δznether values to these coordinates.  This will give you the distance you'll have to walk in each direction to find where the portal should be.  Bring a pick, because you'll probably need to burrow through netherrack to reach the spot.

My target coordinates:
xnether: 14
ynether: 81
znether: 27

Mine out the area around this spot and build a portal there.  Remember that these coordinates are also relative to the distance you're standing in front of the portal, as they were in all other calculations.  Activate it, enter it, and it should take you directly to the second portal in the overworld.  Now re-enter the second portal in the overworld, and it should take you back to the newly created portal in the Nether.

There you go.  If this seems like too much to do, come back when you aren't being completely lazy.

No comments:

Post a Comment

I moderate comments because when Blogger originally implemented a spam filter it wouldn't work without comment moderation enabled. So if your comment doesn't show up right away, that would be why.