# Teleporter (IndustrialCraft 2)

Teleporter

ModIndustrialCraft 2
TypeMachine

The Teleporter is a machine in IndustrialCraft 2 that is used to instantly transport players, animals, and mobs over a distance to another Teleporter. The EU cost of the teleportation depends on the distance covered, and the weight of what is being teleported.

## Usage

### Powering the Teleporter

Due to the large amount of EU used to teleport, it is not sufficient to connect a Teleporter to the EU network with Cables; not enough EU could be provided quickly enough. Instead, the Teleporter must be placed directly touching an EU storage unit: BatBoxes, MFE's, MFSU's, LESU's, IESU's, and AESU's all work. The EU cost of teleporting will be shared equally between any EU storage units that are adjacent to the Teleporter.

#### Calculating the EU Cost

The Teleporter uses a somewhat complicated formula for determining how many EU's are needed to perform one teleportation: ${\textstyle {cost = \left\lfloor 5 \times \lfloor weight \rfloor \times (\lfloor distance \rfloor + 10 )^{0.7}\right\rfloor}}$ This formula has two key variables- weight, and distance.

##### Weight Formula

The weight of an animal is always 500, and the weight of a mob is always 100. The weight of a player can be determined with the following formula: ${\textstyle weight = 1000 + (100 \times pieces) + inv}$ The pieces variable refers to the number of armor pieces that the player is wearing. The inv variable is determined by the formula, ${\textstyle 100 \times \frac{\text{items in stack}}{\text{max stack size}}}$, for each stack of items in the player's inventory.

##### Example Calculation for Weight

Given a player that is wearing NanoSuit Boots for armor, and has in his inventory 64 Cobblestone, 3 Diamonds, and 6 Snowballs: {\displaystyle \begin{align} weight & = 1000 + (100 \times 1) + \left(100 \times \frac{64}{64} + 100 \times \frac{3}{64} + 100 \times \frac{6}{16}\right) \\ & = 1000 + 100 + (100 \times 1 + 100 \times 0.047 + 100 \times 0.375) \\ & = 1000 + 100 + (100 + 4.7 + 37.5) \\ & = 1000 + 100 + 142.2 \\ & = 1242.2 \end{align} }

##### Distance Formula

The calculation for distance is as follows: $distance = \sqrt{x^2 + y^2 + z^2}$ where x, y, and z are the respective end coordinate subtracted by the starting coordinate.

##### Example Calculation for Distance

If the first Teleporter is placed at (25, 60, -40), and the second Teleporter is placed at (40, 35, -30), the total distance is: {\displaystyle \begin{align} distance & = \sqrt{(40 - 25)^2 + (35 - 60)^2 + (-30 - -40)^2} \\ & = \sqrt{15^2 + (-25)^2 + 10^2} \\ & = \sqrt{255 + 625 + 100} \\ & = \sqrt{950} \\ & = 30.82 \end{align} }

##### Example Finished Calculation

Assuming the figures in the examples above, the total EU cost for one teleportation is: {\displaystyle \begin{align} cost & = \bigl \lfloor 5 \times \lfloor 1242.2 \rfloor \times (\lfloor 30.82 \rfloor + 10)^{0.7}\bigr \rfloor \\ & = \bigl \lfloor 5 \times 1242 \times (30 + 10)^{0.7} \bigr \rfloor \\ & = \bigl \lfloor 5 \times 1242 \times (40)^{0.7} \bigr\rfloor \\ & = \bigl \lfloor 5,978.69 \bigr \rfloor \\ & = 5,978 \end{align} }