From 3d05181a1390ff43d66ed8e8b79792bf883df859 Mon Sep 17 00:00:00 2001 From: chris Date: Tue, 12 Dec 2023 22:44:13 +0100 Subject: [PATCH] Fix: Show the correct port that Geyser started on when using Geyser-Fabric on a client. (#4335) --- .../platform/fabric/mixin/client/IntegratedServerMixin.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bootstrap/fabric/src/main/java/org/geysermc/geyser/platform/fabric/mixin/client/IntegratedServerMixin.java b/bootstrap/fabric/src/main/java/org/geysermc/geyser/platform/fabric/mixin/client/IntegratedServerMixin.java index f11d3a1ae..af11174dc 100644 --- a/bootstrap/fabric/src/main/java/org/geysermc/geyser/platform/fabric/mixin/client/IntegratedServerMixin.java +++ b/bootstrap/fabric/src/main/java/org/geysermc/geyser/platform/fabric/mixin/client/IntegratedServerMixin.java @@ -32,6 +32,7 @@ import net.minecraft.client.server.IntegratedServer; import net.minecraft.network.chat.Component; import net.minecraft.server.MinecraftServer; import net.minecraft.world.level.GameType; +import org.geysermc.geyser.GeyserImpl; import org.geysermc.geyser.platform.fabric.GeyserFabricMod; import org.geysermc.geyser.platform.fabric.GeyserServerPortGetter; import org.geysermc.geyser.text.GeyserLocale; @@ -62,7 +63,7 @@ public class IntegratedServerMixin implements GeyserServerPortGetter { // Give indication that Geyser is loaded Objects.requireNonNull(this.minecraft.player); this.minecraft.player.displayClientMessage(Component.literal(GeyserLocale.getPlayerLocaleString("geyser.core.start", - this.minecraft.options.languageCode, "localhost", String.valueOf(this.publishedPort))), false); + this.minecraft.options.languageCode, "localhost", String.valueOf(GeyserImpl.getInstance().bedrockListener().port()))), false); } }