Teleporter (GregTech 4)

The Teleporter is a machine that can teleport mobs animals and players. To link two Teleporters you have to right-click with a Frequency Transmitter on the first and then on the second one.

Energy Cost
Animal weight: 100 Mob weight: 500 Player weight: 1000 + (100 per worn armor piece) + (100 per full item stack) Energy cost: Floor(5 * Floor(Weight) * (Floor(Distance) + 10)^0.7)

The worst case player weight is therefore 5000. Going the minimum distance with a weight of 5000 would cost ~51960 EU.

Energy Cost Example
Teleporting a player with Chest armor, Boots, 64 Cobblestone, 20 Dirt, and 10 Eggs for 15 Distance.

Base cost: 1000 Armor cost: Chest(100) + Boots(100) Inventory cost: Cobblestone(100 * 64/64) + Dirt(100 * 20/64) + Eggs(100 * 10/16) = 193.75 Player weight: 1000 + 200 + 193.75 = 1393.75 Total: Floor(5 * Floor(1393.75) * (15 + 10)^0.7) = 66294 EU

Distance Calculation
The distance used is the Euclidean distance (straight-line distance, or distance "as the crow flies"), rather than the Manhattan distance used for many other purposes in Minecraft. The dx, dy, and dz are distances in the x, y, and z directions, respectively, determined by subtracting the x, y and z coordinates of the first Teleporter from the x, y and z coordinates of the second Teleporter.

Distance = sqrt( (dx)2 + (dy)2 + (dz)2 )

Distance Example
If you place a teleporter at (10,50,-20) and another at (30,15,-60)

dx = 30-10 = 20 dy = 15-50 = -35 dz = (-60)-(-20) = -40 Distance = sqrt ( 20^2 + (-35)^2 + (-40)^2 ) = 56.78908 meters