|
@@ -21,29 +21,29 @@ public abstract class InGameHudMixin {
|
|
|
|
|
|
@Inject(method = "renderScoreboardSidebar", at = @At("HEAD"), cancellable = true)
|
|
@Inject(method = "renderScoreboardSidebar", at = @At("HEAD"), cancellable = true)
|
|
private void uglyscoreboardfix$hide(MatrixStack matrices, ScoreboardObjective objective, CallbackInfo ci) {
|
|
private void uglyscoreboardfix$hide(MatrixStack matrices, ScoreboardObjective objective, CallbackInfo ci) {
|
|
- if (Config.sidebar.hiding.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.sidebar.hiding.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.sidebar.hiding.shouldHide(HidePart.SCORES, objective) ? 0 : seperatorWidth;
|
|
|
|
|
|
+ return Config.Sidebar.Hiding.shouldHide(HidePart.SCORES, objective) ? 0 : seperatorWidth;
|
|
}
|
|
}
|
|
|
|
|
|
@Redirect(method = "renderScoreboardSidebar", slice = @Slice(from = @At(value = "INVOKE", target = "Ljava/util/Iterator;hasNext()Z")), at = @At(value = "INVOKE", target = "Lnet/minecraft/client/font/TextRenderer;getWidth(Ljava/lang/String;)I", ordinal = 0))
|
|
@Redirect(method = "renderScoreboardSidebar", slice = @Slice(from = @At(value = "INVOKE", target = "Ljava/util/Iterator;hasNext()Z")), at = @At(value = "INVOKE", target = "Lnet/minecraft/client/font/TextRenderer;getWidth(Ljava/lang/String;)I", ordinal = 0))
|
|
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.sidebar.hiding.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(value = "STORE", ordinal = 0), ordinal = 5)
|
|
@ModifyVariable(method = "renderScoreboardSidebar", at = @At(value = "STORE", ordinal = 0), ordinal = 5)
|
|
private int uglyscoreboardfix$modifyX1(int x1) {
|
|
private int uglyscoreboardfix$modifyX1(int x1) {
|
|
- if (Config.sidebar.getPosition() == SidebarPosition.LEFT) {
|
|
|
|
|
|
+ if (Config.Sidebar.getPosition() == SidebarPosition.LEFT) {
|
|
xShift = x1;
|
|
xShift = x1;
|
|
return 2;
|
|
return 2;
|
|
}
|
|
}
|
|
@@ -52,7 +52,7 @@ public abstract class InGameHudMixin {
|
|
|
|
|
|
@ModifyVariable(method = "renderScoreboardSidebar", at = @At(value = "STORE", ordinal = 0), ordinal = 11)
|
|
@ModifyVariable(method = "renderScoreboardSidebar", at = @At(value = "STORE", ordinal = 0), ordinal = 11)
|
|
private int uglyscoreboardfix$modifyX2(int x2) {
|
|
private int uglyscoreboardfix$modifyX2(int x2) {
|
|
- if (Config.sidebar.getPosition() == SidebarPosition.LEFT) {
|
|
|
|
|
|
+ if (Config.Sidebar.getPosition() == SidebarPosition.LEFT) {
|
|
return x2 - xShift;
|
|
return x2 - xShift;
|
|
}
|
|
}
|
|
return x2;
|
|
return x2;
|
|
@@ -60,27 +60,27 @@ public abstract class InGameHudMixin {
|
|
|
|
|
|
@ModifyVariable(method = "renderScoreboardSidebar", at = @At(value = "STORE", ordinal = 0), ordinal = 8)
|
|
@ModifyVariable(method = "renderScoreboardSidebar", at = @At(value = "STORE", ordinal = 0), ordinal = 8)
|
|
private int uglyscoreboardfix$modifyHeadingBackgroundColor(int color) {
|
|
private int uglyscoreboardfix$modifyHeadingBackgroundColor(int color) {
|
|
- return Config.sidebar.background.getHeadingColor();
|
|
|
|
|
|
+ return Config.Sidebar.Background.getHeadingColor();
|
|
}
|
|
}
|
|
|
|
|
|
@ModifyVariable(method = "renderScoreboardSidebar", at = @At(value = "STORE", ordinal = 0), ordinal = 7)
|
|
@ModifyVariable(method = "renderScoreboardSidebar", at = @At(value = "STORE", ordinal = 0), ordinal = 7)
|
|
private int uglyscoreboardfix$modifyBackgroundColor(int color) {
|
|
private int uglyscoreboardfix$modifyBackgroundColor(int color) {
|
|
- return Config.sidebar.background.getColor();
|
|
|
|
|
|
+ return Config.Sidebar.Background.getColor();
|
|
}
|
|
}
|
|
|
|
|
|
@ModifyArg(method = "renderScoreboardSidebar", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/font/TextRenderer;draw(Lnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/text/Text;FFI)I", ordinal = 1), index = 4)
|
|
@ModifyArg(method = "renderScoreboardSidebar", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/font/TextRenderer;draw(Lnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/text/Text;FFI)I", ordinal = 1), index = 4)
|
|
private int uglyscoreboardfix$modifyHeadingColor(int color) {
|
|
private int uglyscoreboardfix$modifyHeadingColor(int color) {
|
|
- return Config.sidebar.text.getHeadingColor().getRgb();
|
|
|
|
|
|
+ return Config.Sidebar.Text.getHeadingColor().getRgb();
|
|
}
|
|
}
|
|
|
|
|
|
@ModifyArg(method = "renderScoreboardSidebar", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/font/TextRenderer;draw(Lnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/text/Text;FFI)I", ordinal = 0), index = 4)
|
|
@ModifyArg(method = "renderScoreboardSidebar", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/font/TextRenderer;draw(Lnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/text/Text;FFI)I", ordinal = 0), index = 4)
|
|
private int uglyscoreboardfix$modifyTextColor(int color) {
|
|
private int uglyscoreboardfix$modifyTextColor(int color) {
|
|
- return Config.sidebar.text.getColor().getRgb();
|
|
|
|
|
|
+ return Config.Sidebar.Text.getColor().getRgb();
|
|
}
|
|
}
|
|
|
|
|
|
@Redirect(method = "renderScoreboardSidebar", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/font/TextRenderer;draw(Lnet/minecraft/client/util/math/MatrixStack;Ljava/lang/String;FFI)I", ordinal = 0))
|
|
@Redirect(method = "renderScoreboardSidebar", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/font/TextRenderer;draw(Lnet/minecraft/client/util/math/MatrixStack;Ljava/lang/String;FFI)I", ordinal = 0))
|
|
private int uglyscoreboardfix$modifyScoreColor(TextRenderer textRenderer, MatrixStack matrices, String text, float x, float y, int color) {
|
|
private int uglyscoreboardfix$modifyScoreColor(TextRenderer textRenderer, MatrixStack matrices, String text, float x, float y, int color) {
|
|
- return textRenderer.draw(matrices, Formatting.strip(text), x, y, Config.sidebar.text.getScoreColor().getRgb());
|
|
|
|
|
|
+ return textRenderer.draw(matrices, Formatting.strip(text), x, y, Config.Sidebar.Text.getScoreColor().getRgb());
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|