Skip to content

Commit 8c77a4c

Browse files
committed
fix: fix biome title color not working
1 parent 6358d23 commit 8c77a4c

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

common/src/main/java/com/euphony/better_client/client/events/BiomeTitleEvent.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ private static void renderBiomeTitle(GuiGraphics guiGraphics, Minecraft mc) {
150150
int y = -font.wordWrapHeight(biomeName.getString(), 999) / 2 + config.biomeTitleYOffset;
151151

152152
guiGraphics.drawString(font, biomeName, (-textWidth / 2), y,
153-
0xffffff | (alpha << 24), true);
153+
config.biomeTitleColor | (alpha << 24), true);
154154
pose.popMatrix();
155155
}
156156

common/src/main/java/com/euphony/better_client/config/screen/category/ScreenConfigScreen.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -105,14 +105,14 @@ public static Screen generateScreen(Screen parent) {
105105
.range(-60, 60))
106106
.build();
107107

108-
Option<Color> colorOpt = ConfigUtils.<Color>getGenericOption("color")
109-
.binding(new Color(DEFAULTS.color, false),
110-
() -> new Color(config.color, false),
111-
newVal -> config.color = newVal.getRGB())
108+
Option<Color> biomeTitleColorOpt = ConfigUtils.<Color>getGenericOption("biomeTitleColor")
109+
.binding(new Color(DEFAULTS.biomeTitleColor, false),
110+
() -> new Color(config.biomeTitleColor, false),
111+
newVal -> config.biomeTitleColor = newVal.getRGB())
112112
.controller(opt -> ColorControllerBuilder.create(opt).allowAlpha(false))
113113
.build();
114114

115-
Option<Double> cooldownTimeOpt = ConfigUtils.<Double>getGenericOption("cooldownTime")
115+
Option<Double> cooldownTimeOpt = ConfigUtils.<Double>getGenericOption("cooldownTime")
116116
.binding(DEFAULTS.cooldownTime,
117117
() -> config.cooldownTime,
118118
newVal -> config.cooldownTime = newVal)
@@ -213,7 +213,7 @@ public static Screen generateScreen(Screen parent) {
213213
fadeOutTimeOpt,
214214
scaleOpt,
215215
biomeTitleYOffset,
216-
colorOpt,
216+
biomeTitleColorOpt,
217217
cooldownTimeOpt,
218218
enableModNameOpt,
219219
enableUndergroundUpdateOpt

common/src/main/resources/assets/better_client/lang/en_us.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@
102102
"yacl3.config.better_client:config.scale.desc": "Title font size.",
103103
"yacl3.config.better_client:config.biomeTitleYOffset": "Y-coordinate Offset",
104104
"yacl3.config.better_client:config.biomeTitleYOffset.desc": "Y-axis offset relative to the screen center minus the title height.",
105-
"yacl3.config.better_client:config.color": "Title Color",
106-
"yacl3.config.better_client:config.color.desc": "Title color.",
105+
"yacl3.config.better_client:config.biomeTitleColor": "Biome Title Color",
106+
"yacl3.config.better_client:config.biomeTitleColor.desc": "Biome Title text color.",
107107
"yacl3.config.better_client:config.cooldownTime": "Cooldown Time",
108108
"yacl3.config.better_client:config.cooldownTime.desc": "When set to 0, entering a new biome switches titles immediately.",
109109
"yacl3.config.better_client:config.enableModName": "Enable Mod Name",

common/src/main/resources/assets/better_client/lang/zh_cn.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@
102102
"yacl3.config.better_client:config.scale.desc": "标题字体大小。",
103103
"yacl3.config.better_client:config.biomeTitleYOffset": "Y 轴坐标偏移",
104104
"yacl3.config.better_client:config.biomeTitleYOffset.desc": "相对于屏幕中心减去标题高度的 Y 轴坐标偏移。",
105-
"yacl3.config.better_client:config.color": "标题颜色",
106-
"yacl3.config.better_client:config.color.desc": "标题颜色",
105+
"yacl3.config.better_client:config.biomeTitleColor": "标题颜色",
106+
"yacl3.config.better_client:config.biomeTitleColor.desc": "标题文字颜色",
107107
"yacl3.config.better_client:config.cooldownTime": "冷却时间",
108108
"yacl3.config.better_client:config.cooldownTime.desc": "当设置为 0 时,进入新生物群系会立即切换标题。",
109109
"yacl3.config.better_client:config.enableModName": "启用模组名称",

0 commit comments

Comments
 (0)