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; import java.util.Optional;
/**
* @author leijurv
*/
public interface IPathingControlManager { 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); void registerProcess(IBaritoneProcess process);
/**
* @return The most recent {@link IBaritoneProcess} that had control
*/
Optional<IBaritoneProcess> mostRecentInControl(); Optional<IBaritoneProcess> mostRecentInControl();
/**
* @return The most recent pathing command executed
*/
Optional<PathingCommand> mostRecentCommand(); Optional<PathingCommand> mostRecentCommand();
} }

View File

@ -17,7 +17,6 @@
package baritone.api.process; package baritone.api.process;
import baritone.api.IBaritone;
import baritone.api.behavior.IPathingBehavior; import baritone.api.behavior.IPathingBehavior;
import baritone.api.event.events.PathEvent; import baritone.api.event.events.PathEvent;
@ -25,8 +24,10 @@ import baritone.api.event.events.PathEvent;
* A process that can control the PathingBehavior. * A process that can control the PathingBehavior.
* <p> * <p>
* Differences between a baritone process and a behavior: * Differences between a baritone process and a behavior:
* Only one baritone process can be active at a time * <ul>
* PathingBehavior can only be controlled by a process * <li>Only one baritone process can be active at a time</li>
* <li>PathingBehavior can only be controlled by a process</li>
* </ul>
* <p> * <p>
* That's it actually * That's it actually
* *
@ -83,13 +84,6 @@ public interface IBaritoneProcess {
*/ */
double priority(); 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. * 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); baritone.getPathingControlManager().registerProcess(this);
} }
@Override
public Baritone associatedWith() {
return baritone;
}
@Override @Override
public boolean isTemporary() { public boolean isTemporary() {
return false; return false;

View File

@ -27,7 +27,7 @@ import net.minecraft.util.math.RayTraceResult;
import net.minecraft.world.World; 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 * @author Brady
* @since 11/12/2018 * @since 11/12/2018

View File

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