Skip to content

Commit

Permalink
Update to 1.20.3-pre3
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander01998 committed Nov 27, 2023
1 parent 03b46d3 commit 70e03e8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ public void onOnServerMetadata(ServerMetadataS2CPacket packet,
// Remove Mojang's dishonest warning toast on safe servers
if(!packet.isSecureChatEnforced())
{
client.getToastManager().toastQueue.removeIf(
toast -> toast.getType() == SystemToast.Type.UNSECURE_SERVER_WARNING);
client.getToastManager().toastQueue.removeIf(toast -> toast
.getType() == SystemToast.Type.UNSECURE_SERVER_WARNING);
return;
}

Expand Down
18 changes: 2 additions & 16 deletions src/main/java/net/wurstclient/mixin/MinecraftClientMixin.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;

import com.mojang.authlib.GameProfile;
import com.mojang.authlib.exceptions.AuthenticationException;
import com.mojang.authlib.minecraft.UserApiService;
import com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService;

Expand Down Expand Up @@ -179,23 +178,10 @@ public void setSession(Session session)
{
wurstSession = session;

UserApiService userApiService =
wurst_createUserApiService(session.getAccessToken());
UserApiService userApiService = authenticationService
.createUserApiService(session.getAccessToken());
UUID uuid = wurstSession.getUuidOrNull();
wurstProfileKeys =
new ProfileKeysImpl(userApiService, uuid, runDirectory.toPath());
}

private UserApiService wurst_createUserApiService(String accessToken)
{
try
{
return authenticationService.createUserApiService(accessToken);

}catch(AuthenticationException e)
{
e.printStackTrace();
return UserApiService.OFFLINE;
}
}
}
4 changes: 2 additions & 2 deletions src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@

"depends": {
"fabricloader": ">=0.14.24",
"fabric-api": ">=0.90.11",
"minecraft": "~1.20.3-beta.2",
"fabric-api": ">=0.91.1",
"minecraft": "~1.20.3-beta.3",
"java": ">=17"
},
"suggests": {
Expand Down

0 comments on commit 70e03e8

Please sign in to comment.