diff --git a/README.md b/README.md index fadc8fad..c7d7524d 100644 --- a/README.md +++ b/README.md @@ -6,16 +6,16 @@ -[1]: https://img.shields.io/modrinth/dt/RTWpcTBp?label=Modrinth%0aDownloads&logo=modrinth&style=flat&color=45A35F&labelColor=2D2D2D +[1]: https://img.shields.io/modrinth/dt/RTWpcTBp?label=Modrinth%0aDownloads&logo=modrinth&style=flat&color=45A35F&labelcolor=2D2D2D [2]: https://modrinth.com/mod/mcwifipnp -[3]: https://img.shields.io/curseforge/dt/450250?label=CurseForge%0aDownloads&logo=curseforge&style=flat&color=E36639&labelColor=2D2D2D +[3]: https://img.shields.io/curseforge/dt/450250?label=CurseForge%0aDownloads&logo=curseforge&style=flat&color=E36639&labelcolor=2D2D2D [4]: https://www.curseforge.com/minecraft/mc-mods/mcwifipnp -[5]: https://img.shields.io/badge/Available%20for-%201.15%20to%201.20-47376F?logo=files&color=377BCB&labelColor=2D2D2D +[5]: https://img.shields.io/badge/Available%20for-%201.15%20to%201.20-47376F?logo=files&color=377BCB&labelcolor=2D2D2D [6]: https://modrinth.com/mod/mcwifipnp/versions -[7]: https://img.shields.io/github/license/Satxm/mcwifipnp?label=License&logo=github&style=flat&color=E51050&labelColor=2D2D2D +[7]: https://img.shields.io/github/license/Satxm/mcwifipnp?label=License&logo=github&style=flat&color=E51050&labelcolor=2D2D2D [8]: https://github.com/satxm/mcwifipnp diff --git a/gradle.properties b/gradle.properties index e3f705c3..d3a1e102 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,11 +1,11 @@ org.gradle.jvmargs = -Xmx4G -org.gradle.daemon=false -org.gradle.debug=false +org.gradle.daemon = false +org.gradle.debug = false # Mod Properties -mod_id=mcwifipnp -mod_version=1.7.1 -mod_group_id=io.github.satxm.mcwifipnp +mod_id = mcwifipnp +mod_version = 1.7.1 +mod_group_id = io.github.satxm.mcwifipnp # Minecraft Properties minecraft_version = 1.20.6 @@ -31,14 +31,14 @@ fabric_loader_version_range = >=0.15.0 fabric_minecraft_version_range = >=1.20.4 # Forge -forge_version_range=[49,) -forge_loader_version_range=[49,) +forge_version_range = [49,) +forge_loader_version_range = [49,) forge_minecraft_version_range = [1.20.4,1.21) # NeoForge -neo_version_range=[20.4,) -neo_loader_version_range=[2,) -neo_minecraft_version_range=[1.20.4,1.21) +neo_version_range = [20.4,) +neo_loader_version_range = [2,) +neo_minecraft_version_range = [1.20.4,1.21) # Quilt quilt_loader_version_range = >=0.20.0 @@ -46,4 +46,4 @@ quilt_qsl_version_range = >=8.0.0- quilt_minecraft_version_range = >=1.20.2 # Resource Pack -pack_format_number=32 +pack_format_number = 32 diff --git a/src/main/java/com/dosse/upnp/Gateway.java b/src/main/java/com/dosse/upnp/Gateway.java index 8b6aae7a..7898bf08 100644 --- a/src/main/java/com/dosse/upnp/Gateway.java +++ b/src/main/java/com/dosse/upnp/Gateway.java @@ -46,7 +46,7 @@ class Gateway { public Gateway(byte[] data, Inet4Address ip, InetAddress gatewayip) throws Exception { iface = ip; - routerip=gatewayip; + routerip = gatewayip; String location = null; StringTokenizer st = new StringTokenizer(new String(data), "\n"); while (st.hasMoreTokens()) { diff --git a/src/main/java/com/dosse/upnp/GatewayFinder.java b/src/main/java/com/dosse/upnp/GatewayFinder.java index 7f28c67e..f1a775b6 100644 --- a/src/main/java/com/dosse/upnp/GatewayFinder.java +++ b/src/main/java/com/dosse/upnp/GatewayFinder.java @@ -57,8 +57,8 @@ public GatewayListener(Inet4Address ip, String req) { @Override public void run() { - boolean foundgw=false; - Gateway gw=null; + boolean foundgw = false; + Gateway gw = null; try { byte[] req = this.req.getBytes(); DatagramSocket s = new DatagramSocket(new InetSocketAddress(ip, 0)); @@ -69,10 +69,10 @@ public void run() { DatagramPacket recv = new DatagramPacket(new byte[1536], 1536); s.receive(recv); gw = new Gateway(recv.getData(), ip, recv.getAddress()); - String extIp= gw.getExternalIP(); + String extIp = gw.getExternalIP(); if( (extIp!=null) && (!extIp.equalsIgnoreCase("0.0.0.0")) ){ //Exclude gateways without an external IP gatewayFound(gw); - foundgw=true; + foundgw = true; } } catch (SocketTimeoutException t) { break;