From b22e93d6d07a6567e0f6a181492e69b67d703fb5 Mon Sep 17 00:00:00 2001 From: Brady Date: Mon, 3 Dec 2018 18:47:40 -0600 Subject: [PATCH] Fix javadoc errors --- .../pathing/calc/AbstractNodeCostSearch.java | 7 +++++++ .../java/baritone/pathing/movement/Movement.java | 7 ++++--- .../pathing/movement/MovementHelper.java | 16 ++++++++++++++-- .../java/baritone/pathing/path/PathExecutor.java | 2 ++ src/main/java/baritone/utils/Helper.java | 4 ++-- 5 files changed, 29 insertions(+), 7 deletions(-) diff --git a/src/main/java/baritone/pathing/calc/AbstractNodeCostSearch.java b/src/main/java/baritone/pathing/calc/AbstractNodeCostSearch.java index 2a1681b7..490ab7a6 100644 --- a/src/main/java/baritone/pathing/calc/AbstractNodeCostSearch.java +++ b/src/main/java/baritone/pathing/calc/AbstractNodeCostSearch.java @@ -21,6 +21,7 @@ import baritone.Baritone; import baritone.api.pathing.calc.IPath; import baritone.api.pathing.calc.IPathFinder; import baritone.api.pathing.goals.Goal; +import baritone.api.utils.BetterBlockPos; import baritone.api.utils.PathCalculationResult; import baritone.pathing.movement.CalculationContext; import baritone.utils.Helper; @@ -135,9 +136,15 @@ public abstract class AbstractNodeCostSearch implements IPathFinder { * for the node mapped to the specified pos. If no node is found, * a new node is created. * + * @param x The x position of the node + * @param y The y position of the node + * @param z The z position of the node + * @param hashCode The hash code of the node, provided by {@link BetterBlockPos#longHash(int, int, int)} + * * @return The associated node * @see Issue #107 */ + protected PathNode getNodeAtPosition(int x, int y, int z, long hashCode) { PathNode node = map.get(hashCode); if (node == null) { diff --git a/src/main/java/baritone/pathing/movement/Movement.java b/src/main/java/baritone/pathing/movement/Movement.java index 4105b5e7..7ba9f6ea 100644 --- a/src/main/java/baritone/pathing/movement/Movement.java +++ b/src/main/java/baritone/pathing/movement/Movement.java @@ -205,10 +205,11 @@ public abstract class Movement implements IMovement, MovementHelper { } /** - * Calculate latest movement state. - * Gets called once a tick. + * Calculate latest movement state. Gets called once a tick. * - * @return + * @param state The current state + * + * @return The new state */ public MovementState updateState(MovementState state) { if (!prepared(state)) { diff --git a/src/main/java/baritone/pathing/movement/MovementHelper.java b/src/main/java/baritone/pathing/movement/MovementHelper.java index 9d31a379..d56f1931 100644 --- a/src/main/java/baritone/pathing/movement/MovementHelper.java +++ b/src/main/java/baritone/pathing/movement/MovementHelper.java @@ -126,7 +126,11 @@ public interface MovementHelper extends ActionCosts, Helper { * canWalkThrough but also won't impede movement at all. so not including doors or fence gates (we'd have to right click), * not including water, and not including ladders or vines or cobwebs (they slow us down) * - * @return + * @param context Calculation context to provide block state lookup + * @param x The block's x position + * @param y The block's y position + * @param z The block's z position + * @return Whether or not the block at the specified position */ static boolean fullyPassable(CalculationContext context, int x, int y, int z) { return fullyPassable(context.get(x, y, z)); @@ -243,7 +247,13 @@ public interface MovementHelper extends ActionCosts, Helper { * through? Includes water because we know that we automatically jump on * water * - * @return + * @param bsi Block state provider + * @param x The block's x position + * @param y The block's y position + * @param z The block's z position + * @param state The state of the block at the specified location + * + * @return Whether or not the specified block can be walked on */ static boolean canWalkOn(BlockStateInterface bsi, int x, int y, int z, IBlockState state) { Block block = state.getBlock(); @@ -367,6 +377,7 @@ public interface MovementHelper extends ActionCosts, Helper { /** * AutoTool for a specific block * + * @param ctx The player context * @param b the blockstate to mine */ static void switchToBestToolFor(IPlayerContext ctx, IBlockState b) { @@ -376,6 +387,7 @@ public interface MovementHelper extends ActionCosts, Helper { /** * AutoTool for a specific block with precomputed ToolSet data * + * @param ctx The player context * @param b the blockstate to mine * @param ts previously calculated ToolSet */ diff --git a/src/main/java/baritone/pathing/path/PathExecutor.java b/src/main/java/baritone/pathing/path/PathExecutor.java index 15948d45..fa4c0e5f 100644 --- a/src/main/java/baritone/pathing/path/PathExecutor.java +++ b/src/main/java/baritone/pathing/path/PathExecutor.java @@ -347,6 +347,8 @@ public class PathExecutor implements IPathExecutor, Helper { /** * Regardless of current path position, snap to the current player feet if possible + * + * @return Whether or not it was possible to snap to the current player feet */ public boolean snipsnapifpossible() { if (!ctx.player().onGround) { diff --git a/src/main/java/baritone/utils/Helper.java b/src/main/java/baritone/utils/Helper.java index 9fc5aee3..9ee6ed59 100755 --- a/src/main/java/baritone/utils/Helper.java +++ b/src/main/java/baritone/utils/Helper.java @@ -47,7 +47,7 @@ public interface Helper { /** * Send a message to chat only if chatDebug is on * - * @param message + * @param message The message to display in chat */ default void logDebug(String message) { if (!Baritone.settings().chatDebug.get()) { @@ -61,7 +61,7 @@ public interface Helper { /** * Send a message to chat regardless of chatDebug (should only be used for critically important messages, or as a direct response to a chat command) * - * @param message + * @param message The message to display in chat */ default void logDirect(String message) { ITextComponent component = MESSAGE_PREFIX.createCopy();