From fa2afc85362a7ccd4498d2bda8d3ef2076baecd5 Mon Sep 17 00:00:00 2001 From: ev chang Date: Sat, 3 Aug 2024 20:18:26 +0900 Subject: [PATCH] Fix self preview nametag with PolyNametag --- build.gradle.kts | 2 +- .../evergreenhud/mixins/RendererLivingEntityMixin.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 3d96dd8..e899990 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -103,7 +103,7 @@ dependencies { // If we are building for legacy forge, includes the launch wrapper with `shade` as we configured earlier. if (platform.isLegacyForge) { compileOnly("org.spongepowered:mixin:0.7.11-SNAPSHOT") - shade("cc.polyfrost:oneconfig-wrapper-launchwrapper:1.0.0-beta+") + shade("cc.polyfrost:oneconfig-wrapper-launchwrapper:1.0.0-beta17") } } diff --git a/src/main/java/org/polyfrost/evergreenhud/mixins/RendererLivingEntityMixin.java b/src/main/java/org/polyfrost/evergreenhud/mixins/RendererLivingEntityMixin.java index 52f52fe..e6d145a 100644 --- a/src/main/java/org/polyfrost/evergreenhud/mixins/RendererLivingEntityMixin.java +++ b/src/main/java/org/polyfrost/evergreenhud/mixins/RendererLivingEntityMixin.java @@ -14,8 +14,8 @@ public class RendererLivingEntityMixin { @Inject(method = "canRenderName(Lnet/minecraft/entity/EntityLivingBase;)Z", at = @At("HEAD"), cancellable = true) private void onCanRenderName(CallbackInfoReturnable cir) { - if (ModConfig.INSTANCE.getPlayerPreview().getSelfPreview().getRenderingNametag() && ModConfig.INSTANCE.getPlayerPreview().getSelfPreview().getShowNametag()) { - cir.setReturnValue(true); + if (ModConfig.INSTANCE.getPlayerPreview().getSelfPreview().getRenderingNametag()) { + cir.setReturnValue(ModConfig.INSTANCE.getPlayerPreview().getSelfPreview().getShowNametag()); } }