package net.glowstone.entity.ai;

import net.glowstone.entity.GlowLivingEntity;
import org.bukkit.Location;
import org.bukkit.util.Vector;

public class TransportHelper {

    public static void moveTowards(GlowLivingEntity entity, Location direction) {
        moveTowards(entity, direction, 0.3);
    }

    public static void moveTowards(GlowLivingEntity entity, Location direction, double speed) {
        Location location = entity.getLocation();
        double deltaX = (direction.getX() - location.getX());
        double deltaZ = (direction.getZ() - location.getZ());
        entity.setSpeed(speed);
        entity.setMovement(new Vector(deltaX, 0, deltaZ));
    }
}

@@ -299,16 +299,251 @@
 %0A    %7D%0A%0A
+    /**%0A     * Starts an entity moving horizontally toward a location (may overshoot).%0A     *%0A     * @param entity the entity to move%0A     * @param direction the destination to move toward%0A     * @param speed the speed to move%0A     */%0A
     publ

Fix CheckStyle issues in entity/ai/TransportHelper.java (#691)