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 11package com .falsepattern .lib .compat ;
22
33import com .falsepattern .lib .StableAPI ;
4+ import lombok .*;
45import net .minecraft .util .EnumFacing ;
56
7+ import java .util .Arrays ;
8+
69@ StableAPI (since = "0.6.0" )
710public 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 ;
2812
29- public Rotation add (Rotation rotation ) {
13+ public Rotation add (@ NonNull Rotation rotation ) {
3014 switch (rotation ) {
3115 case CLOCKWISE_180 :
3216 switch (this ) {
@@ -66,7 +50,7 @@ public Rotation add(Rotation rotation) {
6650 }
6751 }
6852
69- public EnumFacing rotate (EnumFacing facing ) {
53+ public EnumFacing rotate (@ NonNull EnumFacing facing ) {
7054 if (facing == EnumFacing .UP || facing == EnumFacing .DOWN ) {
7155 return facing ;
7256 }
You can’t perform that action at this time.
0 commit comments