Armor Stand Nametag Renderer

This commit is contained in:
kirillsaint 2023-09-15 10:49:07 +06:00
parent 0c7bd992ee
commit 318a7a5590
2 changed files with 2 additions and 7 deletions

View File

@ -1,17 +1,11 @@
package net.silentclient.client.mixin.mixins;
import net.minecraft.client.Minecraft;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.renderer.entity.ArmorStandRenderer;
import net.minecraft.client.renderer.entity.RenderManager;
import net.minecraft.client.renderer.entity.RendererLivingEntity;
import net.minecraft.entity.Entity;
import net.minecraft.entity.item.EntityArmorStand;
import net.minecraft.util.ResourceLocation;
import net.silentclient.client.Client;
import net.silentclient.client.mods.render.NametagsMod;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;

View File

@ -85,7 +85,8 @@ public class RendererLivingEntityMixin<T extends EntityLivingBase> {
ci.cancel();
}
}
if(Client.getInstance().getSettingsManager().getSettingByClass(FPSBoostMod.class, "Hide Armor Stands").getValBoolean() && entity instanceof EntityArmorStand) {
if(entity instanceof EntityArmorStand && Client.getInstance().getSettingsManager().getSettingByClass(FPSBoostMod.class, "Hide Armor Stands").getValBoolean()) {
((RendererLivingEntity<EntityArmorStand>) (Object) this).renderName((EntityArmorStand) entity, x, y, z);
ci.cancel();
}
}