(String name)
| 32 | private LabeledCoordinates worldSpawnPosition; |
| 33 | |
| 34 | public World(String name) throws IOException { |
| 35 | this.name = name; |
| 36 | File file = new File(Periphery.CONFIG.getWorldPath(this), WORLD_LEVEL_DAT_NAME); |
| 37 | Position player = new Position(); |
| 38 | Position worldSpawn = new Position(); |
| 39 | DataInputStream stream = new DataInputStream(new GZIPInputStream(new FileInputStream(file))); |
| 40 | PlayerInLevelReader reader = new PlayerInLevelReader(stream); |
| 41 | reader.read(); |
| 42 | player = reader.getPlayerPosition(); |
| 43 | worldSpawn = reader.getWorldSpawn(); |
| 44 | this.playerPosition = new LabeledCoordinates(PLAYER_POSITION, player, player); |
| 45 | this.worldSpawnPosition = new LabeledCoordinates("World spawn", worldSpawn, worldSpawn); |
| 46 | this.playerPosition.enlarge(new Position(-20, -30, -20), new Position(20, 30, 20)); |
| 47 | this.worldSpawnPosition.enlarge(new Position(-20, -30, -20), new Position(20, 30, 20)); |
| 48 | } |
| 49 | |
| 50 | @Override |
| 51 | public String toString() { |
nothing calls this directly
no test coverage detected