This commit is contained in:
Anuken
2020-07-30 21:41:17 -04:00
parent b12c25bc0b
commit ff990925f0
8 changed files with 15 additions and 41 deletions

View File

@@ -16,14 +16,12 @@ import mindustry.*;
import mindustry.core.*;
import mindustry.desktop.steam.*;
import mindustry.game.EventType.*;
import mindustry.gen.*;
import mindustry.net.*;
import mindustry.net.Net.*;
import mindustry.type.*;
import mindustry.gen.*;
import java.io.*;
import java.net.*;
import java.util.*;
import static mindustry.Vars.*;
@@ -307,23 +305,7 @@ public class DesktopLauncher extends ClientLauncher{
}
}
try{
Enumeration<NetworkInterface> e = NetworkInterface.getNetworkInterfaces();
NetworkInterface out;
for(out = e.nextElement(); (out.getHardwareAddress() == null || out.isVirtual() || !validAddress(out.getHardwareAddress())) && e.hasMoreElements(); out = e.nextElement());
byte[] bytes = out.getHardwareAddress();
byte[] result = new byte[8];
System.arraycopy(bytes, 0, result, 0, bytes.length);
String str = new String(Base64Coder.encode(result));
if(str.equals("AAAAAAAAAOA=") || str.equals("AAAAAAAAAAA=")) throw new RuntimeException("Bad UUID.");
return str;
}catch(Exception e){
return super.getUUID();
}
return super.getUUID();
}
private static void message(String message){