summary refs log tree commit diff stats
path: root/src/main/java/ganarchy/friendcode/client
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/ganarchy/friendcode/client')
-rw-r--r--src/main/java/ganarchy/friendcode/client/FriendCodeScreen.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/ganarchy/friendcode/client/FriendCodeScreen.java b/src/main/java/ganarchy/friendcode/client/FriendCodeScreen.java
index 9496942..4bd4971 100644
--- a/src/main/java/ganarchy/friendcode/client/FriendCodeScreen.java
+++ b/src/main/java/ganarchy/friendcode/client/FriendCodeScreen.java
@@ -2,7 +2,7 @@ package ganarchy.friendcode.client;
 
 import ganarchy.friendcode.FriendCode;
 import ganarchy.friendcode.mixin.FriendCodeIntegratedServerExt;
-import net.fabricmc.api.EnvType;
+import ganarchy.friendcode.util.KeyUtil;import net.fabricmc.api.EnvType;
 import net.fabricmc.api.Environment;
 import net.minecraft.client.MinecraftClient;
 import net.minecraft.client.gui.screen.OpenToLanScreen;
@@ -137,9 +137,10 @@ public class FriendCodeScreen extends Screen {
         try {
             String privateKey = null;
             if (codeType == CodeType.WORLD) {
-                // FIXME
+                // FIXME this currently does nothing.
                 var worldDir = client.getServer().submit(() -> client.getServer().getSavePath(WorldSavePath.ROOT)).join();
                 var keyFile = worldDir.resolve("friendcode.key");
+                privateKey = KeyUtil.readKeyFile(keyFile);
             }
             client.loadBlockList();
             client.getServer().getNetworkIo().bind(null, port);