Skip to content

Commit

Permalink
Fix crash when Minecraft is in demo mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander01998 committed Mar 17, 2024
1 parent d25bc74 commit c3c3467
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/main/java/net/wurstclient/mixin/TitleScreenMixin.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,12 @@ private TitleScreenMixin(WurstClient wurst, Text title)
super(title);
}

@Inject(at = @At("RETURN"), method = "init()V")
private void onInitWidgetsNormal(CallbackInfo ci)
/**
* Adds the AltManager button to the title screen. This mixin must not
* run in demo mode, as the Realms button doesn't exist there.
*/
@Inject(at = @At("RETURN"), method = "initWidgetsNormal(II)V")
private void onInitWidgetsNormal(int y, int spacingY, CallbackInfo ci)
{
if(!WurstClient.INSTANCE.isEnabled())
return;
Expand Down

0 comments on commit c3c3467

Please sign in to comment.