Server Country Flags

Server Country Flags

7M Downloads

Adding a server with an IP in shared address space will fail to geolocate and crash

mirrorcult opened this issue ยท 6 comments

commented
java.lang.NullPointerException: Cannot invoke "java.lang.Float.floatValue()" because the return value of "java.util.HashMap.get(Object)" is null
	at net.minecraft.class_4267$class_4270.handler$kec000$servercountryflags$render(class_4267.java:2137)
	at net.minecraft.class_4267$class_4270.method_25343(class_4267.java:361)
	at net.minecraft.class_350.method_44397(class_350.java:509)
	at net.minecraft.class_350.method_25311(class_350.java:497)
	at net.minecraft.class_350.method_25394(class_350.java:232)
	at net.minecraft.class_500.method_25394(class_500.java:227)
	at net.minecraft.class_757.method_3192(class_757.java:881)
	at net.minecraft.class_310.method_1523(class_310.java:1177)
	at net.minecraft.class_310.method_1514(class_310.java:768)
	at net.minecraft.client.main.Main.method_44604(Main.java:244)
	at net.minecraft.client.main.Main.main(Main.java:51)
	at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:468)
	at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74)
	at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23)
	at org.prismlauncher.launcher.impl.StandardLauncher.launch(StandardLauncher.java:87)
	at org.prismlauncher.EntryPoint.listen(EntryPoint.java:130)
	at org.prismlauncher.EntryPoint.main(EntryPoint.java:70)

This was an issue for me trying to host a server over Tailscale for my friend to connect. Tailscale VPN uses IPs in the 100.x.x.x range, and attempting to geolocate an IP in that range will return an error like this, despite being a perfectly valid IP to connect to if you're in the tailnet:

image

Presumably it should just null check and show an unknown/default flag instead

commented

What version of the mod were you using? I believe this should be fixed in newer versions of the mod, however these changes haven't been ported to all Minecraft versions yet.

commented

This was 1.8.1 on 1.19.2, so yeah decently old

commented

Did you get the mod from Modrinth by any chance? I haven't been keeping up with uploading new versions to Modrinth like I do on CurseForge.

commented

yes, this was from modrinth

commented

I uploaded newer versions of the mod for most popular Minecraft versions to Modrinth, I believe this issue doesn't happen on the 1.9.3 version of the mod which is now available on Modrinth.

commented

yep, new version fixes this!