Skip to content

Commit

Permalink
Fix testcase
Browse files Browse the repository at this point in the history
  • Loading branch information
johnathanchann committed Jun 11, 2024
1 parent fe04601 commit 328e06f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
10 changes: 5 additions & 5 deletions build/Testing/Temporary/LastTest.log
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Start testing: Jun 12 00:07 AEST
Start testing: Jun 12 00:39 AEST
----------------------------------------------------------
Unable to find executable: /mnt/c/Users/yeefh/documents/mcpp/build/test/local_tests
1/2 Testing: local
Expand All @@ -12,15 +12,15 @@ Output:
Test time = 0.00 sec
----------------------------------------------------------
Test Passed.
"local" end time: Jun 12 00:07 AEST
"local" end time: Jun 12 00:39 AEST
"local" time elapsed: 00:00:00
----------------------------------------------------------

2/2 Testing: full
2/2 Test: full
Command: "/mnt/c/Users/yeefh/documents/mcpp/build/test/test_suite"
Directory: /mnt/c/Users/yeefh/documents/mcpp/build
"full" start time: Jun 12 00:07 AEST
"full" start time: Jun 12 00:39 AEST
Output:
----------------------------------------------------------
[doctest] doctest version is "2.4.9"
Expand All @@ -33,8 +33,8 @@ Output:
Test time = 0.92 sec
----------------------------------------------------------
Test Passed.
"full" end time: Jun 12 00:07 AEST
"full" end time: Jun 12 00:39 AEST
"full" time elapsed: 00:00:00
----------------------------------------------------------

End testing: Jun 12 00:07 AEST
End testing: Jun 12 00:39 AEST
Binary file modified build/test/test_suite
Binary file not shown.
4 changes: 3 additions & 1 deletion src/mcpp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ Coordinate MinecraftConnection::getPlayerPosition() {
}

void MinecraftConnection::setPlayerTilePosition(const Coordinate& tile) {
conn->sendCommand("player.setTile", tile.x, (tile.y+1), tile.z);
Coordinate newPlayerTile = tile;
newPlayerTile.y++;
conn->sendCommand("player.setTile", newPlayerTile.x, newPlayerTile.y, newPlayerTile.z);
}

Coordinate MinecraftConnection::getPlayerTilePosition() {
Expand Down

0 comments on commit 328e06f

Please sign in to comment.