Skip to content

Commit 37e360e

Browse files
authored
Fix an incorrect spin mapping method (#8323)
`SpinMapping::getUpFromSpin` up until now was a duplicate of `getSpinFromUp`, for whatever reason.
1 parent 6d1dbc6 commit 37e360e

1 file changed

Lines changed: 2 additions & 8 deletions

File tree

src/main/java/appeng/block/orientation/SpinMapping.java

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,7 @@ public static int getSpinFromUp(Direction facing, Direction up) {
3737
return 0; // Degenerated up direction just falls back to no spin
3838
}
3939

40-
public static int getUpFromSpin(Direction facing, Direction up) {
41-
var spinDirs = SPIN_DIRECTIONS[facing.ordinal()];
42-
for (int i = 0; i < spinDirs.length; i++) {
43-
if (spinDirs[i] == up) {
44-
return i;
45-
}
46-
}
47-
return 0; // Degenerated up direction just falls back to no spin
40+
public static Direction getUpFromSpin(Direction facing, int spin) {
41+
return SPIN_DIRECTIONS[facing.ordinal()][spin];
4842
}
4943
}

0 commit comments

Comments
 (0)