Added Factory object #31

This commit is contained in:
simon
2017-12-23 12:17:36 -05:00
parent 3548928218
commit 4f1342593f
9 changed files with 79 additions and 19 deletions

View File

@@ -119,7 +119,7 @@ public class TileMap implements JSONSerialisable {
deflaterOutputStream.close();
byte[] compressedBytes = stream.toByteArray();
json.put("zipTerrain", new String(Base64.getEncoder().encode(compressedBytes)));
json.put("z", new String(Base64.getEncoder().encode(compressedBytes)));
} catch (IOException e) {
e.printStackTrace();
@@ -133,7 +133,7 @@ public class TileMap implements JSONSerialisable {
TileMap tileMap = new TileMap(World.WORLD_SIZE, World.WORLD_SIZE);
byte[] compressedBytes = Base64.getDecoder().decode((String) object.get("zipTerrain"));
byte[] compressedBytes = Base64.getDecoder().decode((String) object.get("z"));
try {
ByteArrayOutputStream baos = new ByteArrayOutputStream();