1. <!-- THIS IS A SCRIPTED WEB PAGE.
  2. Download it and save it as "NetherPortal.html",
  3. then open it with your browser to make it work! -->
  4.  
  5. <html>
  6.     <head>
  7.         <title>Nether Portal Calculator v1.0 by D3Phoenix</title>
  8.     </head>
  9.     <body bgcolor="silver">
  10.         <h2>Nether Portal Calculator v1.0 by D3Phoenix</h2>
  11.         <hr />
  12.         <h3>Instructions</h3>
  13.         <ol>
  14.             <li>Choose a location for a portal in the Overworld and, without lighting it, build the frame.</li>
  15.             <li>Walk into your portal frame as if you were going to use it, and record the F3 X, Y, and Z coordinates, as well as the Facing (F) number. (This is important if you care about having a smooth transition when you walk through a portal!).</li>
  16.             <li>Enter the coordinates into the Overworld to Nether calculator below. Double check your input, especially whether the numbers are positive or negative. Obsidian is a pain to break down and move if you make a mistake!</li>
  17.             <li>The resulting coordinates will be displayed in the grey boxes to the right. These are the target coordinates for placing your Nether-side portal.</li>
  18.             <li>Light your portal and go to the Nether.</li>
  19.             <li>Go to the calculated coordinates in the Nether using F3.</li>
  20.             <li>Destroy and replace the block below your feet at these coordinates with obsidian.</li>
  21.             <li>Turn your character until the F3 Facing (F) number from earlier matches up. This is the direction you will be facing when exiting the portal.</li>
  22.             <li>Place a second obsidian block in the floor either to your left or right (it doesn't matter). These two obsidian will form the base of your portal.</li>
  23.             <li>Build a walkway from the portal base at least a few blocks in the matching "F" number direction to ensure a smooth transition through the portal. (This ensures that you won't be staring at a wall after going through a portal.)</li>
  24.             <li>Complete the Nether portal frame and light it.</li>
  25.             <li>Disable or destroy the Nether portal that the game spawned for you when you first entered the Nether.</li>
  26.             <li>Exit the Nether through the new portal you just built.</li>
  27.             <li>If you did everything right, you should have a pair of perfectly linked Nether portals. You can repeat this process as many times as you like.</li>
  28.         </ol>
  29.         <hr />
  30.         <h3>Notes</h3>
  31.         <ul>
  32.             <li>This method exploits the fact that when passing through a portal, if the game detects a portal in the other dimension exactly at your target coordinates, it will always use that portal, even if other possible ones are within range.</li>
  33.             <li>To avoid linking problem, Make sure that no two Overworld portals are within 33 blocks of each other. (You can have them that close if your design requires it, just realize that they will probably both go to the same place.)</li>
  34.             <li>Even though slight misalignments in portal placement can still work, it is best to be as precise with your portal placement as possible to prevent conflicts.</li>
  35.             <li>There is more slack in portal placement in the Overworld due to the scale differences between the realms. (You can usually move a surface portal up to 8 blocks in any direction without fear of conflicts, so long as you do not break the 33 meter proximity rule when doing so.)</li>
  36.             <li>This method also works in reverse. If you are starting a portal pair from the Nether, use the same instructions but swap "Overworld" and "Nether" and use the second calculator.</li>
  37.             <li>Any time you read F3 coordinates, ignore the decimal part (round down). Only the whole number matters.</li>
  38.             <li>The Altitude (Y) coordinate matters! If you build a portal near sky limit in the Overworld, it will be near the ceiling in the Nether, and vice-versa. Keep this in mind, as you might end up having to build a bunch of ladders in the Nether to to complete a walkway between the portals otherwise!</li>
  39.             <li>I have included a handy 3D Distance calculator for checking the precise distances between portals, points, or anything else in minecraft. Just get the F3 coordinates of two locations enter them in the calculator.</li>
  40.         </ul>
  41.         <hr />
  42.         <h3>Coordinate Calculator: <font color="green">Overworld</font> Source to <font color="red">Nether</font> Destination</h3>
  43.         <form name="OtoN">
  44.             <table border="4">
  45.                 <tr>
  46.                     <th colspan=3>Overworld Coordinates</th>
  47.                     <th></th>
  48.                     <th colspan=3>Nether Coordinates</th>
  49.                 </tr>
  50.                 <tr>
  51.                     <th width="50">X</th>
  52.                     <th width="50">Y</th>
  53.                     <th width="50">Z</th>
  54.                     <th width="25"></th>
  55.                     <th width="50">X</th>
  56.                     <th width="50">Y</th>
  57.                     <th width="50">Z</th>
  58.                 </tr>
  59.                 <tr>
  60.                     <td><input type="text" name="SrcX" size="5" value="0" style="text-align: center;" onkeypress="return isNumberKey(event)" onkeyup="CalcOtoN()" onFocus="this.select()"></td>
  61.                     <td><input type="text" name="SrcY" size="5" value="0" style="text-align: center;" onkeypress="return isNumberKey(event)" onkeyup="CalcOtoN()" onFocus="this.select()"></td>
  62.                     <td><input type="text" name="SrcZ" size="5" value="0" style="text-align: center;" onkeypress="return isNumberKey(event)" onkeyup="CalcOtoN()" onFocus="this.select()"></td>
  63.                     <td><center><b>--&gt;</b></center></td>
  64.                     <td><input type="text" name="DstX" size="5" value="0" style="text-align: center; background-color: silver;" onkeypress="return isNumberKey(event)" onkeyup="CalcOtoN()" onFocus="this.select()"></td>
  65.                     <td><input type="text" name="DstY" size="5" value="0" style="text-align: center; background-color: silver;" onkeypress="return isNumberKey(event)" onkeyup="CalcOtoN()" onFocus="this.select()"></td>
  66.                     <td><input type="text" name="DstZ" size="5" value="0" style="text-align: center; background-color: silver;" onkeypress="return isNumberKey(event)" onkeyup="CalcOtoN()" onFocus="this.select()"></td>
  67.                 </tr>
  68.                 <tr>
  69.                     <td colspan=7><input type="button" name="OtoN_Reset" value="Reset" style="width: 100%;" onclick="ClearOtoN()"></td>
  70.             </table>
  71.             <script type="text/javascript">
  72.                 <!--
  73.                function CalcOtoN()
  74.                {
  75.                    var sx, sy, sz;
  76.  
  77.                    sx = parseInt(document.OtoN.SrcX.value);
  78.                    sy = parseInt(document.OtoN.SrcY.value);
  79.                    sz = parseInt(document.OtoN.SrcZ.value);
  80.  
  81.                    if ((sy > 123) || (sy < 1))
  82.                        document.OtoN.SrcY.style.background = "#FF8080";
  83.                    else
  84.                        document.OtoN.SrcY.style.background = "#FFFFFF";
  85.  
  86.                    document.OtoN.DstX.value = Math.floor(sx / 8);
  87.                    document.OtoN.DstY.value = sy;
  88.                    document.OtoN.DstZ.value = Math.floor(sz / 8);
  89.                }
  90.  
  91.                function ClearOtoN()
  92.                {
  93.                    document.OtoN.SrcX.value = "0";
  94.                    document.OtoN.SrcY.value = "0";
  95.                    document.OtoN.SrcZ.value = "0";
  96.                    document.OtoN.DstX.value = "0";
  97.                    document.OtoN.DstY.value = "0";
  98.                    document.OtoN.DstZ.value = "0";
  99.                    document.OtoN.SrcY.style.background = "#FFFFFF";
  100.                }
  101.  
  102.                function isNumberKey(e)
  103.                {
  104.                    var chr = (e.which) ? e.which : e.keyCode
  105.                    if ( (chr <= 57) || (chr == 189) )
  106.                        return true;
  107.                    return false;
  108.                }
  109.                //-->
  110.             </script>
  111.         </form>
  112.         <hr />
  113.         <h3>Coordinate Calculator: <font color="red">Nether</font> Source to <font color="green">Overworld</font> Destination</h3>
  114.         <form name="NtoO">
  115.             <table border="4">
  116.                 <tr>
  117.                     <th colspan=3>Nether Coordinates</th>
  118.                     <th></th>
  119.                     <th colspan=3>Overworld Coordinates</th>
  120.                 </tr>
  121.                 <tr>
  122.                     <th width="50">X</th>
  123.                     <th width="50">Y</th>
  124.                     <th width="50">Z</th>
  125.                     <th width="25"></th>
  126.                     <th width="50">X</th>
  127.                     <th width="50">Y</th>
  128.                     <th width="50">Z</th>
  129.                 </tr>
  130.                 <tr>
  131.                     <td><input type="text" name="SrcX" size="5" value="0" style="text-align: center;" onkeypress="return isNumberKey(event)" onkeyup="CalcNtoO()" onFocus="this.select()"></td>
  132.                     <td><input type="text" name="SrcY" size="5" value="0" style="text-align: center;" onkeypress="return isNumberKey(event)" onkeyup="CalcNtoO()" onFocus="this.select()"></td>
  133.                     <td><input type="text" name="SrcZ" size="5" value="0" style="text-align: center;" onkeypress="return isNumberKey(event)" onkeyup="CalcNtoO()" onFocus="this.select()"></td>
  134.                     <td><center><b>--&gt;</b></center></td>
  135.                     <td><input type="text" name="DstX" size="5" value="0" style="text-align: center; background-color: silver;" onkeypress="return isNumberKey(event)" onkeyup="CalcNtoO()" onFocus="this.select()"></td>
  136.                     <td><input type="text" name="DstY" size="5" value="0" style="text-align: center; background-color: silver;" onkeypress="return isNumberKey(event)" onkeyup="CalcNtoO()" onFocus="this.select()"></td>
  137.                     <td><input type="text" name="DstZ" size="5" value="0" style="text-align: center; background-color: silver;" onkeypress="return isNumberKey(event)" onkeyup="CalcNtoO()" onFocus="this.select()"></td>
  138.                 </tr>
  139.                 <tr>
  140.                     <td colspan=7><input type="button" name="NtoO_Reset" value="Reset" style="width: 100%;" onclick="ClearNtoO()"></td>
  141.             </table>
  142.             <script type="text/javascript">
  143.                 <!--
  144.                function CalcNtoO()
  145.                {
  146.                    var sx, sy, sz;
  147.  
  148.                    sx = parseInt(document.NtoO.SrcX.value);
  149.                    sy = parseInt(document.NtoO.SrcY.value);
  150.                    sz = parseInt(document.NtoO.SrcZ.value);
  151.  
  152.                    if ((sy > 123) || (sy < 1))
  153.                        document.NtoO.SrcY.style.background = "#FF8080";
  154.                    else
  155.                        document.NtoO.SrcY.style.background = "#FFFFFF";
  156.  
  157.                    document.NtoO.DstX.value = (sx * 8);
  158.                    document.NtoO.DstY.value = sy;
  159.                    document.NtoO.DstZ.value = (sz * 8);
  160.                }
  161.  
  162.                function ClearNtoO()
  163.                {
  164.                    document.NtoO.SrcX.value = "0";
  165.                    document.NtoO.SrcY.value = "0";
  166.                    document.NtoO.SrcZ.value = "0";
  167.                    document.NtoO.DstX.value = "0";
  168.                    document.NtoO.DstY.value = "0";
  169.                    document.NtoO.DstZ.value = "0";
  170.                    document.NtoO.SrcY.style.background = "#FFFFFF";
  171.                }
  172.  
  173.                function isNumberKey(e)
  174.                {
  175.                    var chr = (e.which) ? e.which : e.keyCode
  176.                    if ( (chr <= 57) || (chr == 189) )
  177.                        return true;
  178.                    return false;
  179.                }
  180.                //-->
  181.             </script>
  182.         </form>
  183.         <hr />
  184.         <h3>3D Distance Calculator:</h3>
  185.         <form name="Dist">
  186.             <table border="4">
  187.                 <tr>
  188.                     <th colspan="3">Location 1</th>
  189.                     <th></th>
  190.                     <th colspan="3">Location 2</th>
  191.                     <th></th>
  192.                     <th></th>
  193.                 </tr>
  194.                 <tr>
  195.                     <th width="50">X<sub>1</sub></th>
  196.                     <th width="50">Y<sub>1</sub></th>
  197.                     <th width="50">Z<sub>1</sub></th>
  198.                     <th></th>
  199.                     <th width="50">X<sub>2</sub></th>
  200.                     <th width="50">Y<sub>2</sub></th>
  201.                     <th width="50">Z<sub>2</sub></th>
  202.                     <th></th>
  203.                     <th width="50">Distance</th>
  204.                 </tr>
  205.                 <tr>
  206.                     <td><input type="text" name="X1" size="5" value="0" style="text-align: center;" onkeypress="return isNumberKey(event)" onkeyup="CalcDist()" onFocus="this.select()"></td>
  207.                     <td><input type="text" name="Y1" size="5" value="0" style="text-align: center;" onkeypress="return isNumberKey(event)" onkeyup="CalcDist()" onFocus="this.select()"></td>
  208.                     <td><input type="text" name="Z1" size="5" value="0" style="text-align: center;" onkeypress="return isNumberKey(event)" onkeyup="CalcDist()" onFocus="this.select()"></td>
  209.                     <td></td>
  210.                     <td><input type="text" name="X2" size="5" value="0" style="text-align: center;" onkeypress="return isNumberKey(event)" onkeyup="CalcDist()" onFocus="this.select()"></td>
  211.                     <td><input type="text" name="Y2" size="5" value="0" style="text-align: center;" onkeypress="return isNumberKey(event)" onkeyup="CalcDist()" onFocus="this.select()"></td>
  212.                     <td><input type="text" name="Z2" size="5" value="0" style="text-align: center;" onkeypress="return isNumberKey(event)" onkeyup="CalcDist()" onFocus="this.select()"></td>
  213.                     <td></td>
  214.                     <td><input type="text" name="D1"  size="5" value="0" style="text-align: center; width: 100%; background-color: silver;" onkeyup="CalcDist()"></td>
  215.                 </tr>
  216.                 <tr>
  217.                     <td colspan=9><input type="button" name="Dist_Reset" value="Reset" style="width: 100%;" onclick="ClearDist()"></td>
  218.                 </tr>
  219.             </table>
  220.             <script type="text/javascript">
  221.                 <!--
  222.                function CalcDist()
  223.                {
  224.                    var dx, dy, dz, result;
  225.  
  226.                    dx = parseInt(document.Dist.X2.value) - parseInt(document.Dist.X1.value);
  227.                    dy = parseInt(document.Dist.Y2.value) - parseInt(document.Dist.Y1.value);
  228.                    dz = parseInt(document.Dist.Z2.value) - parseInt(document.Dist.Z1.value);
  229.  
  230.                    result = Math.sqrt(Math.pow(dx,2) + Math.pow(dy,2) + Math.pow(dz,2));
  231.  
  232.                    document.Dist.D1.value = result;
  233.  
  234.                    if (result <= 33)
  235.                        document.Dist.D1.style.background = "#FF8080";
  236.                    else
  237.                        document.Dist.D1.style.background = "silver";
  238.                }
  239.  
  240.                function ClearDist()
  241.                {
  242.                    document.Dist.X1.value="0";
  243.                    document.Dist.Y1.value="0";
  244.                    document.Dist.Z1.value="0";
  245.                    document.Dist.X2.value="0";
  246.                    document.Dist.Y2.value="0";
  247.                    document.Dist.Z2.value="0";
  248.                    document.Dist.D1.value="0";
  249.                    document.Dist.D1.style.background = "silver";
  250.                }
  251.  
  252.                //-->
  253.             </script>
  254.         </form>
  255.         <hr />
  256.         <font size=1>Yeah, I know I've got some ugly HTML+JS stuff going here. I suck at CSS :)  If you'd like to clean it up, feel free -- License below. Please just include a credit to me.</font>
  257.         <br />
  258.         <br />
  259.         <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"><img alt="Creative Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by-sa/3.0/80x15.png" /></a>&nbsp;<span xmlns:dct="http://purl.org/dc/terms/" href="http://purl.org/dc/dcmitype/InteractiveResource" property="dct:title" rel="dct:type">Nether Portal Calculator v1.0</span> by <span xmlns:cc="http://creativecommons.org/ns#" property="cc:attributionName">D3Phoenix</span> is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/">Creative Commons Attribution-ShareAlike 3.0 Unported License</a>.
  260.     </body>
  261. </html>