diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml index 02fa853..039eea9 100644 --- a/.github/workflows/prerelease.yml +++ b/.github/workflows/prerelease.yml @@ -9,7 +9,7 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-java@v2 with: - java-version: 17 + java-version: 21 distribution: adopt - uses: actions/setup-python@v2 with: diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index e60e76d..58958b8 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -8,7 +8,7 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-java@v2 with: - java-version: 17 + java-version: 21 distribution: adopt - name: Build run: ./gradlew build diff --git a/README.md b/README.md index 6f6468b..db1f101 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ - + diff --git a/build.gradle b/build.gradle index 65f183a..9bddb8c 100644 --- a/build.gradle +++ b/build.gradle @@ -1,8 +1,8 @@ plugins { - id "fabric-loom" version "1.5.7" + id "fabric-loom" version "1.6-SNAPSHOT" } -sourceCompatibility = targetCompatibility = JavaVersion.VERSION_17 +sourceCompatibility = targetCompatibility = JavaVersion.VERSION_21 archivesBaseName = project.archives_base_name version = project.mod_version diff --git a/gradle.properties b/gradle.properties index 107bbd2..7518dfc 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,17 +1,17 @@ org.gradle.jvmargs=-Xmx2G # Fabric Properties (https://fabricmc.net/develop) -minecraft_version=1.20.4 -yarn_mappings=1.20.4+build.3 -loader_version=0.15.6 -fabric_version=0.95.4+1.20.4 +minecraft_version=1.20.6 +yarn_mappings=1.20.6+build.1 +loader_version=0.15.11 +fabric_version=0.98.0+1.20.6 # Mod Properties -mod_version=4.3.1 +mod_version=4.3.2 maven_group=de.damcraft archives_base_name=server-seeker # Dependencies # Meteor (https://maven.meteordev.org) -meteor_version=0.5.6-SNAPSHOT +meteor_version=0.5.7-SNAPSHOT diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 744c64d..20db9ad 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip networkTimeout=10000 zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/src/main/java/de/damcraft/serverseeker/country/Countries.java b/src/main/java/de/damcraft/serverseeker/country/Countries.java index 503f667..608c0d7 100644 --- a/src/main/java/de/damcraft/serverseeker/country/Countries.java +++ b/src/main/java/de/damcraft/serverseeker/country/Countries.java @@ -1,7 +1,6 @@ package de.damcraft.serverseeker.country; import de.damcraft.serverseeker.ServerSeeker; -import meteordevelopment.meteorclient.utils.network.MeteorExecutor; public class Countries { public static final Country UN = new DefaultCountry("Any", "UN"); diff --git a/src/main/java/de/damcraft/serverseeker/gui/FindNewServersScreen.java b/src/main/java/de/damcraft/serverseeker/gui/FindNewServersScreen.java index ec4f135..3cf8d42 100644 --- a/src/main/java/de/damcraft/serverseeker/gui/FindNewServersScreen.java +++ b/src/main/java/de/damcraft/serverseeker/gui/FindNewServersScreen.java @@ -477,7 +477,7 @@ private void handleThreadFinish() { HostAndPort hap = HostAndPort.fromString(serverIP); joinServerButton.action = () - -> ConnectScreen.connect(new TitleScreen(), MinecraftClient.getInstance(), new ServerAddress(hap.getHost(), hap.getPort()), new ServerInfo("a", hap.toString(), ServerInfo.ServerType.OTHER), false); + -> ConnectScreen.connect(new TitleScreen(), MinecraftClient.getInstance(), new ServerAddress(hap.getHost(), hap.getPort()), new ServerInfo("a", hap.toString(), ServerInfo.ServerType.OTHER), false, null); WButton serverInfoButton = theme.button("Server Info"); serverInfoButton.action = () -> this.client.setScreen(new ServerInfoScreen(serverIP)); diff --git a/src/main/java/de/damcraft/serverseeker/gui/FindPlayerScreen.java b/src/main/java/de/damcraft/serverseeker/gui/FindPlayerScreen.java index ac3e018..41d678c 100644 --- a/src/main/java/de/damcraft/serverseeker/gui/FindPlayerScreen.java +++ b/src/main/java/de/damcraft/serverseeker/gui/FindPlayerScreen.java @@ -140,7 +140,7 @@ public void initWidgets() { HostAndPort hap = HostAndPort.fromString(serverIP); WButton joinServerButton = theme.button("Join Server"); joinServerButton.action = () -> { - ConnectScreen.connect(new TitleScreen(), MinecraftClient.getInstance(), new ServerAddress(hap.getHost(), hap.getPort()), new ServerInfo("a", hap.toString(), ServerInfo.ServerType.OTHER), false); + ConnectScreen.connect(new TitleScreen(), MinecraftClient.getInstance(), new ServerAddress(hap.getHost(), hap.getPort()), new ServerInfo("a", hap.toString(), ServerInfo.ServerType.OTHER), false, null); }; WButton serverInfoButton = theme.button("Server Info"); diff --git a/src/main/java/de/damcraft/serverseeker/gui/ServerInfoScreen.java b/src/main/java/de/damcraft/serverseeker/gui/ServerInfoScreen.java index e281cdd..f5e3813 100644 --- a/src/main/java/de/damcraft/serverseeker/gui/ServerInfoScreen.java +++ b/src/main/java/de/damcraft/serverseeker/gui/ServerInfoScreen.java @@ -110,6 +110,6 @@ public void initWidgets() { } WButton joinServerButton = add(theme.button("Join this Server")).expandX().widget(); joinServerButton.action = () - -> ConnectScreen.connect(new TitleScreen(), MinecraftClient.getInstance(), new ServerAddress(hap.getHost(), hap.getPort()), new ServerInfo("a", hap.toString(), ServerInfo.ServerType.OTHER), false); + -> ConnectScreen.connect(new TitleScreen(), MinecraftClient.getInstance(), new ServerAddress(hap.getHost(), hap.getPort()), new ServerInfo("a", hap.toString(), ServerInfo.ServerType.OTHER), false, null); } } diff --git a/src/main/java/de/damcraft/serverseeker/mixin/HandshakeC2SMixin.java b/src/main/java/de/damcraft/serverseeker/mixin/HandshakeC2SMixin.java index 475913a..fcb7f4b 100644 --- a/src/main/java/de/damcraft/serverseeker/mixin/HandshakeC2SMixin.java +++ b/src/main/java/de/damcraft/serverseeker/mixin/HandshakeC2SMixin.java @@ -5,7 +5,6 @@ import de.damcraft.serverseeker.modules.BungeeSpoofModule; import meteordevelopment.meteorclient.systems.modules.Modules; import meteordevelopment.meteorclient.utils.network.Http; -import net.minecraft.network.NetworkState; import net.minecraft.network.packet.c2s.handshake.ConnectionIntent; import net.minecraft.network.packet.c2s.handshake.HandshakeC2SPacket; import org.spongepowered.asm.mixin.Final; @@ -21,19 +20,20 @@ @Mixin(HandshakeC2SPacket.class) public abstract class HandshakeC2SMixin { - @Shadow - public abstract NetworkState getNewNetworkState(); @Mutable @Shadow @Final private String address; + @Shadow + public abstract ConnectionIntent intendedState(); + @Inject(method = "(ILjava/lang/String;ILnet/minecraft/network/packet/c2s/handshake/ConnectionIntent;)V", at = @At("RETURN")) private void onHandshakeC2SPacket(int i, String string, int j, ConnectionIntent connectionIntent, CallbackInfo ci) { BungeeSpoofModule bungeeSpoofModule = Modules.get().get(BungeeSpoofModule.class); if (!bungeeSpoofModule.isActive()) return; - if (this.getNewNetworkState() != NetworkState.LOGIN) return; + if (this.intendedState() != ConnectionIntent.LOGIN) return; ServerSeeker.LOG.info("Spoofing bungeecord handshake packet"); String spoofedUUID = mc.getSession().getUuidOrNull().toString(); diff --git a/src/main/java/de/damcraft/serverseeker/utils/MCVersionUtil.java b/src/main/java/de/damcraft/serverseeker/utils/MCVersionUtil.java index 5ffbdd7..2e951da 100644 --- a/src/main/java/de/damcraft/serverseeker/utils/MCVersionUtil.java +++ b/src/main/java/de/damcraft/serverseeker/utils/MCVersionUtil.java @@ -5,6 +5,8 @@ public class MCVersionUtil { private static final HashMap versions = new HashMap<>() { { + put("1.20.6", 766); + put("1.20.5", 766); put("1.20.4", 765); put("1.20.3", 765); put("1.20.2", 764);