-
-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
102 changed files
with
2,043 additions
and
127 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip | ||
networkTimeout=10000 | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
before_install: | ||
- curl -s "https://get.sdkman.io" | bash | ||
- source "$HOME/.sdkman/bin/sdkman-init.sh" | ||
- sdk install java 17.0.5+8-tem | ||
- sdk use java 17.0.5+8-tem | ||
- sdk install java 17.0.7+7-tem | ||
- sdk use java 17.0.7+7-tem |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
...om/viaversion/fabric/mc114/mixin/gui/client/MixinMultiplayerServerListPingerListener.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package com.viaversion.fabric.mc114.mixin.gui.client; | ||
|
||
|
||
import com.viaversion.fabric.common.gui.ViaServerInfo; | ||
import com.viaversion.fabric.common.handler.FabricDecodeHandler; | ||
import com.viaversion.fabric.mc114.mixin.debug.client.MixinClientConnectionAccessor; | ||
import net.minecraft.client.network.ServerInfo; | ||
import net.minecraft.network.ClientConnection; | ||
import net.minecraft.network.listener.ClientQueryPacketListener; | ||
import net.minecraft.network.packet.s2c.query.QueryResponseS2CPacket; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.gen.Accessor; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.Inject; | ||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; | ||
|
||
@Mixin(targets = "net.minecraft.client.network.MultiplayerServerListPinger$1") | ||
public abstract class MixinMultiplayerServerListPingerListener implements ClientQueryPacketListener { | ||
@Accessor | ||
abstract ClientConnection getField_3774(); // Synthetic | ||
|
||
@Accessor | ||
abstract ServerInfo getField_3776(); // Synthetic | ||
|
||
@Inject(method = "onResponse", at = @At(value = "HEAD")) | ||
private void onResponseCaptureServerInfo(QueryResponseS2CPacket packet, CallbackInfo ci) { | ||
FabricDecodeHandler decoder = ((MixinClientConnectionAccessor) this.getField_3774()).getChannel() | ||
.pipeline().get(FabricDecodeHandler.class); | ||
if (decoder != null) { | ||
((ViaServerInfo) getField_3776()).setViaTranslating(decoder.getInfo().isActive()); | ||
((ViaServerInfo) getField_3776()).setViaServerVer(decoder.getInfo().getProtocolInfo().getServerProtocolVersion()); | ||
} | ||
} | ||
} |
Oops, something went wrong.