Merge pull request #33 from Silent-Client/TEST2

Test2
This commit is contained in:
kirillsaint 2023-09-01 22:18:56 +06:00 committed by GitHub
commit 6bdd715e2a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 3 deletions

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) {
@ -229,7 +230,7 @@ public abstract class GuiPlayerTabOverlayMixin {
if (scoreObjectiveIn != null && networkplayerinfo1.getGameType() != WorldSettings.GameType.SPECTATOR)
{
int k5 = j2 + 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)