From 37be3908c71fb9b14559abb155a3d33970f989b0 Mon Sep 17 00:00:00 2001 From: Howard Stark Date: Wed, 1 Aug 2018 23:27:41 -0400 Subject: [PATCH] Refactor pathfinding => pathing --- .../java/baritone/bot/pathfinding/actions/ActionTypes.java | 5 ----- .../java/baritone/bot/{pathfinding => pathing}/State.java | 2 +- .../bot/{pathfinding => pathing}/actions/ActionCosts.java | 2 +- src/main/java/baritone/bot/pathing/actions/ActionTypes.java | 5 +++++ .../baritone/bot/{pathfinding => pathing}/goals/Goal.java | 2 +- .../bot/{pathfinding => pathing}/goals/GoalBlock.java | 0 .../bot/{pathfinding => pathing}/goals/GoalComposite.java | 0 .../bot/{pathfinding => pathing}/goals/GoalGetToBlock.java | 0 .../bot/{pathfinding => pathing}/goals/GoalRunAway.java | 0 .../bot/{pathfinding => pathing}/goals/GoalTwoBlocks.java | 0 .../baritone/bot/{pathfinding => pathing}/goals/GoalXZ.java | 0 .../bot/{pathfinding => pathing}/goals/GoalYLevel.java | 0 src/main/resources/baritone/Baritone.java | 4 ++-- src/main/resources/baritone/util/ChatCommand.java | 2 +- 14 files changed, 11 insertions(+), 11 deletions(-) delete mode 100644 src/main/java/baritone/bot/pathfinding/actions/ActionTypes.java rename src/main/java/baritone/bot/{pathfinding => pathing}/State.java (60%) rename src/main/java/baritone/bot/{pathfinding => pathing}/actions/ActionCosts.java (97%) create mode 100644 src/main/java/baritone/bot/pathing/actions/ActionTypes.java rename src/main/java/baritone/bot/{pathfinding => pathing}/goals/Goal.java (87%) rename src/main/java/baritone/bot/{pathfinding => pathing}/goals/GoalBlock.java (100%) rename src/main/java/baritone/bot/{pathfinding => pathing}/goals/GoalComposite.java (100%) rename src/main/java/baritone/bot/{pathfinding => pathing}/goals/GoalGetToBlock.java (100%) rename src/main/java/baritone/bot/{pathfinding => pathing}/goals/GoalRunAway.java (100%) rename src/main/java/baritone/bot/{pathfinding => pathing}/goals/GoalTwoBlocks.java (100%) rename src/main/java/baritone/bot/{pathfinding => pathing}/goals/GoalXZ.java (100%) rename src/main/java/baritone/bot/{pathfinding => pathing}/goals/GoalYLevel.java (100%) diff --git a/src/main/java/baritone/bot/pathfinding/actions/ActionTypes.java b/src/main/java/baritone/bot/pathfinding/actions/ActionTypes.java deleted file mode 100644 index a69404c8..00000000 --- a/src/main/java/baritone/bot/pathfinding/actions/ActionTypes.java +++ /dev/null @@ -1,5 +0,0 @@ -package baritone.bot.pathfinding.actions; - -public enum ActionTypes { - -} diff --git a/src/main/java/baritone/bot/pathfinding/State.java b/src/main/java/baritone/bot/pathing/State.java similarity index 60% rename from src/main/java/baritone/bot/pathfinding/State.java rename to src/main/java/baritone/bot/pathing/State.java index 29bc354a..da26ccb5 100644 --- a/src/main/java/baritone/bot/pathfinding/State.java +++ b/src/main/java/baritone/bot/pathing/State.java @@ -1,4 +1,4 @@ -package baritone.bot.pathfinding; +package baritone.bot.pathing; public class State { diff --git a/src/main/java/baritone/bot/pathfinding/actions/ActionCosts.java b/src/main/java/baritone/bot/pathing/actions/ActionCosts.java similarity index 97% rename from src/main/java/baritone/bot/pathfinding/actions/ActionCosts.java rename to src/main/java/baritone/bot/pathing/actions/ActionCosts.java index dd60b11b..dde2bc39 100644 --- a/src/main/java/baritone/bot/pathfinding/actions/ActionCosts.java +++ b/src/main/java/baritone/bot/pathing/actions/ActionCosts.java @@ -1,4 +1,4 @@ -package baritone.bot.pathfinding.actions; +package baritone.bot.pathing.actions; public final class ActionCosts { private ActionCosts() {} diff --git a/src/main/java/baritone/bot/pathing/actions/ActionTypes.java b/src/main/java/baritone/bot/pathing/actions/ActionTypes.java new file mode 100644 index 00000000..fa0c5439 --- /dev/null +++ b/src/main/java/baritone/bot/pathing/actions/ActionTypes.java @@ -0,0 +1,5 @@ +package baritone.bot.pathing.actions; + +public enum ActionTypes { + +} diff --git a/src/main/java/baritone/bot/pathfinding/goals/Goal.java b/src/main/java/baritone/bot/pathing/goals/Goal.java similarity index 87% rename from src/main/java/baritone/bot/pathfinding/goals/Goal.java rename to src/main/java/baritone/bot/pathing/goals/Goal.java index 327f01fa..64671703 100644 --- a/src/main/java/baritone/bot/pathfinding/goals/Goal.java +++ b/src/main/java/baritone/bot/pathing/goals/Goal.java @@ -8,7 +8,7 @@ package baritone.bot.goals; import net.minecraft.util.math.BlockPos; /** - * An abstract Goal for pathfinding, can be anything from a specific block to just a Y coordinate. + * An abstract Goal for pathing, can be anything from a specific block to just a Y coordinate. * @author leijurv */ public interface Goal { diff --git a/src/main/java/baritone/bot/pathfinding/goals/GoalBlock.java b/src/main/java/baritone/bot/pathing/goals/GoalBlock.java similarity index 100% rename from src/main/java/baritone/bot/pathfinding/goals/GoalBlock.java rename to src/main/java/baritone/bot/pathing/goals/GoalBlock.java diff --git a/src/main/java/baritone/bot/pathfinding/goals/GoalComposite.java b/src/main/java/baritone/bot/pathing/goals/GoalComposite.java similarity index 100% rename from src/main/java/baritone/bot/pathfinding/goals/GoalComposite.java rename to src/main/java/baritone/bot/pathing/goals/GoalComposite.java diff --git a/src/main/java/baritone/bot/pathfinding/goals/GoalGetToBlock.java b/src/main/java/baritone/bot/pathing/goals/GoalGetToBlock.java similarity index 100% rename from src/main/java/baritone/bot/pathfinding/goals/GoalGetToBlock.java rename to src/main/java/baritone/bot/pathing/goals/GoalGetToBlock.java diff --git a/src/main/java/baritone/bot/pathfinding/goals/GoalRunAway.java b/src/main/java/baritone/bot/pathing/goals/GoalRunAway.java similarity index 100% rename from src/main/java/baritone/bot/pathfinding/goals/GoalRunAway.java rename to src/main/java/baritone/bot/pathing/goals/GoalRunAway.java diff --git a/src/main/java/baritone/bot/pathfinding/goals/GoalTwoBlocks.java b/src/main/java/baritone/bot/pathing/goals/GoalTwoBlocks.java similarity index 100% rename from src/main/java/baritone/bot/pathfinding/goals/GoalTwoBlocks.java rename to src/main/java/baritone/bot/pathing/goals/GoalTwoBlocks.java diff --git a/src/main/java/baritone/bot/pathfinding/goals/GoalXZ.java b/src/main/java/baritone/bot/pathing/goals/GoalXZ.java similarity index 100% rename from src/main/java/baritone/bot/pathfinding/goals/GoalXZ.java rename to src/main/java/baritone/bot/pathing/goals/GoalXZ.java diff --git a/src/main/java/baritone/bot/pathfinding/goals/GoalYLevel.java b/src/main/java/baritone/bot/pathing/goals/GoalYLevel.java similarity index 100% rename from src/main/java/baritone/bot/pathfinding/goals/GoalYLevel.java rename to src/main/java/baritone/bot/pathing/goals/GoalYLevel.java diff --git a/src/main/resources/baritone/Baritone.java b/src/main/resources/baritone/Baritone.java index 1ce8e2ee..138e8d55 100644 --- a/src/main/resources/baritone/Baritone.java +++ b/src/main/resources/baritone/Baritone.java @@ -233,7 +233,7 @@ public class Baritone { if (isThereAnythingInProgress && Action.isWater(theWorld.getBlockState(playerFeet).getBlock())) { if (Action.isWater(theWorld.getBlockState(playerFeet.down()).getBlock()) || !Action.canWalkOn(playerFeet.down()) || Action.isWater(theWorld.getBlockState(playerFeet.up()).getBlock())) { //if water is deeper than one block, or we can't walk on what's below the water, or our head is in water, jump - Out.log("Jumping because in water and pathfinding"); + Out.log("Jumping because in water and pathing"); MovementManager.jumping = true; } } @@ -346,7 +346,7 @@ public class Baritone { } /** - * Actually do the pathfinding + * Actually do the pathing * * @param start * @return diff --git a/src/main/resources/baritone/util/ChatCommand.java b/src/main/resources/baritone/util/ChatCommand.java index a8f9f3db..6b918975 100644 --- a/src/main/resources/baritone/util/ChatCommand.java +++ b/src/main/resources/baritone/util/ChatCommand.java @@ -214,7 +214,7 @@ public class ChatCommand { Baritone.cancelPath(); Baritone.plsCancel = true; Manager.cancel(LookManager.class); - return Baritone.isThereAnythingInProgress ? "Cancelled it, but btw I'm pathfinding right now" : "Cancelled it"; + return Baritone.isThereAnythingInProgress ? "Cancelled it, but btw I'm pathing right now" : "Cancelled it"; } public static String st(String message) {