Refactor
This commit is contained in:
parent
6883287c72
commit
3438c86de2
6 changed files with 182 additions and 169 deletions
|
@ -37,8 +37,8 @@ public class RequestFiles extends DataHandler {
|
|||
buf.writeInt(files.size());
|
||||
|
||||
for (AutoSyncID a : files){
|
||||
writeString(buf, a.getModID());
|
||||
writeString(buf, a.getUniqueID());
|
||||
writeString(buf, a.modID);
|
||||
writeString(buf, a.uniqueID);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -63,16 +63,14 @@ public class RequestFiles extends DataHandler {
|
|||
|
||||
@Override
|
||||
protected void runOnGameThread(Minecraft client, MinecraftServer server, boolean isClient) {
|
||||
List<DataExchange.AutoFileSyncEntry> syncEntries = files
|
||||
.stream().map(asid -> DataExchange.AutoFileSyncEntry.findMatching(asid))
|
||||
List<AutoFileSyncEntry> syncEntries = files
|
||||
.stream().map(asid -> AutoFileSyncEntry.findMatching(asid))
|
||||
.filter(e -> e!=null)
|
||||
.collect(Collectors.toList());
|
||||
|
||||
reply(new SendFiles(syncEntries, receivedToken), server);
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static void newToken(){
|
||||
currentToken = UUID.randomUUID().toString();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue