Added extra checks to see if they help server duplication

This commit is contained in:
Anuken
2025-07-24 01:00:30 -04:00
parent 697396d1c6
commit c3e1b8b329
2 changed files with 7 additions and 1 deletions

View File

@@ -4279,7 +4279,7 @@ public class Blocks{
hitSize = 7f;
shootEffect = sfe;
smokeEffect = Fx.shootBigSmoke;
ammoMultiplier = 1;
ammoMultiplier = 2;
reloadMultiplier = 1f;
pierceCap = 4;
pierce = true;

View File

@@ -680,6 +680,8 @@ public class JoinDialog extends BaseDialog{
Http.get(urls[index])
.error(t -> {
if(fetchedServers) return;
if(index < urls.length - 1){
//attempt fetching from the next URL upon failure
fetchServers(urls, index + 1);
@@ -688,10 +690,14 @@ public class JoinDialog extends BaseDialog{
}
})
.submit(result -> {
if(fetchedServers) return;
String text = result.getResultAsString();
Seq<ServerGroup> servers = parseServerString(text);
//modify default servers on main thread
Core.app.post(() -> {
if(fetchedServers) return;
//cache the server list to a file, so it can be loaded in case of an outage later
try{
serverCacheFile.writeString(text);