Remove associatedWith in process and some more javadoc changes

This commit is contained in:
Brady 2019-01-17 18:20:27 -06:00
parent 69b1decbba
commit 979b8b2663
No known key found for this signature in database
GPG Key ID: 73A788379A197567
5 changed files with 23 additions and 16 deletions

View File

@ -22,10 +22,26 @@ import baritone.api.process.PathingCommand;
import java.util.Optional;
/**
* @author leijurv
*/
public interface IPathingControlManager {
/**
* Registers a process with this pathing control manager. See {@link IBaritoneProcess} for more details.
*
* @param process The process
* @see IBaritoneProcess
*/
void registerProcess(IBaritoneProcess process);
/**
* @return The most recent {@link IBaritoneProcess} that had control
*/
Optional<IBaritoneProcess> mostRecentInControl();
/**
* @return The most recent pathing command executed
*/
Optional<PathingCommand> mostRecentCommand();
}

View File

@ -17,7 +17,6 @@
package baritone.api.process;
import baritone.api.IBaritone;
import baritone.api.behavior.IPathingBehavior;
import baritone.api.event.events.PathEvent;
@ -25,8 +24,10 @@ import baritone.api.event.events.PathEvent;
* A process that can control the PathingBehavior.
* <p>
* Differences between a baritone process and a behavior:
* Only one baritone process can be active at a time
* PathingBehavior can only be controlled by a process
* <ul>
* <li>Only one baritone process can be active at a time</li>
* <li>PathingBehavior can only be controlled by a process</li>
* </ul>
* <p>
* That's it actually
*
@ -83,13 +84,6 @@ public interface IBaritoneProcess {
*/
double priority();
/**
* Returns which bot this process is associated with. (5000000iq forward thinking)
*
* @return The Bot associated with this process
*/
IBaritone associatedWith();
/**
* Returns a user-friendly name for this process. Suitable for a HUD.
*

View File

@ -34,11 +34,6 @@ public abstract class BaritoneProcessHelper implements IBaritoneProcess, Helper
baritone.getPathingControlManager().registerProcess(this);
}
@Override
public Baritone associatedWith() {
return baritone;
}
@Override
public boolean isTemporary() {
return false;

View File

@ -27,7 +27,7 @@ import net.minecraft.util.math.RayTraceResult;
import net.minecraft.world.World;
/**
* Implementation of {@link IPlayerContext} that provides information about the local player.
* Implementation of {@link IPlayerContext} that provides information about the primary player.
*
* @author Brady
* @since 11/12/2018

View File

@ -27,6 +27,8 @@ import net.minecraft.util.math.BlockPos;
import net.minecraft.world.GameType;
/**
* Implementation of {@link IPlayerController} that chains to the primary player controller's methods
*
* @author Brady
* @since 12/14/2018
*/