Skip to content

Commit

Permalink
Fix some entity speed stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
Morphan1 committed Apr 5, 2015
1 parent ec97454 commit cfecb83
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -47,7 +47,7 @@ public static double getSpeed(Entity entity) {
if (!(nmsEntityEntity instanceof EntityInsentient))
return 0.0;
EntityInsentient nmsEntity = (EntityInsentient) nmsEntityEntity;
return nmsEntity.getAttributeInstance(GenericAttributes.d).getValue();
return nmsEntity.getAttributeInstance(GenericAttributes.d).b();
}

public static void setSpeed(Entity entity, double speed) {
Expand Down Expand Up @@ -138,7 +138,7 @@ public static void walkTo(final Entity entity, Location location, double speed,
toggleAI(entity, true);
followerNavigation.a(path, 1D);
followerNavigation.a(2D);
final double oldSpeed = nmsEntity.getAttributeInstance(GenericAttributes.d).getValue();
final double oldSpeed = nmsEntity.getAttributeInstance(GenericAttributes.d).b();
nmsEntity.getAttributeInstance(GenericAttributes.d).setValue(speed);
new BukkitRunnable() {
@Override
Expand Down

0 comments on commit cfecb83

Please sign in to comment.