Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
Gaming32 committed May 9, 2024
1 parent cc45187 commit c99101b
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 49 deletions.
7 changes: 6 additions & 1 deletion src/main/java/io/github/gaming32/worldhost/WorldHost.java
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,12 @@ public static void reconnect(boolean successToast, boolean failureToast) {
proxyProtocolClient.close();
proxyProtocolClient = null;
}
final UUID uuid = Minecraft.getInstance().getUser().getProfileId();
final var user = Minecraft.getInstance().getUser();
//#if MC >= 1.19.2
final UUID uuid = user.getProfileId();
//#else
//$$ final UUID uuid = user.getGameProfile().getId();
//#endif
//noinspection ConstantValue
if (uuid == null) {
LOGGER.warn("Failed to get player UUID. Unable to use World Host.");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,11 @@ protected void init() {

usernameField = addWidget(new EditBox(font, width / 2 - 100, 66, 200, 20, FRIEND_USERNAME_TEXT));
usernameField.setMaxLength(36);
//#if MC >= 1.19.4
usernameField.setFocused(true);
//#else
//$$ usernameField.setFocus(true);
//#endif
if (friendProfile != null) {
usernameField.setValue(friendProfile.getName());
}
Expand Down Expand Up @@ -176,7 +180,12 @@ public void render(
final ResourceLocation skinTexture = WorldHost.getSkinLocationNow(friendProfile);
RenderSystem.setShaderColor(1f, 1f, 1f, 1f);
RenderSystem.enableBlend();
final int size = addFriendButton.getY() - 110;
//#if MC >= 1.19.4
final int addFriendY = addFriendButton.getY();
//#else
//$$ final int addFriendY = addFriendButton.y;
//#endif
final int size = addFriendY - 110;
final int x = width / 2 - size / 2;
blit(context, skinTexture, x, 98, size, size, 8, 8, 8, 8, 64, 64);
blit(context, skinTexture, x, 98, size, size, 40, 8, 8, 8, 64, 64);
Expand Down
11 changes: 0 additions & 11 deletions src/main/java/io/github/gaming32/worldhost/versions/Pattern.java

This file was deleted.

36 changes: 0 additions & 36 deletions src/main/java/io/github/gaming32/worldhost/versions/Patterns.java

This file was deleted.

0 comments on commit c99101b

Please sign in to comment.