Skip to content

Commit

Permalink
fix: 修复血条显示在不开启相关功能时也会生效的bug
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperSkidder committed Jul 6, 2024
1 parent 3130178 commit 1a0a534
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public void preRender(Entity entity, double x, double y, double z, float entityY

@Inject(method = "renderLivingLabel", at = @At("HEAD"), cancellable = true)
protected void renderLivingLabel(Entity entityIn, String str, double x, double y, double z, int maxDistance, CallbackInfo ci) {
if (LevelTag.health.getValue()) {
if (LevelTag.using && LevelTag.health.getValue()) {
double d = entityIn.getDistanceSq(this.renderManager.renderViewEntity);
if (d < 100) {
float f = 1.6F;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public void doRender(Entity entity, double x, double y, double z, float entityYa

@Inject(method = "renderLivingLabel", at = @At("HEAD"), cancellable = true)
protected void renderLivingLabel(Entity entityIn, String str, double x, double y, double z, int maxDistance, CallbackInfo ci) {
if (LevelTag.health.getValue()) {
if (LevelTag.using && LevelTag.health.getValue()) {
double d = entityIn.getDistanceSqToEntity(this.renderManager.livingPlayer);
if (d < 100) {
float f = 1.6F;
Expand Down

0 comments on commit 1a0a534

Please sign in to comment.