Skip to content
This repository has been archived by the owner on Jul 2, 2023. It is now read-only.

Commit

Permalink
[create release] Hide level when player name is hidden
Browse files Browse the repository at this point in the history
  • Loading branch information
TheKodeToad committed Dec 10, 2021
1 parent 3cfef1e commit 6fe3574
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;

import me.mcblueparrot.client.mod.impl.hypixeladditions.HypixelAdditionsMod;
import net.minecraft.client.Minecraft;
import net.minecraft.client.entity.AbstractClientPlayer;
import net.minecraft.client.renderer.entity.Render;
import net.minecraft.client.renderer.entity.RenderManager;
Expand All @@ -26,16 +27,13 @@ public void renderLevelhead(AbstractClientPlayer entityIn, double x, double y, d
float p_177069_9_, double p_177069_10_, CallbackInfo callback) {
if(HypixelAdditionsMod.isEffective()) {
String levelhead = HypixelAdditionsMod.instance.getLevelhead(entityIn.getUniqueID());
if(levelhead != null) {
renderLivingLabel(
entityIn,
EnumChatFormatting.AQUA + "Level: " + EnumChatFormatting.YELLOW + levelhead,
x,
y + ((double) ((float)this.getFontRendererFromRenderManager().FONT_HEIGHT
* 1.15F * p_177069_9_)),
z,
64
);
if (levelhead != null && !(entityIn.getDisplayName().getFormattedText().contains(
EnumChatFormatting.OBFUSCATED.toString()) && entityIn != Minecraft.getMinecraft().thePlayer)) {
renderLivingLabel(entityIn,
EnumChatFormatting.AQUA + "Level: " + EnumChatFormatting.YELLOW + levelhead, x,
y + ((double) ((float) this.getFontRendererFromRenderManager().FONT_HEIGHT * 1.15F
* p_177069_9_)),
z, 64);
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Sol Client",
"version": "1.5.1",
"version": "1.5.2",
"description": "Simple and easy to use Minecraft client.",
"main": "main.js",
"scripts": {
Expand Down

0 comments on commit 6fe3574

Please sign in to comment.