Skip to content

Commit eb43c04

Browse files
committed
small proxy IP fix
1 parent 20905de commit eb43c04

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

gradle.properties

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ loom_version=1.13-SNAPSHOT
1313
fabric_api_version=0.119.4+1.21.4
1414

1515
# Mod Properties
16-
#1 = MaLiLib config, MapArtAutoPlace
17-
#0 = Modrinth release
16+
#1 = MaLiLib config, MapArtAutoPlace, Modrinth release
17+
#1 = (PLANNED): new bundle copy, new caching, support non-QWERTY?
1818
mod_id=evmod
1919
mod_name=Ev's Mod
20-
mod_version=1.0
20+
mod_version=1.1
2121
maven_group=net.evmodder
2222

2323
# Fabric Mod Metadata

src/main/java/net/evmodder/evmod/apis/MiscUtils.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,14 @@ private static final int getRealServerAddressHashCode(String address){
6464
public static final int getServerAddressHashCode(ServerInfo serverInfo){
6565
if(serverInfo == null) return 0;
6666
final String name = Normalizer.normalize(serverInfo.name, Normalizer.Form.NFKD).toLowerCase().replaceAll("[^\\p{IsAlphabetic}\\p{IsDigit}]+", "");
67+
// TODO: if connected to a proxy, figure out the server IP
6768
if(name.contains("2b2tproxy")) return HASHCODE_2B2T;
6869
return getRealServerAddressHashCode(serverInfo.address.toLowerCase());
6970
}
7071
public static final int getCurrentServerAddressHashCode(){
7172
MinecraftClient client = MinecraftClient.getInstance();
7273
if(client == null || client.getCurrentServerEntry() == null) return 0;
73-
// TODO: if connected to a proxy, figure out the server IP
74-
return getRealServerAddressHashCode(client.getCurrentServerEntry().address.toLowerCase());
74+
return getServerAddressHashCode(client.getCurrentServerEntry());
7575
}
7676
public static byte[] getCurrentServerAndPlayerData(){
7777
UUID playerUUID = MinecraftClient.getInstance().player.getUuid();

0 commit comments

Comments
 (0)