Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .bugs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# Please run `./gradlew generatePatchedTable` to update PATCHED.md based on this file
# Try not to re-order this file (it sorts itself!), put additions at the end of each section - this helps with git conflicts

patched 307012 client basic
patched 577 client basic
patched 4490 client basic
patched 12062 client basic
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/*
* Copyright (C) 2026 The Debugify Contributors
*
* SPDX-License-Identifier: LGPL-3.0-or-later
*/
package dev.isxander.debugify.mixins.basic.mc307012;

import dev.isxander.debugify.fixes.BugFix;
import dev.isxander.debugify.fixes.FixCategory;
import net.minecraft.network.chat.Component;
import net.minecraft.world.entity.Avatar;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.scores.DisplaySlot;
import net.minecraft.world.scores.Objective;
import net.minecraft.world.scores.Scoreboard;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;

@SuppressWarnings("resource")
@BugFix(id = "MC-307012", category = FixCategory.BASIC, env = BugFix.Env.CLIENT, description = "Prevents entities without a score from displaying a zero below their name")
@Mixin(Entity.class)
public class EntityMixin {

@Inject(at = @At("HEAD"), method = "belowNameDisplay", cancellable = true)
public void belowNameDisplay(CallbackInfoReturnable<Component> ci) {
Entity self = (Entity) (Object) this;
if (self instanceof Avatar) {
return;
}
Scoreboard scoreboard = self.level().getScoreboard();
Objective objective = scoreboard.getDisplayObjective(DisplaySlot.BELOW_NAME);
if (objective != null && scoreboard.getPlayerScoreInfo(self, objective) == null) {
ci.setReturnValue(null);
ci.cancel();
}
}

}
3 changes: 2 additions & 1 deletion src/main/resources/assets/debugify/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,5 +96,6 @@
"debugify.fix_effect.mc-272431": "Prevents zero and one-cycling the dragon as the dragon will no longer slowly perch on the end fountain or above travel nodes.",
"debugify.fix_explanation.mc-297837": "Only use horizontal distance when calculating which waypoint transmitter to use, since large distances use azimuthal distance, which guesses pitch via horizon angle.",
"debugify.fix_effect.mc-297837": "This allows clients to get exact position of players even when they are far away, but only vertically.",
"debugify.fix_explanation.mc-299115": "The owner's reference is converted to an entity on deflection. This conversion fails if the owner is offline."
"debugify.fix_explanation.mc-299115": "The owner's reference is converted to an entity on deflection. This conversion fails if the owner is offline.",
"debugify.fix_explanation.mc-307012": "Hides the below-name scoreboard value for entities that do not have a score."
}
1 change: 1 addition & 0 deletions src/main/resources/debugify.mixins.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"minVersion": "0.5.3"
},
"mixins": [
"basic.mc307012.EntityMixin",
"basic.mc100991.FishingHookMixin",
"basic.mc119754.FireworkRocketEntityMixin",
"basic.mc121706.RangedBowAttackGoalMixin",
Expand Down