Skip to content

Commit 35e82a0

Browse files
committed
Update to mc1.21.4
1 parent 9249927 commit 35e82a0

File tree

9 files changed

+45
-30
lines changed

9 files changed

+45
-30
lines changed

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
@@ -323,6 +323,7 @@ private static class FormatCodes {
323323
Style createStyle() {
324324
return StyleAccessor.chatnotify$new(
325325
color == null ? null : TextColor.fromLegacyFormat(color),
326+
null,
326327
bold ? true : null,
327328
italic ? true : null,
328329
underline ? true : null,

gradle.properties

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -55,37 +55,37 @@ mod_curseforge_slug=chatnotify
5555
# Subproject Build Compatibility
5656
# -> Comment out or unset to disable publishing of a subproject.
5757
mod_loaders_fabric=fabric
58-
mc_versions_fabric=1.21.2,1.21.3
58+
mc_versions_fabric=1.21.4
5959
mod_loaders_neoforge=neoforge
60-
mc_versions_neoforge=1.21.3
60+
mc_versions_neoforge=1.21.4
6161

6262
# Java
6363
java_version=21
6464
java_versions_fabric=>=21
6565
java_versions_neoforge=[21,)
6666

6767
# Minecraft
68-
minecraft_version=1.21.3
69-
minecraft_versions_fabric=>1.21.1
70-
minecraft_versions_neoforge=[1.21.3,)
68+
minecraft_version=1.21.4
69+
minecraft_versions_fabric=>1.21.3
70+
minecraft_versions_neoforge=[1.21.4,)
7171

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

7676
# Fabric https://fabricmc.net/develop
7777
# -> See also 'mixinextras_jij_fabric'
7878
fabric_loader_version=0.17.2
7979
fabric_loader_versions=>=0.17.0
80-
fabric_api_version=0.114.1+1.21.3
80+
fabric_api_version=0.119.4+1.21.4
8181
fabric_api_versions=*
8282

8383
# NeoForge https://projects.neoforged.net/neoforged/neoforge
8484
# -> See also 'mixinextras_jij_neoforge'
85-
neoforge_version=21.3.93
86-
neoforge_versions=[21.3.88,)
85+
neoforge_version=21.4.154
86+
neoforge_versions=[21.4.149,)
8787
# NeoForm https://projects.neoforged.net/neoforged/neoform
88-
neoform_version=1.21.3-20241023.131943
88+
neoform_version=1.21.4-20241203.161809
8989

9090
# Dependency Property Identifiers
9191
# -> These values point to other properties with full dependency specification.
@@ -112,20 +112,20 @@ neoforge_deps=commandkeys,chatheads
112112
d_common_commandkeys=-:-:imp:maven.modrinth:65UyswbY:$v:v_commandkeys_neoforge
113113
d_fabric_commandkeys=-:-:imp:maven.modrinth:65UyswbY:$v:v_commandkeys_fabric
114114
d_neoforge_commandkeys=-:-:imp:maven.modrinth:65UyswbY:$v:v_commandkeys_neoforge
115-
v_commandkeys_fabric=HeQB0SL8
116-
v_commandkeys_neoforge=RUyG3m7n
115+
v_commandkeys_fabric=s4SwORnD
116+
v_commandkeys_neoforge=qDk3Xi0K
117117

118118
# Chat Heads https://modrinth.com/project/Wb5oqrBJ/versions
119119
d_common_chatheads=-:-:imp:maven.modrinth:Wb5oqrBJ:$v:v_chatheads_neoforge
120120
d_fabric_chatheads=-:-:imp:maven.modrinth:Wb5oqrBJ:$v:v_chatheads_fabric
121121
d_neoforge_chatheads=-:-:imp:maven.modrinth:Wb5oqrBJ:$v:v_chatheads_neoforge
122-
v_chatheads_fabric=m09yVDf6
123-
v_chatheads_neoforge=aRECu0yn
122+
v_chatheads_fabric=p5FIP10y
123+
v_chatheads_neoforge=coszZ1AH
124124

125125
# ModMenu https://modrinth.com/project/mOgUt4GM/versions
126126
d_fabric_modmenu=-:-:imp:maven.modrinth:mOgUt4GM:$v:-,recommends:modmenu,req:mOgUt4GM,req:modmenu
127-
v_modmenu=12.0.0
128-
vr_fabric_modmenu=>=12.0.0-beta.1
127+
v_modmenu=13.0.3
128+
vr_fabric_modmenu=>=13.0.0-beta.1
129129

130130
# Dependency Version Extensions
131131
# -> Intended for addon mods to show which version they were compiled against.

0 commit comments

Comments
 (0)