-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathLogicStates.java
52 lines (46 loc) · 1.23 KB
/
LogicStates.java
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
package pokecube.api.entity.pokemob.ai;
public enum LogicStates
{
/** Is the pokemob currently sitting */
SITTING(1 << 0),
/** is the pokemob in water */
INWATER(1 << 1),
/** Prevented from flying or floating. */
GROUNDED(1 << 2),
// /** is the pokemob currently pathing somewhere */
// PATHING(1 << 3, false),
/** is the pokemob jumping */
JUMPING(1 << 4),
/** is the pokemob in lava */
INLAVA(1 << 5),
/** is the pokemob prevented from moving (ie from ingrain), etc) */
CANNOTMOVE(1 << 6),
/** A sleeping pokemon will try to sit at its home location */
SLEEPING(1 << 7),
/** This pokemob wants to sleep, but not here */
TIRED(1 << 8);
final int mask;
final boolean persist;
private LogicStates(final int mask)
{
this.mask = mask;
this.persist = true;
}
private LogicStates(final int mask, final boolean persist)
{
this.mask = mask;
this.persist = persist;
}
public int getMask()
{
return this.mask;
}
/**
* if this is false, then the value will be cleared whenever the pokemob is
* loaded from nbt.
*/
public boolean persists()
{
return this.persist;
}
}