Skip to content

Commit e8da9b1

Browse files
committed
Strip away unused private stuff from the Rotation Enum
1 parent 8a6a312 commit e8da9b1

File tree

1 file changed

+6
-22
lines changed

1 file changed

+6
-22
lines changed

src/main/java/com/falsepattern/lib/compat/Rotation.java

Lines changed: 6 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,16 @@
11
package com.falsepattern.lib.compat;
22

33
import com.falsepattern.lib.StableAPI;
4+
import lombok.*;
45
import net.minecraft.util.EnumFacing;
56

7+
import java.util.Arrays;
8+
69
@StableAPI(since = "0.6.0")
710
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;
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
}

0 commit comments

Comments
 (0)