|
@@ -18,24 +18,24 @@ public abstract class MixinInGameHud {
|
|
|
|
|
|
@Inject(method = "renderScoreboardSidebar", at = @At("HEAD"), cancellable = true)
|
|
@Inject(method = "renderScoreboardSidebar", at = @At("HEAD"), cancellable = true)
|
|
private void uglyscoreboardfix$modifySidebar(MatrixStack matrices, ScoreboardObjective objective, CallbackInfo ci) {
|
|
private void uglyscoreboardfix$modifySidebar(MatrixStack matrices, ScoreboardObjective objective, CallbackInfo ci) {
|
|
- if (UglyScoreboardFix.getInstance().getHide(objective) == Hide.SIDEBAR) {
|
|
|
|
|
|
+ if (UglyScoreboardFix.getHide(objective) == Hide.SIDEBAR) {
|
|
ci.cancel();
|
|
ci.cancel();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@ModifyVariable(method = "renderScoreboardSidebar", at = @At(value = "STORE"))
|
|
@ModifyVariable(method = "renderScoreboardSidebar", at = @At(value = "STORE"))
|
|
private String uglyscoreboardfix$modifyScore(String score, MatrixStack matrices, ScoreboardObjective objective) {
|
|
private String uglyscoreboardfix$modifyScore(String score, MatrixStack matrices, ScoreboardObjective objective) {
|
|
- return UglyScoreboardFix.getInstance().getHide(objective) == Hide.SCORES ? "" : score;
|
|
|
|
|
|
+ return UglyScoreboardFix.getHide(objective) == Hide.SCORES ? "" : score;
|
|
}
|
|
}
|
|
|
|
|
|
@ModifyVariable(method = "renderScoreboardSidebar", at = @At(value = "STORE"), ordinal = 2)
|
|
@ModifyVariable(method = "renderScoreboardSidebar", at = @At(value = "STORE"), ordinal = 2)
|
|
private int uglyscoreboardfix$modifySeperatorWidth(int seperatorWidth, MatrixStack matrices, ScoreboardObjective objective) {
|
|
private int uglyscoreboardfix$modifySeperatorWidth(int seperatorWidth, MatrixStack matrices, ScoreboardObjective objective) {
|
|
- return UglyScoreboardFix.getInstance().getHide(objective) == Hide.SCORES ? 0 : seperatorWidth;
|
|
|
|
|
|
+ return UglyScoreboardFix.getHide(objective) == Hide.SCORES ? 0 : seperatorWidth;
|
|
}
|
|
}
|
|
|
|
|
|
@Redirect(method = "renderScoreboardSidebar", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/font/TextRenderer;getWidth(Ljava/lang/String;)I", ordinal = 1))
|
|
@Redirect(method = "renderScoreboardSidebar", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/font/TextRenderer;getWidth(Ljava/lang/String;)I", ordinal = 1))
|
|
private int uglyscoreboardfix$modifyScoreWidth(TextRenderer textRenderer, String score, MatrixStack matrices, ScoreboardObjective objective) {
|
|
private int uglyscoreboardfix$modifyScoreWidth(TextRenderer textRenderer, String score, MatrixStack matrices, ScoreboardObjective objective) {
|
|
- return UglyScoreboardFix.getInstance().getHide(objective) == Hide.SCORES ? 0 : textRenderer.getWidth(score);
|
|
|
|
|
|
+ return UglyScoreboardFix.getHide(objective) == Hide.SCORES ? 0 : textRenderer.getWidth(score);
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|