mirror of
https://github.com/darksaid98/Flashback.git
synced 2026-12-01 14:38:50 +00:00
Implement replay folders & sorting
This commit is contained in:
1 parent
4ce99cd255
commit
155d3f9c3d
21 files changed
+1088
-566
No files matched your search
@@ -19,17 +19,19 @@ public class ReplaySummary implements Comparable<ReplaySummary> {
|
||||
private final FlashbackMeta metadata;
|
||||
private final String replayId;
|
||||
private final long lastModified;
|
||||
private final long filesize;
|
||||
private final byte[] iconBytes;
|
||||
private Component info = null;
|
||||
private Component hoverInfo = null;
|
||||
private boolean canOpen = true;
|
||||
private boolean hasWarning = false;
|
||||
|
||||
public ReplaySummary(Path path, FlashbackMeta metadata, String replayId, long lastModified, @Nullable byte[] iconBytes) {
|
||||
public ReplaySummary(Path path, FlashbackMeta metadata, String replayId, long lastModified, long filesize, @Nullable byte[] iconBytes) {
|
||||
this.path = path;
|
||||
this.metadata = metadata;
|
||||
this.replayId = replayId;
|
||||
this.lastModified = lastModified;
|
||||
this.filesize = filesize;
|
||||
this.iconBytes = iconBytes;
|
||||
|
||||
if (metadata.protocolVersion != 0 && metadata.protocolVersion != SharedConstants.getProtocolVersion()) {
|
||||
@@ -71,10 +73,18 @@ public class ReplaySummary implements Comparable<ReplaySummary> {
|
||||
return this.metadata.name.isEmpty() ? this.replayId : this.metadata.name;
|
||||
}
|
||||
|
||||
public @Nullable String getWorldName() {
|
||||
return this.metadata.worldName;
|
||||
}
|
||||
|
||||
public long getLastModified() {
|
||||
return this.lastModified;
|
||||
}
|
||||
|
||||
public long getFilesize() {
|
||||
return filesize;
|
||||
}
|
||||
|
||||
public Component getInfo() {
|
||||
if (this.info == null) {
|
||||
MutableComponent mutable = Component.empty();
|
||||
|
||||
Reference in new issue
Block a user