Update GuiPlayerTabOverlayMixin.java

This commit is contained in:
kirillsaint 2023-09-01 22:04:32 +06:00
parent 99953d6d1c
commit 722237c0ab

View File

@ -26,6 +26,7 @@ import net.silentclient.client.cosmetics.StaticResourceLocation;
import net.silentclient.client.mixin.ducks.AbstractClientPlayerExt;
import net.silentclient.client.mixin.ducks.TextureManagerExt;
import net.silentclient.client.mods.render.TabMod;
import net.silentclient.client.utils.ColorUtils;
import net.silentclient.client.utils.Players;
import org.spongepowered.asm.mixin.Final;
import org.spongepowered.asm.mixin.Mixin;
@ -190,9 +191,9 @@ public abstract class GuiPlayerTabOverlayMixin {
isSilent = Boolean.parseBoolean(Players.getPlayerStatus(gameprofile.getName().equalsIgnoreCase(Client.getInstance().getAccount().getUsername()), gameprofile.getName(), entityplayer.getUniqueID(), (AbstractClientPlayer) entityplayer));
}
if(isSilent && entityplayer != null && Client.getInstance().getModInstances().getModByClass(TabMod.class).isEnabled() && Client.getInstance().getSettingsManager().getSettingByClass(TabMod.class, "Show Nametag Icons").getValBoolean()) {
ColorUtils.setColor(-1);
this.mc.getTextureManager().bindTexture(((AbstractClientPlayerExt) entityplayer).silent$getPlayerIcon().getLocation());
GlStateManager.color(1.0f, 1.0f, 1.0f);
drawModalRectWithCustomSizedTexture(j2 + 0.5F, k2, 0.0f, 0.0f, 8.0f, 8.0f, 8.0f, 8.0f);
Gui.drawModalRectWithCustomSizedTexture(j2, k2, 8, 8, 8, 8, 8, 8);
j2 += 9;
}
} catch (Exception err) {