-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
13379ac
commit 0721340
Showing
25 changed files
with
291 additions
and
407 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
...ines/test/util/CompactGameTestHelper.java → .../test/gametest/CompactGameTestHelper.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 4 additions & 5 deletions
9
...ds/machines/test/CompactMachinesTest.java → ...es/test/gametest/CompactMachinesTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
neoforge-main/src/test/java/dev/compactmods/machines/test/gametest/TestRoomApi.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
package dev.compactmods.machines.test.gametest; | ||
|
||
import com.google.common.base.Predicates; | ||
import dev.compactmods.machines.api.room.IRoomApi; | ||
import dev.compactmods.machines.api.room.registration.IRoomRegistrar; | ||
import dev.compactmods.machines.api.room.spatial.IRoomChunkManager; | ||
import dev.compactmods.machines.api.room.spatial.IRoomChunks; | ||
import dev.compactmods.machines.api.room.spawn.IRoomSpawnManager; | ||
import dev.compactmods.machines.room.RoomRegistrar; | ||
import dev.compactmods.machines.room.spatial.GraphChunkManager; | ||
import dev.compactmods.machines.room.spawn.RoomSpawnManagers; | ||
|
||
import java.util.function.Predicate; | ||
|
||
public class TestRoomApi { | ||
|
||
public static IRoomApi forTest() { | ||
final var registrar = new RoomRegistrar(); | ||
final var spawnManagers = new RoomSpawnManagers(registrar); | ||
final var chunkManager = new GraphChunkManager(); | ||
|
||
return new IRoomApi() { | ||
@Override | ||
public Predicate<String> roomCodeValidator() { | ||
return Predicates.alwaysTrue(); | ||
} | ||
|
||
@Override | ||
public IRoomRegistrar registrar() { | ||
return registrar; | ||
} | ||
|
||
@Override | ||
public IRoomSpawnManager spawnManager(String roomCode) { | ||
return spawnManagers.get(roomCode); | ||
} | ||
|
||
@Override | ||
public IRoomChunkManager chunkManager() { | ||
return chunkManager; | ||
} | ||
|
||
@Override | ||
public IRoomChunks chunks(String roomCode) { | ||
return chunkManager.get(roomCode); | ||
} | ||
}; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.