mirror of
https://github.com/Sollace/Unicopia.git
synced 2025-02-01 19:46:42 +01:00
Fixed teleporting taking more energy than it should
This commit is contained in:
parent
e3c5f6fc4b
commit
5a9686b108
1 changed files with 1 additions and 1 deletions
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue