Skip to content

Commit b26b2c5

Browse files
committed
Update to mc1.21.4
1 parent 79ef8d8 commit b26b2c5

9 files changed

Lines changed: 45 additions & 30 deletions

File tree

common/src/main/java/dev/terminalmc/chatnotify/config/TextStyle.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ public boolean isEnabled() {
114114
public Style getStyle() {
115115
return StyleAccessor.chatnotify$new(
116116
doColor ? TextColor.fromRgb(color) : null,
117+
null,
117118
bold != FormatMode.DISABLED ? bold == FormatMode.ON : null,
118119
italic != FormatMode.DISABLED ? italic == FormatMode.ON : null,
119120
underlined != FormatMode.DISABLED ? underlined == FormatMode.ON : null,

common/src/main/java/dev/terminalmc/chatnotify/gui/widget/ExpandingList.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ public int getRowWidth() {
154154
}
155155

156156
@Override
157-
protected int getScrollbarPosition() {
157+
protected int scrollBarX() {
158158
return getX() + width - SCROLLBAR_WIDTH;
159159
}
160160

common/src/main/java/dev/terminalmc/chatnotify/gui/widget/HorizontalList.java

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ public void setHeight(int height) {
218218
@Override
219219
public void setSize(int width, int height) {
220220
super.setSize(Math.max(width, MIN_WIDTH), Math.max(height, MIN_HEIGHT));
221-
clampScrollAmount();
221+
refreshScrollAmount();
222222
}
223223

224224
public void setBounds(int width, int height, int x, int y) {
@@ -294,9 +294,9 @@ protected void renderChildren(GuiGraphics graphics, int mouseX, int mouseY, floa
294294
/**
295295
* Renders the scrollbar, if required.
296296
*/
297-
protected void renderScrollbar(GuiGraphics graphics) {
297+
protected void renderScrollbar(@NotNull GuiGraphics graphics) {
298298
if (scrollbarVisible()) {
299-
int y = getScrollbarPosition();
299+
int y = scrollBarX();
300300

301301
int scrollerWidth =
302302
(int) ((float) (getWidth() * getWidth()) / (float) getMaxPosition());
@@ -475,11 +475,11 @@ public boolean mouseScrolled(double mouseX, double mouseY, double scrollX, doubl
475475

476476
protected void updateScrollingState(double mouseX, double mouseY, int button) {
477477
scrolling =
478-
button == 0 && mouseY >= getScrollbarPosition() && mouseY < (getScrollbarPosition()
478+
button == 0 && mouseY >= scrollBarX() && mouseY < (scrollBarX()
479479
+ SCROLLBAR_HEIGHT) && mouseX >= getX() && mouseX < getRight();
480480
}
481481

482-
protected int getScrollbarPosition() {
482+
protected int scrollBarX() {
483483
return topScrollbar ? getY() : getY() + getHeight() - SCROLLBAR_HEIGHT;
484484
}
485485

@@ -500,7 +500,7 @@ public void setScrollAmount(double scroll) {
500500
setClampedScrollAmount(scroll);
501501
}
502502

503-
public void clampScrollAmount() {
503+
public void refreshScrollAmount() {
504504
setClampedScrollAmount(scrollAmount);
505505
}
506506

@@ -512,6 +512,18 @@ public int getMaxScroll() {
512512
return Math.max(0, getMaxPosition() - getWidth());
513513
}
514514

515+
@Override
516+
protected int contentHeight() {
517+
// Not currently used
518+
return 0;
519+
}
520+
521+
@Override
522+
protected double scrollRate() {
523+
// Not currently used
524+
return 0;
525+
}
526+
515527
// Narration
516528

517529
public NarratableEntry.@NotNull NarrationPriority narrationPriority() {

common/src/main/java/dev/terminalmc/chatnotify/gui/widget/field/FakeTextField.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public FakeTextField(int x, int y, int width, int height, Runnable onClick) {
3434
}
3535

3636
@Override
37-
public boolean clicked(double mouseX, double mouseY) {
37+
public boolean isMouseOver(double mouseX, double mouseY) {
3838
// Skip the 'active' requirement
3939
return (visible
4040
&& mouseX >= (double) getX()
@@ -46,7 +46,7 @@ public boolean clicked(double mouseX, double mouseY) {
4646

4747
@Override
4848
public boolean mouseClicked(double mouseX, double mouseY, int button) {
49-
if (clicked(mouseX, mouseY)) {
49+
if (isMouseOver(mouseX, mouseY)) {
5050
onClick(mouseX, mouseY);
5151
return true;
5252
}

common/src/main/java/dev/terminalmc/chatnotify/gui/widget/list/FilterList.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ protected void refreshSubList() {
180180
}
181181
}
182182
tabNameUpdate.run();
183-
clampScrollAmount();
183+
refreshScrollAmount();
184184
}
185185

186186
@FunctionalInterface

common/src/main/java/dev/terminalmc/chatnotify/gui/widget/list/OptionList.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ protected void updateElementBounds() {
122122
* Initializes the {@link OptionList}.
123123
*/
124124
protected void init() {
125-
double scrollAmount = getScrollAmount();
125+
double scrollAmount = scrollAmount();
126126

127127
clearEntries();
128128
setFocused(null);
@@ -178,12 +178,12 @@ public int getRowWidth() {
178178
}
179179

180180
@Override
181-
protected int getScrollbarPosition() {
181+
protected int scrollBarX() {
182182
return width / 2 + rowWidth / 2;
183183
}
184184

185185
@Override
186-
protected boolean isValidMouseClick(int button) {
186+
protected boolean isValidClickButton(int button) {
187187
return button == 0 || button == 1;
188188
}
189189

common/src/main/java/dev/terminalmc/chatnotify/mixin/accessor/StyleAccessor.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ public interface StyleAccessor {
3131
@Invoker("<init>")
3232
static Style chatnotify$new(
3333
@Nullable TextColor color,
34+
@Nullable Integer shadowColor,
3435
@Nullable Boolean bold,
3536
@Nullable Boolean italic,
3637
@Nullable Boolean underlined,

common/src/main/java/dev/terminalmc/chatnotify/util/text/FormatUtil.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,7 @@ private static class FormatCodes {
302302
Style createStyle() {
303303
return StyleAccessor.chatnotify$new(
304304
color == null ? null : TextColor.fromLegacyFormat(color),
305+
null,
305306
bold ? true : null,
306307
italic ? true : null,
307308
underline ? true : null,

gradle.properties

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ mod_curseforge_slug=chatnotify
4343
# Subproject Build Compatibility
4444
# -> Comment out or unset to disable publishing of a subproject.
4545
mod_loaders_fabric=fabric
46-
mc_versions_fabric=1.21.2,1.21.3
46+
mc_versions_fabric=1.21.4
4747
mod_loaders_neoforge=neoforge
48-
mc_versions_neoforge=1.21.3
48+
mc_versions_neoforge=1.21.4
4949

5050
# Links
5151
homepage_url=https://modrinth.com/mod/Iudurxl8
@@ -64,19 +64,19 @@ java_versions_fabric=>=21
6464
java_versions_neoforge=[21,)
6565

6666
# Minecraft
67-
minecraft_version=1.21.3
68-
minecraft_versions_fabric=>1.21.1
69-
minecraft_versions_neoforge=[1.21.3,)
67+
minecraft_version=1.21.4
68+
minecraft_versions_fabric=>1.21.3
69+
minecraft_versions_neoforge=[1.21.4,)
7070

7171
# Parchment https://parchmentmc.org/docs/getting-started#choose-a-version
72-
parchment_minecraft_version=1.21.3
73-
parchment_version=2024.12.07
72+
parchment_minecraft_version=1.21.4
73+
parchment_version=2025.03.23
7474

7575
# Fabric https://fabricmc.net/develop
7676
# -> See also 'mixinextras_jij_fabric'
7777
fabric_loader_version=0.16.14
7878
fabric_loader_versions=>=0.16.1
79-
fabric_api_version=0.114.1+1.21.3
79+
fabric_api_version=0.119.3+1.21.4
8080
fabric_api_versions=*
8181
# Entry Points
8282
fabric_entrypoints_main=
@@ -86,10 +86,10 @@ fabric_entrypoints_modmenu=dev.terminalmc.chatnotify.compat.modmenu.ModMenuImpl
8686

8787
# NeoForge https://projects.neoforged.net/neoforged/neoforge
8888
# -> See also 'mixinextras_jij_neoforge'
89-
neoforge_version=21.3.80
90-
neoforge_versions=[21.3.0-beta,)
89+
neoforge_version=21.4.141
90+
neoforge_versions=[21.4.0-beta,)
9191
# NeoForm https://projects.neoforged.net/neoforged/neoform
92-
neoform_version=1.21.3-20241023.131943
92+
neoform_version=1.21.4-20241203.161809
9393

9494
# Dependency Version Extensions
9595
# -> Intended for addon mods to show which version they were compiled against.
@@ -123,20 +123,20 @@ neoforge_deps=commandkeys,chatheads
123123
d_common_commandkeys=-:-:imp:maven.modrinth:65UyswbY:$v:v_commandkeys_neoforge
124124
d_fabric_commandkeys=-:-:imp:maven.modrinth:65UyswbY:$v:v_commandkeys_fabric
125125
d_neoforge_commandkeys=-:-:imp:maven.modrinth:65UyswbY:$v:v_commandkeys_neoforge
126-
v_commandkeys_fabric=BTegMEO8
127-
v_commandkeys_neoforge=PWiUgUsv
126+
v_commandkeys_fabric=AMSb1QpK
127+
v_commandkeys_neoforge=YDRcsTmY
128128

129129
# Chat Heads https://modrinth.com/mod/Wb5oqrBJ/versions
130130
d_common_chatheads=-:-:imp:maven.modrinth:Wb5oqrBJ:$v:v_chatheads_neoforge
131131
d_fabric_chatheads=-:-:imp:maven.modrinth:Wb5oqrBJ:$v:v_chatheads_fabric
132132
d_neoforge_chatheads=-:-:imp:maven.modrinth:Wb5oqrBJ:$v:v_chatheads_neoforge
133-
v_chatheads_fabric=UvaxwNU8
134-
v_chatheads_neoforge=dubnK548
133+
v_chatheads_fabric=pynY5al1
134+
v_chatheads_neoforge=uv67my88
135135

136136
# ModMenu https://modrinth.com/mod/mOgUt4GM/versions
137137
d_fabric_modmenu=-:-:imp:maven.modrinth:mOgUt4GM:$v:-,recommends:modmenu,req:mOgUt4GM,req:modmenu
138-
v_modmenu=12.0.0
139-
vr_fabric_modmenu=>=12.0.0-beta.1
138+
v_modmenu=13.0.3
139+
vr_fabric_modmenu=>=13.0.0-beta.1
140140

141141
# Mixin https://mvnrepository.com/artifact/org.spongepowered/mixin
142142
mixin_version=0.8.7

0 commit comments

Comments
 (0)