Skip to content

Commit 580b69f

Browse files
committed
Update to mc1.21.4
1 parent 1e43f66 commit 580b69f

File tree

10 files changed

+33
-32
lines changed

10 files changed

+33
-32
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,8 @@ public boolean isEnabled() {
112112

113113
public Style getStyle() {
114114
return new Style(
115-
doColor ? TextColor.fromRgb(color) : null,
115+
doColor ? TextColor.fromRgb(color) : null,
116+
null,
116117
bold != FormatMode.DISABLED ? bold == FormatMode.ON : null,
117118
italic != FormatMode.DISABLED ? italic == FormatMode.ON : null,
118119
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
@@ -134,7 +134,7 @@ public int getRowWidth() {
134134
}
135135

136136
@Override
137-
protected int getScrollbarPosition() {
137+
protected int scrollBarX() {
138138
return getX() + width - SCROLLBAR_WIDTH;
139139
}
140140

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

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,19 +31,18 @@ public FakeTextField(int x, int y, int width, int height, Runnable onClick) {
3131
this.setTextColor(TEXT_COLOR_PREVIEW);
3232
}
3333

34-
@Override
35-
public boolean clicked(double mouseX, double mouseY) {
34+
public boolean isMouseOver(double mouseX, double mouseY) {
3635
// Skip the 'active' requirement
37-
return (visible
38-
&& mouseX >= (double)getX()
39-
&& mouseY >= (double)getY()
40-
&& mouseX < (double)(getX() + getWidth())
41-
&& mouseY < (double)(getY() + getHeight()));
36+
return this.visible
37+
&& mouseX >= (double)this.getX()
38+
&& mouseY >= (double)this.getY()
39+
&& mouseX < (double)this.getRight()
40+
&& mouseY < (double)this.getBottom();
4241
}
4342

4443
@Override
4544
public boolean mouseClicked(double mouseX, double mouseY, int button) {
46-
if (clicked(mouseX, mouseY)) {
45+
if (isMouseOver(mouseX, mouseY)) {
4746
onClick(mouseX, mouseY);
4847
return true;
4948
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ protected void refreshNotifSubList() {
9999
}
100100
}
101101
}
102-
clampScrollAmount();
102+
refreshScrollAmount();
103103
}
104104

105105
// Sub-screen opening

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ protected void refreshTriggerSubList() {
112112
}
113113
}
114114
}
115-
clampScrollAmount();
115+
refreshScrollAmount();
116116
}
117117

118118
// Sub-screen opening

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
@@ -106,7 +106,7 @@ protected void updateElementBounds() {
106106
* Initializes the {@link OptionList}.
107107
*/
108108
protected void init() {
109-
double scrollAmount = getScrollAmount();
109+
double scrollAmount = scrollAmount();
110110

111111
clearEntries();
112112
setFocused(null);
@@ -157,12 +157,12 @@ public int getRowWidth() {
157157
}
158158

159159
@Override
160-
protected int getScrollbarPosition() {
160+
protected int scrollBarX() {
161161
return width / 2 + rowWidth / 2;
162162
}
163163

164164
@Override
165-
protected boolean isValidMouseClick(int button) {
165+
protected boolean isValidClickButton(int button) {
166166
return button == 0 || button == 1;
167167
}
168168

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,7 @@ private static class FormatCodes {
265265
Style createStyle() {
266266
return new Style(
267267
color == null ? null : TextColor.fromLegacyFormat(color),
268+
null,
268269
bold ? true : null,
269270
italic ? true : null,
270271
underline ? true : null,

common/src/main/resources/META-INF/accesstransformer.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
public net.minecraft.client.OptionInstance$SliderableValueSet
33
public net.minecraft.client.OptionInstance$ValueSet
44
public net.minecraft.network.chat.TextColor formatValue()Ljava/lang/String;
5-
public net.minecraft.network.chat.Style <init>(Lnet/minecraft/network/chat/TextColor;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Lnet/minecraft/network/chat/ClickEvent;Lnet/minecraft/network/chat/HoverEvent;Ljava/lang/String;Lnet/minecraft/resources/ResourceLocation;)V
5+
public net.minecraft.network.chat.Style <init>(Lnet/minecraft/network/chat/TextColor;Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Lnet/minecraft/network/chat/ClickEvent;Lnet/minecraft/network/chat/HoverEvent;Ljava/lang/String;Lnet/minecraft/resources/ResourceLocation;)V

common/src/main/resources/chatnotify.accesswidener

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ accessWidener v2 named
33
accessible class net/minecraft/client/OptionInstance$SliderableValueSet
44
accessible class net/minecraft/client/OptionInstance$ValueSet
55
accessible method net/minecraft/network/chat/TextColor formatValue ()Ljava/lang/String;
6-
accessible method net/minecraft/network/chat/Style <init> (Lnet/minecraft/network/chat/TextColor;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Lnet/minecraft/network/chat/ClickEvent;Lnet/minecraft/network/chat/HoverEvent;Ljava/lang/String;Lnet/minecraft/resources/ResourceLocation;)V
6+
accessible method net/minecraft/network/chat/Style <init> (Lnet/minecraft/network/chat/TextColor;Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;Lnet/minecraft/network/chat/ClickEvent;Lnet/minecraft/network/chat/HoverEvent;Ljava/lang/String;Lnet/minecraft/resources/ResourceLocation;)V

gradle.properties

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -27,36 +27,36 @@ java_versions_fabric=>=21
2727
java_versions_neoforge=[21,)
2828

2929
# Minecraft
30-
minecraft_version=1.21.3
31-
minecraft_versions_fabric=>1.21.1 <1.22
32-
minecraft_versions_neoforge=(1.21.1, 1.22)
30+
minecraft_version=1.21.4
31+
minecraft_versions_fabric=>1.21.3 <1.22
32+
minecraft_versions_neoforge=(1.21.3, 1.22)
3333

3434
# Parchment https://parchmentmc.org/docs/getting-started#choose-a-version
35-
parchment_minecraft_version=1.21.3
36-
parchment_version=2024.12.07
35+
parchment_minecraft_version=1.21.4
36+
parchment_version=2025.01.05
3737

3838
# Fabric https://fabricmc.net/develop
3939
fabric_loader_version=0.16.9
4040
fabric_loader_versions=>=0.15.0
41-
fabric_api_version=0.114.0+1.21.3
41+
fabric_api_version=0.114.3+1.21.4
4242
fabric_api_versions=*
4343

4444
# NeoForge https://projects.neoforged.net/neoforged/neoforge
4545
neoforge_loader_versions=[1,)
46-
neoforge_version=21.3.58
47-
neoforge_versions=[21.2.0-beta, 22)
46+
neoforge_version=21.4.58-beta
47+
neoforge_versions=[21.4.0-beta, 22)
4848
# NeoForm https://projects.neoforged.net/neoforged/neoform
49-
neoform_version=1.21.3-20241023.131943
49+
neoform_version=1.21.4-20241203.161809
5050

5151
# CommandKeys https://modrinth.com/mod/65UyswbY/versions
52-
commandkeys_version=2.3.4+1.21
52+
commandkeys_version=2.3.4+1.21.4
5353

5454
# ChatHeads https://modrinth.com/mod/Wb5oqrBJ/versions
55-
chatheads_version=0.13.7
55+
chatheads_version=0.13.8
5656

5757
# ModMenu https://modrinth.com/mod/mOgUt4GM/versions
58-
modmenu_version=12.0.0
59-
modmenu_versions_fabric=>=12.0.0-beta.1
58+
modmenu_version=13.0.0
59+
modmenu_versions_fabric=>=13.0.0-beta.1
6060

6161
# GitHub, Modrinth, CurseForge releases
6262
# Plural properties expect CSV lists
@@ -68,12 +68,12 @@ curseforge_slug=chatnotify
6868
release_type=STABLE
6969
# Fabric
7070
release_mod_loaders_fabric=fabric
71-
release_game_versions_fabric=1.21.2,1.21.3
71+
release_game_versions_fabric=1.21.4
7272
release_required_dep_ids_fabric_mr=P7dR8mSH,mOgUt4GM
7373
release_required_dep_ids_fabric_cf=fabric-api,modmenu
7474
# NeoForge
7575
release_mod_loaders_neoforge=neoforge
76-
release_game_versions_neoforge=1.21.2,1.21.3
76+
release_game_versions_neoforge=1.21.4
7777

7878
# Mixin https://mvnrepository.com/artifact/org.spongepowered/mixin
7979
mixin_version=0.8.7

0 commit comments

Comments
 (0)