Skip to content

Commit 28b4cb1

Browse files
committed
Fix tests
1 parent 0f83311 commit 28b4cb1

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

src/test/java/com/robotgryphon/compactcrafting/RotationsTest.java

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package com.robotgryphon.compactcrafting;
22

33
import com.robotgryphon.compactcrafting.util.BlockSpaceUtil;
4-
import net.minecraft.util.Direction;
54
import net.minecraft.util.Rotation;
65
import net.minecraft.util.math.BlockPos;
76
import org.junit.jupiter.api.Assertions;
@@ -10,7 +9,6 @@
109
import java.util.Arrays;
1110
import java.util.List;
1211
import java.util.Map;
13-
import java.util.stream.Stream;
1412

1513
public class RotationsTest {
1614

@@ -24,7 +22,7 @@ void SingleBlockRotatesCorrectly() {
2422

2523
BlockPos rotatedPos = newLocations.get(singleBlock[0]);
2624

27-
Assertions.assertEquals(new BlockPos(0, 0, 1), rotatedPos);
25+
Assertions.assertEquals(new BlockPos(1, 0, 0), rotatedPos);
2826
}
2927

3028
@Test
@@ -120,13 +118,6 @@ void ComplexShapeRotates180Correctly () {
120118
new BlockPos(0, 0, 5)
121119
};
122120

123-
BlockPos[] complexAfterTranslate = Stream.of(complexPreTranslate)
124-
.map(p -> p.offset(Direction.EAST, 100).offset(Direction.SOUTH, 123))
125-
.map(BlockPos::toImmutable)
126-
.toArray(BlockPos[]::new);
127-
128-
BlockPos[] complexPattern = complexAfterTranslate;
129-
130121
/*
131122
Magnifying glass shape. (West/90-degree rotation)
132123
@@ -154,7 +145,7 @@ void ComplexShapeRotates180Correctly () {
154145
new BlockPos(5, 0, 0)
155146
};
156147

157-
Map<BlockPos, BlockPos> rotatedPattern = BlockSpaceUtil.rotatePositionsInPlace(complexPattern, Rotation.CLOCKWISE_180);
148+
Map<BlockPos, BlockPos> rotatedPattern = BlockSpaceUtil.rotatePositionsInPlace(complexPreTranslate, Rotation.CLOCKWISE_180);
158149

159150
List<BlockPos> expected = Arrays.asList(relativeWestPositions);
160151
List<BlockPos> actual = Arrays.asList(rotatedPattern.values().toArray(new BlockPos[0]));

0 commit comments

Comments
 (0)