-
Notifications
You must be signed in to change notification settings - Fork 2k
Expand file tree
/
Copy pathILookBehavior.java
More file actions
86 lines (79 loc) · 3.44 KB
/
Copy pathILookBehavior.java
File metadata and controls
86 lines (79 loc) · 3.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
/*
* This file is part of Baritone.
*
* Baritone is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Baritone is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Baritone. If not, see <https://www.gnu.org/licenses/>.
*/
package baritone.api.behavior;
import baritone.api.Settings;
import baritone.api.behavior.look.IAimProcessor;
import baritone.api.utils.Rotation;
/**
* @author Brady
* @since 9/23/2018
*/
public interface ILookBehavior extends IBehavior {
/**
* Updates the current {@link ILookBehavior} target to target the specified rotations on the next tick. If any sort
* of block interaction is required, {@code blockInteract} should be {@code true}. It is not guaranteed that the
* rotations set by the caller will be the exact rotations expressed by the client (This is due to settings like
* {@link Settings#randomLooking}). If the rotations produced by this behavior are required, then the
* {@link #getAimProcessor() aim processor} should be used.
*
* @param rotation The target rotations
* @param blockInteract Whether the target rotations are needed for a block interaction
*/
void updateTarget(Rotation rotation, boolean blockInteract);
/**
* Updates the current {@link ILookBehavior} target and optionally restarts
* any active interpolation.
*
* @param rotation The target rotations
* @param blockInteract Whether the target rotations are needed for a block interaction
* @param restartInterpolation Whether active interpolation should restart
* from its current sample
* @see #updateTarget(Rotation, boolean)
*/
default void updateTarget(
Rotation rotation,
boolean blockInteract,
boolean restartInterpolation) {
updateTarget(rotation, blockInteract);
}
/**
* Updates the current {@link ILookBehavior} target and optionally uses it
* without aim processing.
*
* @param rotation The target rotations
* @param blockInteract Whether the target rotations are needed for a block interaction
* @param restartInterpolation Whether active interpolation should restart
* from its current sample
* @param exactRotation Whether the target rotation should skip aim processing
* @see #updateTarget(Rotation, boolean, boolean)
*/
default void updateTarget(
Rotation rotation,
boolean blockInteract,
boolean restartInterpolation,
boolean exactRotation) {
updateTarget(rotation, blockInteract, restartInterpolation);
}
/**
* The aim processor instance for this {@link ILookBehavior}, which is responsible for applying additional,
* deterministic transformations to the target rotation set by {@link #updateTarget}.
*
* @return The aim processor
* @see IAimProcessor#fork
*/
IAimProcessor getAimProcessor();
}