Skip to content

Commit

Permalink
Update MixinGuiDisconnected.java
Browse files Browse the repository at this point in the history
  • Loading branch information
Aspw-w committed Mar 12, 2024
1 parent 6531d70 commit c884773
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import net.aspw.client.auth.account.MinecraftAccount;
import net.aspw.client.event.SessionEvent;
import net.aspw.client.features.module.impl.visual.Interface;
import net.aspw.client.protocol.ProtocolBase;
import net.aspw.client.protocol.api.ProtocolSelector;
import net.aspw.client.utils.ClientUtils;
import net.aspw.client.utils.ServerUtils;
Expand All @@ -28,6 +29,7 @@
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.util.IChatComponent;
import net.minecraft.util.Session;
import net.raphimc.vialoader.util.VersionEnum;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.injection.At;
Expand Down Expand Up @@ -133,10 +135,14 @@ private void actionPerformed(GuiButton button, CallbackInfo callbackInfo) {

@Inject(method = "drawScreen", at = @At("RETURN"))
private void drawScreen(CallbackInfo callbackInfo) {
final VersionEnum version = ProtocolBase.getManager().getTargetVersion();

Fonts.minecraftFont.drawStringWithShadow(
"§7Username: §d" + mc.getSession().getUsername(),
6f,
6f,
0xffffff);

Fonts.minecraftFont.drawStringWithShadow("§7Protocol: §d" + version.getName(), 6f, 16f, 0xffffff);
}
}

0 comments on commit c884773

Please sign in to comment.