diff --git a/src/main/java/net/silentclient/client/hooks/NameTagRenderingHooks.java b/src/main/java/net/silentclient/client/hooks/NameTagRenderingHooks.java index 512e8d1..306b187 100644 --- a/src/main/java/net/silentclient/client/hooks/NameTagRenderingHooks.java +++ b/src/main/java/net/silentclient/client/hooks/NameTagRenderingHooks.java @@ -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; diff --git a/src/main/java/net/silentclient/client/mixin/mixins/GuiPlayerTabOverlayMixin.java b/src/main/java/net/silentclient/client/mixin/mixins/GuiPlayerTabOverlayMixin.java index 5252114..7b6e2a9 100644 --- a/src/main/java/net/silentclient/client/mixin/mixins/GuiPlayerTabOverlayMixin.java +++ b/src/main/java/net/silentclient/client/mixin/mixins/GuiPlayerTabOverlayMixin.java @@ -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); } }