From eff68e84e649c0019ca5a8db3101006a57e4a61b Mon Sep 17 00:00:00 2001 From: Josiah Glosson Date: Mon, 15 Jul 2024 18:18:52 -0500 Subject: [PATCH] Fix build --- .../github/gaming32/worldhost/gui/screen/AddFriendScreen.java | 4 ++-- .../worldhost/plugin/vanilla/WorldHostFriendAdder.java | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/java/io/github/gaming32/worldhost/gui/screen/AddFriendScreen.java b/src/main/java/io/github/gaming32/worldhost/gui/screen/AddFriendScreen.java index 4b1e717..b716192 100644 --- a/src/main/java/io/github/gaming32/worldhost/gui/screen/AddFriendScreen.java +++ b/src/main/java/io/github/gaming32/worldhost/gui/screen/AddFriendScreen.java @@ -106,7 +106,7 @@ protected void init() { //#if MC >= 1.19.4 setInitialFocus(nameField); //#else - //$$ usernameField.setFocus(true); + //$$ nameField.setFocus(true); //#endif nameField.setResponder(name -> { lastTyping = Util.getMillis(); @@ -187,7 +187,7 @@ public boolean keyPressed(int keyCode, int scanCode, int modifiers) { @Override public void tick() { //#if MC < 1.20.2 - //$$ usernameField.tick(); + //$$ nameField.tick(); //#endif if (Util.getMillis() - 300 > lastTyping && delayedFriendUpdate) { delayedFriendUpdate = false; diff --git a/src/main/java/io/github/gaming32/worldhost/plugin/vanilla/WorldHostFriendAdder.java b/src/main/java/io/github/gaming32/worldhost/plugin/vanilla/WorldHostFriendAdder.java index 4799637..731b6f6 100644 --- a/src/main/java/io/github/gaming32/worldhost/plugin/vanilla/WorldHostFriendAdder.java +++ b/src/main/java/io/github/gaming32/worldhost/plugin/vanilla/WorldHostFriendAdder.java @@ -4,6 +4,7 @@ import io.github.gaming32.worldhost.WorldHost; import io.github.gaming32.worldhost.plugin.FriendAdder; import io.github.gaming32.worldhost.plugin.FriendListFriend; +import io.github.gaming32.worldhost.versions.Components; import net.minecraft.network.chat.Component; import java.nio.charset.StandardCharsets; @@ -18,7 +19,7 @@ public class WorldHostFriendAdder implements FriendAdder { @Override public Component label() { - return Component.literal("World Host"); + return Components.literal("World Host"); } @Override