Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
voruti committed Dec 1, 2023
1 parent 62632de commit df749b4
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public class ServerHandshakeNetworkHandlerMixin {
@Inject(method = "onHandshake", at = @At(value = "INVOKE", target =
"Lnet/minecraft/server/network/ServerLoginNetworkHandler;<init>(Lnet/minecraft/server/MinecraftServer;Lnet/minecraft/network/ClientConnection;)V"))
private void onProcessHandshakeStart(HandshakeC2SPacket packet, CallbackInfo ci) {
if (packet.getIntendedState().equals(NetworkState.LOGIN)) {
if (NetworkState.LOGIN.equals(packet.getNewNetworkState())) {
String[] split = ((HandshakeC2SPacketAccessor) packet).getAddress().split("\00");
if (split.length == 3 || split.length == 4) {
// override/insert forwarded IP into connection:
Expand Down

0 comments on commit df749b4

Please sign in to comment.