This commit is contained in:
kirillsaint 2023-11-02 19:09:23 +06:00
parent bc9fd11f8f
commit d5117ef735
2 changed files with 5 additions and 5 deletions

View File

@ -48,7 +48,7 @@ public class NameTagRenderingHooks {
if (d0 <= (double)(maxDistance * maxDistance))
{
boolean fontShadow = Client.getInstance().getModInstances().getModByClass(NametagsMod.class).isEnabled() && Client.getInstance().getSettingsManager().getSettingByClass(NametagsMod.class, "Font Shadow").getValBoolean();
boolean icons = Client.getInstance().getModInstances().getModByClass(NametagsMod.class).isEnabled() && Client.getInstance().getSettingsManager().getSettingByClass(NametagsMod.class, "Show Nametag Icons").getValBoolean();
boolean icons = !Client.getInstance().getModInstances().getModByClass(NametagsMod.class).isEnabled() || Client.getInstance().getSettingsManager().getSettingByClass(NametagsMod.class, "Show Nametag Icons").getValBoolean();
boolean background = !Client.getInstance().getModInstances().getModByClass(NametagsMod.class).isEnabled() || Client.getInstance().getModInstances().getModByClass(NametagsMod.class).isEnabled() && Client.getInstance().getSettingsManager().getSettingByClass(NametagsMod.class, "Background").getValBoolean();
FontRenderer fontrenderer = render.getFontRendererFromRenderManager();
float f = 1.6F;

View File

@ -78,7 +78,7 @@ public abstract class GuiPlayerTabOverlayMixin {
} catch (Exception err) {
}
int k = this.mc.fontRendererObj.getStringWidth(this.getPlayerName(networkplayerinfo)) + (isSilent && Client.getInstance().getSettingsManager().getSettingByClass(TabMod.class, "Show Nametag Icons").getValBoolean() ? 9 : 0);
int k = this.mc.fontRendererObj.getStringWidth(this.getPlayerName(networkplayerinfo)) + (isSilent && (!Client.getInstance().getModInstances().getModByClass(TabMod.class).isEnabled() || Client.getInstance().getSettingsManager().getSettingByClass(TabMod.class, "Show Nametag Icons").getValBoolean()) ? 9 : 0);
i = Math.max(i, k);
if (scoreObjectiveIn != null && scoreObjectiveIn.getRenderType() != IScoreObjectiveCriteria.EnumRenderType.HEARTS) {
k = this.mc.fontRendererObj.getStringWidth(" " + scoreboardIn.getValueFromObjective(networkplayerinfo.getGameProfile().getName(), scoreObjectiveIn).getScorePoints());
@ -190,7 +190,7 @@ public abstract class GuiPlayerTabOverlayMixin {
if(entityplayer != null) {
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()) {
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());
Gui.drawModalRectWithCustomSizedTexture(j2, k2, 8, 8, 8, 8, 8, 8);
@ -230,7 +230,7 @@ public abstract class GuiPlayerTabOverlayMixin {
if (scoreObjectiveIn != null && networkplayerinfo1.getGameType() != WorldSettings.GameType.SPECTATOR)
{
int k5 = (j2 - (isSilent && Client.getInstance().getModInstances().getModByClass(TabMod.class).isEnabled() && Client.getInstance().getSettingsManager().getSettingByClass(TabMod.class, "Show Nametag Icons").getValBoolean() ? 9 : 0)) + i + 1;
int k5 = (j2 - (isSilent && (!Client.getInstance().getModInstances().getModByClass(TabMod.class).isEnabled() || Client.getInstance().getSettingsManager().getSettingByClass(TabMod.class, "Show Nametag Icons").getValBoolean()) ? 9 : 0)) + i + 1;
int l5 = k5 + l;
if (l5 - k5 > 5)
@ -239,7 +239,7 @@ public abstract class GuiPlayerTabOverlayMixin {
}
}
this.drawPing(i1, j2 - (flag ? 9 : 0) - (isSilent && Client.getInstance().getModInstances().getModByClass(TabMod.class).isEnabled() && Client.getInstance().getSettingsManager().getSettingByClass(TabMod.class, "Show Nametag Icons").getValBoolean() ? 9 : 0), k2, networkplayerinfo1);
this.drawPing(i1, j2 - (flag ? 9 : 0) - (isSilent && (!Client.getInstance().getModInstances().getModByClass(TabMod.class).isEnabled() || Client.getInstance().getSettingsManager().getSettingByClass(TabMod.class, "Show Nametag Icons").getValBoolean()) ? 9 : 0), k2, networkplayerinfo1);
}
}