Remove associatedWith in process and some more javadoc changes
This commit is contained in:
parent
69b1decbba
commit
979b8b2663
@ -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();
|
||||
}
|
||||
|
@ -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.
|
||||
*
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user