|
@@ -23,29 +23,29 @@ public abstract class InGameHudMixin {
|
|
|
|
|
|
@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 (Config.getInstance().shouldHide(HidePart.SIDEBAR, objective)) {
|
|
|
|
|
|
+ if (Config.SIDEBAR.HIDING.shouldHide(HidePart.SIDEBAR, objective)) {
|
|
ci.cancel();
|
|
ci.cancel();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@ModifyVariable(method = "renderScoreboardSidebar", at = @At("STORE"))
|
|
@ModifyVariable(method = "renderScoreboardSidebar", at = @At("STORE"))
|
|
private String uglyscoreboardfix$modifyScore(String score, MatrixStack matrices, ScoreboardObjective objective) {
|
|
private String uglyscoreboardfix$modifyScore(String score, MatrixStack matrices, ScoreboardObjective objective) {
|
|
- return Config.getInstance().shouldHide(HidePart.SCORES, objective) ? "" : score;
|
|
|
|
|
|
+ return Config.SIDEBAR.HIDING.shouldHide(HidePart.SCORES, objective) ? "" : score;
|
|
}
|
|
}
|
|
|
|
|
|
@ModifyVariable(method = "renderScoreboardSidebar", at = @At("STORE"), ordinal = 2)
|
|
@ModifyVariable(method = "renderScoreboardSidebar", at = @At("STORE"), ordinal = 2)
|
|
private int uglyscoreboardfix$modifySeperatorWidth(int seperatorWidth, MatrixStack matrices, ScoreboardObjective objective) {
|
|
private int uglyscoreboardfix$modifySeperatorWidth(int seperatorWidth, MatrixStack matrices, ScoreboardObjective objective) {
|
|
- return Config.getInstance().shouldHide(HidePart.SCORES, objective) ? 0 : seperatorWidth;
|
|
|
|
|
|
+ return Config.SIDEBAR.HIDING.shouldHide(HidePart.SCORES, objective) ? 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 Config.getInstance().shouldHide(HidePart.SCORES, objective) ? 0 : textRenderer.getWidth(score);
|
|
|
|
|
|
+ return Config.SIDEBAR.HIDING.shouldHide(HidePart.SCORES, objective) ? 0 : textRenderer.getWidth(score);
|
|
}
|
|
}
|
|
|
|
|
|
@ModifyVariable(method = "renderScoreboardSidebar", at = @At("STORE"), ordinal = 5)
|
|
@ModifyVariable(method = "renderScoreboardSidebar", at = @At("STORE"), ordinal = 5)
|
|
private int uglyscoreboardfix$modifyX1(int x1) {
|
|
private int uglyscoreboardfix$modifyX1(int x1) {
|
|
- if (Config.getInstance().getPosition() == SidebarPosition.LEFT) {
|
|
|
|
|
|
+ if (Config.SIDEBAR.getPosition() == SidebarPosition.LEFT) {
|
|
xShift = x1;
|
|
xShift = x1;
|
|
return 2;
|
|
return 2;
|
|
}
|
|
}
|
|
@@ -54,7 +54,7 @@ public abstract class InGameHudMixin {
|
|
|
|
|
|
@ModifyVariable(method = "renderScoreboardSidebar", at = @At("STORE"), ordinal = 11)
|
|
@ModifyVariable(method = "renderScoreboardSidebar", at = @At("STORE"), ordinal = 11)
|
|
private int uglyscoreboardfix$modifyX2(int x2) {
|
|
private int uglyscoreboardfix$modifyX2(int x2) {
|
|
- if (Config.getInstance().getPosition() == SidebarPosition.LEFT) {
|
|
|
|
|
|
+ if (Config.SIDEBAR.getPosition() == SidebarPosition.LEFT) {
|
|
return x2 - xShift;
|
|
return x2 - xShift;
|
|
}
|
|
}
|
|
return x2;
|
|
return x2;
|