forked from SteamWar/SteamWar
Removed compression from TraceRecord serialisation
This commit is contained in:
+2
-3
@@ -9,7 +9,6 @@ import org.bukkit.util.Vector;
|
|||||||
|
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.zip.GZIPInputStream;
|
|
||||||
|
|
||||||
public class TraceRepository {
|
public class TraceRepository {
|
||||||
|
|
||||||
@@ -99,7 +98,7 @@ public class TraceRepository {
|
|||||||
double locY = objectInput.readDouble();
|
double locY = objectInput.readDouble();
|
||||||
double locZ = objectInput.readDouble();
|
double locZ = objectInput.readDouble();
|
||||||
Location location = new Location(Bukkit.getWorlds().get(0), locX, locY, locZ);
|
Location location = new Location(Bukkit.getWorlds().get(0), locX, locY, locZ);
|
||||||
|
|
||||||
double velX = objectInput.readDouble();
|
double velX = objectInput.readDouble();
|
||||||
double velY = objectInput.readDouble();
|
double velY = objectInput.readDouble();
|
||||||
double velZ = objectInput.readDouble();
|
double velZ = objectInput.readDouble();
|
||||||
@@ -112,7 +111,7 @@ public class TraceRepository {
|
|||||||
protected static List<TNTPoint> readTraceRecords(Trace trace) {
|
protected static List<TNTPoint> readTraceRecords(Trace trace) {
|
||||||
File recordsFile = trace.getRecordsSaveFile();
|
File recordsFile = trace.getRecordsSaveFile();
|
||||||
@Cleanup
|
@Cleanup
|
||||||
ObjectInputStream inputStream = new ObjectInputStream(new GZIPInputStream(new FileInputStream(recordsFile)));
|
ObjectInputStream inputStream = new ObjectInputStream(new FileInputStream(recordsFile));
|
||||||
|
|
||||||
List<TNTPoint> records = new ArrayList<>();
|
List<TNTPoint> records = new ArrayList<>();
|
||||||
for (int i = 0; i < trace.getRecordsCount(); i++) {
|
for (int i = 0; i < trace.getRecordsCount(); i++) {
|
||||||
|
|||||||
Reference in New Issue
Block a user