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

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.AbstractClientPlayerExt;
import net.silentclient.client.mixin.ducks.TextureManagerExt; import net.silentclient.client.mixin.ducks.TextureManagerExt;
import net.silentclient.client.mods.render.TabMod; import net.silentclient.client.mods.render.TabMod;
import net.silentclient.client.utils.ColorUtils;
import net.silentclient.client.utils.Players; import net.silentclient.client.utils.Players;
import org.spongepowered.asm.mixin.Final; import org.spongepowered.asm.mixin.Final;
import org.spongepowered.asm.mixin.Mixin; 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)); 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()); this.mc.getTextureManager().bindTexture(((AbstractClientPlayerExt) entityplayer).silent$getPlayerIcon().getLocation());
GlStateManager.color(1.0f, 1.0f, 1.0f); Gui.drawModalRectWithCustomSizedTexture(j2, k2, 8, 8, 8, 8, 8, 8);
drawModalRectWithCustomSizedTexture(j2 + 0.5F, k2, 0.0f, 0.0f, 8.0f, 8.0f, 8.0f, 8.0f);
j2 += 9; j2 += 9;
} }
} catch (Exception err) { } catch (Exception err) {
@ -229,7 +230,7 @@ public abstract class GuiPlayerTabOverlayMixin {
if (scoreObjectiveIn != null && networkplayerinfo1.getGameType() != WorldSettings.GameType.SPECTATOR) 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; int l5 = k5 + l;
if (l5 - k5 > 5) if (l5 - k5 > 5)