Use seconds for leveldb "LastPlayed"

This commit is contained in:
Jesse Boyd 2017-09-18 00:40:10 +10:00
parent c202b311f1
commit 917d3f332d
No known key found for this signature in database
GPG Key ID: 59F1DE6293AF6E1F

View File

@ -183,6 +183,11 @@ public class MCAFile2LevelDB implements Closeable {
Long time = tag.getLong("Time");
map.put("CurrentTick", new LongTag(time == null ? 0L : time));
map.put("spawnMobs", new ByteTag((byte) 1));
Long lastPlayed = tag.getLong("LastPlayed");
if (lastPlayed != null && lastPlayed > Integer.MAX_VALUE) {
lastPlayed = lastPlayed / 1000;
map.put("LastPlayed", new LongTag(lastPlayed));
}
}
ByteArrayOutputStream baos = new ByteArrayOutputStream();