Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
Gaming32 committed Aug 28, 2024
1 parent d2453be commit d4b0609
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 4 additions & 1 deletion src/main/java/io/github/gaming32/worldhost/WorldHost.java
Original file line number Diff line number Diff line change
Expand Up @@ -824,7 +824,10 @@ public static void connect(Screen parentScreen, long cid, String host, int port)
);
((ServerDataExt)serverData).wh$setConnectionId(cid);
ConnectScreen.startConnecting(
parentScreen, minecraft, serverAddress, serverData, false
parentScreen, minecraft, serverAddress, serverData
//#if MC >= 1.20.1
, false
//#endif
//#if MC >= 1.20.5
, null
//#endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@ public String getPluginId() {
@Override
public void registerEvents(EventRegistration registration) {
registration.registerEvent(ClientVoicechatInitializationEvent.class, event -> {
final var connection = Minecraft.getInstance().getConnection();
if (connection == null) return;
final var serverData = (ServerDataExt)connection.getServerData();
final var serverData = (ServerDataExt)Minecraft.getInstance().getCurrentServer();
if (serverData == null) return;
final var connectionId = serverData.wh$getConnectionId();
if (connectionId == null) return;
Expand Down

0 comments on commit d4b0609

Please sign in to comment.