Fixed teleporting taking more energy than it should

This commit is contained in:
Sollace 2020-06-01 17:00:49 +02:00
parent e3c5f6fc4b
commit 5a9686b108

View file

@ -106,7 +106,7 @@ public class UnicornTeleportAbility implements Ability<Pos> {
iplayer.getWorld().playSound(null, iplayer.getOrigin(), SoundEvents.ENTITY_ITEM_PICKUP, SoundCategory.PLAYERS, 1, 1);
PlayerEntity player = iplayer.getOwner();
double distance = player.squaredDistanceTo(data.x, data.y, data.z) / 10;
double distance = Math.sqrt(player.squaredDistanceTo(data.x, data.y, data.z)) / 10;
if (player.hasVehicle()) {
Entity mount = player.getVehicle();