File tree Expand file tree Collapse file tree 1 file changed +6
-22
lines changed
src/main/java/com/falsepattern/lib/compat Expand file tree Collapse file tree 1 file changed +6
-22
lines changed Original file line number Diff line number Diff line change 1
1
package com .falsepattern .lib .compat ;
2
2
3
3
import com .falsepattern .lib .StableAPI ;
4
+ import lombok .*;
4
5
import net .minecraft .util .EnumFacing ;
5
6
7
+ import java .util .Arrays ;
8
+
6
9
@ StableAPI (since = "0.6.0" )
7
10
public enum Rotation {
8
- NONE ("rotate_0" ),
9
- CLOCKWISE_90 ("rotate_90" ),
10
- CLOCKWISE_180 ("rotate_180" ),
11
- COUNTERCLOCKWISE_90 ("rotate_270" );
12
-
13
- private static final String [] rotationNames = new String [values ().length ];
14
-
15
- static {
16
- int i = 0 ;
17
-
18
- for (Rotation rotation : values ()) {
19
- rotationNames [i ++] = rotation .name ;
20
- }
21
- }
22
-
23
- private final String name ;
24
-
25
- Rotation (String nameIn ) {
26
- this .name = nameIn ;
27
- }
11
+ NONE , CLOCKWISE_90 , CLOCKWISE_180 , COUNTERCLOCKWISE_90 ;
28
12
29
- public Rotation add (Rotation rotation ) {
13
+ public Rotation add (@ NonNull Rotation rotation ) {
30
14
switch (rotation ) {
31
15
case CLOCKWISE_180 :
32
16
switch (this ) {
@@ -66,7 +50,7 @@ public Rotation add(Rotation rotation) {
66
50
}
67
51
}
68
52
69
- public EnumFacing rotate (EnumFacing facing ) {
53
+ public EnumFacing rotate (@ NonNull EnumFacing facing ) {
70
54
if (facing == EnumFacing .UP || facing == EnumFacing .DOWN ) {
71
55
return facing ;
72
56
}
You can’t perform that action at this time.
0 commit comments