11package com .robotgryphon .compactcrafting ;
22
33import com .robotgryphon .compactcrafting .util .BlockSpaceUtil ;
4- import net .minecraft .util .Direction ;
54import net .minecraft .util .Rotation ;
65import net .minecraft .util .math .BlockPos ;
76import org .junit .jupiter .api .Assertions ;
109import java .util .Arrays ;
1110import java .util .List ;
1211import java .util .Map ;
13- import java .util .stream .Stream ;
1412
1513public 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