Skip to content

Commit cf62120

Browse files
authored
Minecraft 1.21.5 support (#172)
* magiclib-better-dev 1.21.5-rc1 (fabric) * magiclib-minecraft-api 1.21.5-rc1 (fabric) * magiclib-malilib-extra 1.21.5-rc1 (fabric) * magiclib-legacy-compat 1.21.5-rc1 * magiclib-better-dev 1.21.5 (fabric) * Update plugin dev.architectury.loom to 1.10-SNAPSHOT * magiclib-better-dev 1.21.5 (neoforge) * magiclib-minecraft-api 1.21.5-rc1 -> 1.21.5 (fabric) * magiclib-minecraft-api 1.21.5 (neoforge) * magiclib-malilib-extra 1.21.5-rc1 -> 1.21.5 (fabric) * magiclib-legacy-compat 1.21.5-rc1 -> 1.21.5 * Remove flag due to Architectury Loom upgrade * Update dependencies * neoforge 21.5.2-beta -> 21.5.2-beta * malilib 0.23.999-rc1 -> 0.24.0-sakura.3 * malilib 0.24.0-sakura.3 -> 0.24.0-sakura.4 * malilib 0.24.0-sakura.4 -> 0.24.0-sakura.5 * fabric-api 0.119.6+1.21.5 -> 0.119.9+1.21.5 * Fix crash with MagicTranslation * fabric-laoder 0.16.10 -> 0.16.13 * Add IAS * neoforge 21.5.7-beta -> 21.5.30-beta * malilib 0.24.0-sakura.5 -> 0.24.0-sakura.6 --------- Signed-off-by: Hendrix-Shen <[email protected]>
1 parent 8b3c46c commit cf62120

File tree

41 files changed

+700
-181
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+700
-181
lines changed

gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ mod.version=0.8
1515

1616
# Dependency Versions
1717
## Fabric Environment
18-
dependencies.fabric_loader_version=0.16.10
18+
dependencies.fabric_loader_version=0.16.13
1919
## Annotation processor
2020
dependencies.lombok_version=1.18.36
2121
## Misc
2222
dependencies.jetbrains_annotations_version=26.0.2
2323

2424
# Gradle Plugins
25-
architectury_loom_version=1.9-SNAPSHOT
25+
architectury_loom_version=1.10-SNAPSHOT
2626
checkstyle_version=10.21.1
2727
grgit_version=5.3.0
2828
preprocessor_version=9d21b33

magiclib-better-dev/build.gradle

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ preprocess {
2828
Node mc_12101_fabric = createNode("better-dev-1.21.1-fabric", 1_21_01, "mojang")
2929
Node mc_12103_fabric = createNode("better-dev-1.21.3-fabric", 1_21_03, "mojang")
3030
Node mc_12104_fabric = createNode("better-dev-1.21.4-fabric", 1_21_04, "mojang")
31+
Node mc_12105_fabric = createNode("better-dev-1.21.5-fabric", 1_21_05, "mojang")
3132

3233
mc_11502_fabric.link(mc_11404_fabric, file("versions/mapping-fabric-1.15.2-1.14.4.txt"))
3334
mc_11605_fabric.link(mc_11502_fabric, file("versions/mapping-fabric-1.16.5-1.15.2.txt"))
@@ -43,6 +44,7 @@ preprocess {
4344
mc_12006_fabric.link(mc_12101_fabric, file("versions/mapping-fabric-1.20.6-1.21.1.txt"))
4445
mc_12101_fabric.link(mc_12103_fabric, file("versions/mapping-fabric-1.21.1-1.21.3.txt"))
4546
mc_12103_fabric.link(mc_12104_fabric, file("versions/mapping-fabric-1.21.3-1.21.4.txt"))
47+
mc_12104_fabric.link(mc_12105_fabric, file("versions/mapping-fabric-1.21.4-1.21.5.txt"))
4648

4749
// Forge
4850
Node mc_11701_forge = createNode("better-dev-1.17.1-forge", 1_17_01, "mojang")
@@ -59,10 +61,12 @@ preprocess {
5961
Node mc_12101_neoforge = createNode("better-dev-1.21.1-neoforge", 1_21_01, "mojang")
6062
Node mc_12103_neoforge = createNode("better-dev-1.21.3-neoforge", 1_21_03, "mojang")
6163
Node mc_12104_neoforge = createNode("better-dev-1.21.4-neoforge", 1_21_04, "mojang")
64+
Node mc_12105_neoforge = createNode("better-dev-1.21.5-neoforge", 1_21_05, "mojang")
6265

6366
mc_12002_fabric.link(mc_12002_neoforge, file("versions/mapping-1.20.2-fabric-neoforge.txt"))
6467
mc_12006_fabric.link(mc_12006_neoforge, file("versions/mapping-1.20.6-fabric-neoforge.txt"))
6568
mc_12101_fabric.link(mc_12101_neoforge, file("versions/mapping-1.21.1-fabric-neoforge.txt"))
6669
mc_12103_fabric.link(mc_12103_neoforge, file("versions/mapping-1.21.3-fabric-neoforge.txt"))
6770
mc_12104_fabric.link(mc_12104_neoforge, file("versions/mapping-1.21.4-fabric-neoforge.txt"))
71+
mc_12105_fabric.link(mc_12105_neoforge, file("versions/mapping-1.21.5-fabric-neoforge.txt"))
6872
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
package top.hendrixshen.magiclib.mixin.dev.auth;
2+
3+
import org.spongepowered.asm.mixin.Mixin;
4+
5+
import top.hendrixshen.magiclib.api.preprocess.DummyClass;
6+
7+
@Mixin(DummyClass.class)
8+
public class MinecraftMixin {
9+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Dependency Versions
2+
dependencies.minecraft_dependency=>=1.21.5- <1.21.6-
3+
dependencies.minecraft_version=1.21.5
4+
5+
# Fabric API 0.119.9+1.21.5
6+
dependencies.api.fabric_version=0.119.9+1.21.5
7+
# Mod Menu 14.0.0-rc.2
8+
# modmenu-14.0.0-rc.2.jar
9+
dependencies.api.modmenu_version=14.0.0-rc.2
10+
11+
# IMBlockerFabric 1.0.24
12+
# imblockerfabric-1.0.24.jar
13+
dependencies.runtime.imblocker_version=1.0.24
14+
# In-Game Account Switcher 9.0.2
15+
# IAS-Fabric-1.21.5-9.0.2.jar
16+
dependencies.runtime.inGameAccountSwitcher_version=96FYffnc
17+
18+
# Publish properties
19+
publish.game_version=1.21.5
20+
publish.dependencies_list=
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
accessWidener v2 named
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Dependency Versions
2+
dependencies.neoforge_version=21.5.30-beta
3+
dependencies.minecraft_dependency=1.21.5
4+
dependencies.minecraft_version=1.21.5
5+
6+
# IMBlocker
7+
# TODO
8+
dependencies.runtime.imblocker_version=0
9+
# In-Game Account Switcher 9.0.2
10+
# IAS-NeoForge-1.21.5-9.0.2.jar
11+
dependencies.runtime.inGameAccountSwitcher_version=ldQRqpLN
12+
13+
# Loom Properties
14+
loom.platform=neoforge
15+
16+
# Publish properties
17+
publish.game_version=1.21.5
18+
publish.dependencies_list=
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
accessWidener v2 named
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
net.fabricmc.api.EnvType net.neoforged.api.distmarker.Dist
2+
net.fabricmc.api.Environment net.neoforged.api.distmarker.OnlyIn
3+
net.fabricmc.api.EnvType SERVER net.neoforged.api.distmarker.Dist DEDICATED_SERVER

magiclib-better-dev/versions/mapping-fabric-1.21.4-1.21.5.txt

Whitespace-only changes.

magiclib-legacy-compat/build.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ preprocess {
2828
Node mc_12101_fabric = createNode("legacy-1.21.1-fabric", 1_21_01, "mojang")
2929
Node mc_12103_fabric = createNode("legacy-1.21.3-fabric", 1_21_03, "mojang")
3030
Node mc_12104_fabric = createNode("legacy-1.21.4-fabric", 1_21_04, "mojang")
31+
Node mc_12105_fabric = createNode("legacy-1.21.5-fabric", 1_21_05, "mojang")
3132

3233
mc_11502_fabric.link(mc_11404_fabric, file("versions/mapping-1.15.2-1.14.4.txt"))
3334
mc_11605_fabric.link(mc_11502_fabric, file("versions/mapping-1.16.5-1.15.2.txt"))
@@ -43,4 +44,5 @@ preprocess {
4344
mc_12006_fabric.link(mc_12101_fabric, file("versions/mapping-1.20.6-1.21.1.txt"))
4445
mc_12101_fabric.link(mc_12103_fabric, file("versions/mapping-1.21.1-1.21.3.txt"))
4546
mc_12103_fabric.link(mc_12104_fabric, file("versions/mapping-1.21.3-1.21.4.txt"))
47+
mc_12104_fabric.link(mc_12105_fabric, file("versions/mapping-1.21.4-1.21.5.txt"))
4648
}

magiclib-legacy-compat/src/main/java/top/hendrixshen/magiclib/carpet/impl/WrappedSettingManager.java

Lines changed: 18 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -457,10 +457,8 @@ public int displayRuleMenu(@NotNull CommandSourceStack source, @NotNull RuleOpti
457457
ComponentUtil.simpleCompat(this.getTranslatedRuleName(source, ruleOption.getName()))
458458
.withStyleCompat(style -> style
459459
.withBold(true)
460-
.withClickEvent(ClickEventCompat.of(ClickEvent.Action.RUN_COMMAND,
461-
String.format("/%s %s", this.identifier, ruleOption.getName())))
462-
.withHoverEvent(HoverEventCompat.of(HoverEvent.Action.SHOW_TEXT,
463-
ComponentUtil.trCompat("magiclib.ui.hover.refresh")
460+
.withClickEvent(ClickEventCompat.runCommand(String.format("/%s %s", this.identifier, ruleOption.getName())))
461+
.withHoverEvent(HoverEventCompat.showTextCompat(ComponentUtil.trCompat("magiclib.ui.hover.refresh")
464462
.withStyleCompat(style1 -> style1.withColor(ChatFormatting.GRAY))))));
465463

466464
String descTranslationKey = String.format("%s.rule.%s.desc", this.identifier, ruleOption.getName());
@@ -479,10 +477,8 @@ public int displayRuleMenu(@NotNull CommandSourceStack source, @NotNull RuleOpti
479477
ComponentUtil.tr(String.format("%s.category.%s", this.identifier, category)),
480478
ComponentUtil.simple("]")).withStyleCompat(style -> style
481479
.withColor(ChatFormatting.AQUA)
482-
.withClickEvent(ClickEventCompat.of(ClickEvent.Action.RUN_COMMAND,
483-
String.format("/%s list %s", this.identifier, category)))
484-
.withHoverEvent(HoverEventCompat.of(HoverEvent.Action.SHOW_TEXT,
485-
ComponentUtil.trCompat("magiclib.ui.hover.list_all_category", category)))))
480+
.withClickEvent(ClickEventCompat.runCommand(String.format("/%s list %s", this.identifier, category)))
481+
.withHoverEvent(HoverEventCompat.showTextCompat(ComponentUtil.trCompat("magiclib.ui.hover.list_all_category", category)))))
486482
.collect(Collectors.toList())));
487483

488484
if (categories.size() < 2) {
@@ -512,11 +508,9 @@ public int displayRuleMenu(@NotNull CommandSourceStack source, @NotNull RuleOpti
512508
ruleOption.getDefaultStringValue().equals(option) ? ChatFormatting.DARK_GREEN :
513509
ChatFormatting.YELLOW)
514510
.withClickEvent(ruleOption.getStringValue().equals(option) || this.locked() ? null :
515-
ClickEventCompat.of(ClickEvent.Action.SUGGEST_COMMAND,
516-
String.format("/%s %s %s", this.identifier, ruleOption.getName(), option)))
511+
ClickEventCompat.suggestCommand(String.format("/%s %s %s", this.identifier, ruleOption.getName(), option)))
517512
.withHoverEvent(ruleOption.getStringValue().equals(option) || this.locked() ? null :
518-
HoverEventCompat.of(HoverEvent.Action.SHOW_TEXT,
519-
ComponentUtil.trCompat("magiclib.ui.hover.switch_to", option)))))
513+
HoverEventCompat.showTextCompat(ComponentUtil.trCompat("magiclib.ui.hover.switch_to", option)))))
520514
.collect(Collectors.toList())),
521515
ComponentUtil.simple(" ]").withStyle(style -> style.withColor(ChatFormatting.YELLOW))));
522516
return 1;
@@ -543,10 +537,9 @@ public int setRule(CommandSourceStack source, @NotNull RuleOption ruleOption, St
543537
ComponentUtil.tr("magiclib.ui.change_permanently"),
544538
ComponentUtil.simple("]")).withStyleCompat(style -> style
545539
.withColor(ChatFormatting.AQUA)
546-
.withClickEvent(ClickEventCompat.of(ClickEvent.Action.RUN_COMMAND,
547-
String.format("/%s setDefault %s %s",
540+
.withClickEvent(ClickEventCompat.runCommand(String.format("/%s setDefault %s %s",
548541
this.identifier, ruleOption.getName(), newValue)))
549-
.withHoverEvent(HoverEventCompat.of(HoverEvent.Action.SHOW_TEXT,
542+
.withHoverEvent(HoverEventCompat.showTextCompat(
550543
ComponentUtil.trCompat("magiclib.ui.hover.change_permanently",
551544
String.format("%s.conf", this.identifier))))))));
552545
return 1;
@@ -644,8 +637,8 @@ public Collection<List<Component>> getMatchedSettings(@NotNull Collection<RuleOp
644637
for (RuleOption ruleOption : ruleOptions) {
645638
List<MutableComponentCompat> components = Lists.newArrayList();
646639
components.add(ComponentCompat.literalCompat(String.format("- %s", this.getTranslatedRuleName(ruleOption.getName()))).withStyleCompat(style -> style
647-
.withClickEvent(ClickEventCompat.of(ClickEvent.Action.RUN_COMMAND, String.format("/%s %s", this.identifier, ruleOption.getName())))
648-
.withHoverEvent(HoverEventCompat.of(HoverEvent.Action.SHOW_TEXT, ComponentCompat.literalCompat(this.trRuleDesc(ruleOption.getName())).withStyle(style1 -> style1.withColor(ChatFormatting.YELLOW))))));
640+
.withClickEvent(ClickEventCompat.runCommand(String.format("/%s %s", this.identifier, ruleOption.getName())))
641+
.withHoverEvent(HoverEventCompat.showTextCompat(ComponentCompat.literalCompat(this.trRuleDesc(ruleOption.getName())).withStyle(style1 -> style1.withColor(ChatFormatting.YELLOW))))));
649642
components.add(ComponentCompat.literalCompat(" "));
650643
List<String> options = new ArrayList<>(ruleOption.getOptions());
651644

@@ -657,8 +650,8 @@ public Collection<List<Component>> getMatchedSettings(@NotNull Collection<RuleOp
657650
components.add(ComponentCompat.literalCompat(String.format("[%s]", option)).withStyleCompat(style ->
658651
style.withUnderlined(ruleOption.getStringValue().equals(option))
659652
.withColor(ruleOption.isDefault() ? ChatFormatting.GRAY : ruleOption.getDefaultStringValue().equals(option) ? ChatFormatting.DARK_GREEN : ChatFormatting.YELLOW)
660-
.withClickEvent(ruleOption.getStringValue().equals(option) || this.locked() ? null : ClickEventCompat.of(ClickEvent.Action.SUGGEST_COMMAND, String.format("/%s %s %s", this.identifier, ruleOption.getName(), option)))
661-
.withHoverEvent(ruleOption.getStringValue().equals(option) || this.locked() ? null : HoverEventCompat.of(HoverEvent.Action.SHOW_TEXT, ComponentCompat.literalCompat(this.trUI("hover.switch_to", option))))));
653+
.withClickEvent(ruleOption.getStringValue().equals(option) || this.locked() ? null : ClickEventCompat.suggestCommand(String.format("/%s %s %s", this.identifier, ruleOption.getName(), option)))
654+
.withHoverEvent(ruleOption.getStringValue().equals(option) || this.locked() ? null : HoverEventCompat.showTextCompat(ComponentCompat.literalCompat(this.trUI("hover.switch_to", option))))));
662655
components.add(ComponentCompat.literalCompat(" "));
663656
}
664657

@@ -678,13 +671,11 @@ public Collection<MutableComponentCompat> getMatchedSettings(CommandSourceStack
678671
List<MutableComponentCompat> components = Lists.newArrayList();
679672
components.add(ComponentUtil.composeCompat("- ",
680673
this.getTranslatedRuleName(source, option.getName())).withStyleCompat(style -> {
681-
style.withClickEvent(ClickEventCompat.of(ClickEvent.Action.RUN_COMMAND,
682-
String.format("/%s %s", this.identifier, option.getName())));
674+
style.withClickEvent(ClickEventCompat.runCommand(String.format("/%s %s", this.identifier, option.getName())));
683675
String descTranslationKey = String.format("%s.rule.%s.desc", this.identifier, option.getName());
684676

685677
if (I18n.exists(descTranslationKey)) {
686-
style.withHoverEvent(HoverEventCompat.of(HoverEvent.Action.SHOW_TEXT,
687-
ComponentUtil.trCompat(descTranslationKey)
678+
style.withHoverEvent(HoverEventCompat.showTextCompat(ComponentUtil.trCompat(descTranslationKey)
688679
.withStyleCompat(style1 -> style1.withColor(ChatFormatting.YELLOW))));
689680
}
690681

@@ -704,10 +695,9 @@ public Collection<MutableComponentCompat> getMatchedSettings(CommandSourceStack
704695
o.equals(option.getDefaultStringValue()) ? ChatFormatting.DARK_GREEN :
705696
ChatFormatting.YELLOW)
706697
.withClickEvent(o.equals(option.getStringValue()) || this.locked() ? null :
707-
ClickEventCompat.of(ClickEvent.Action.SUGGEST_COMMAND,
708-
String.format("/%s %s %s", this.identifier, option.getName(), o)))
698+
ClickEventCompat.suggestCommand(String.format("/%s %s %s", this.identifier, option.getName(), o)))
709699
.withHoverEvent(o.equals(option.getStringValue()) || this.locked() ? null :
710-
HoverEventCompat.of(HoverEvent.Action.SHOW_TEXT,
700+
HoverEventCompat.showTextCompat(
711701
ComponentUtil.trCompat("magiclib.ui.hover.switch_to", o)))))
712702
.collect(Collectors.toList())));
713703
ret.add(ComponentUtil.joinCompat(ComponentUtil.emptyCompat(), components));
@@ -748,10 +738,8 @@ private int displayMainMenu(CommandSourceStack source) {
748738
ComponentUtil.tr(String.format("%s.category.%s", this.identifier, category)),
749739
"]").withStyleCompat(style -> style
750740
.withColor(ChatFormatting.AQUA)
751-
.withClickEvent(ClickEventCompat.of(ClickEvent.Action.RUN_COMMAND,
752-
String.format("/%s list %s", this.identifier, category)))
753-
.withHoverEvent(HoverEventCompat.of(HoverEvent.Action.SHOW_TEXT,
754-
ComponentUtil.trCompat("magiclib.ui.hover.list_all_category", category)))));
741+
.withClickEvent(ClickEventCompat.runCommand(String.format("/%s list %s", this.identifier, category)))
742+
.withHoverEvent(HoverEventCompat.showTextCompat(ComponentUtil.trCompat("magiclib.ui.hover.list_all_category", category)))));
755743
}
756744
});
757745

magiclib-legacy-compat/src/main/java/top/hendrixshen/magiclib/event/render/impl/RenderContext.java

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
package top.hendrixshen.magiclib.event.render.impl;
22

33
import com.mojang.blaze3d.platform.GlStateManager;
4-
import com.mojang.blaze3d.systems.RenderSystem;
54
import com.mojang.blaze3d.vertex.PoseStack;
65
import net.fabricmc.api.EnvType;
76
import net.fabricmc.api.Environment;
87
import com.mojang.math.Matrix4f;
98

109
import lombok.Getter;
1110

11+
import top.hendrixshen.magiclib.impl.render.context.RenderGlobal;
12+
1213
@Environment(EnvType.CLIENT)
1314
public class RenderContext {
1415
@Getter
@@ -43,46 +44,44 @@ public void mulPoseMatrix(Matrix4f matrix4f) {
4344
}
4445

4546
public void enableDepthTest() {
46-
RenderSystem.enableDepthTest();
47+
RenderGlobal.enableDepthTest();
4748
}
4849

4950
public void disableDepthTest() {
50-
RenderSystem.disableDepthTest();
51+
RenderGlobal.disableDepthTest();
5152
}
5253

5354
public void depthMask(boolean mask) {
54-
RenderSystem.depthMask(mask);
55+
RenderGlobal.depthMask(mask);
5556
}
5657

5758
public void enableBlend() {
58-
RenderSystem.enableBlend();
59+
RenderGlobal.enableBlend();
5960
}
6061

62+
//#if MC < 12105
6163
public void blendFunc(GlStateManager.SourceFactor srcFactor, GlStateManager.DestFactor dstFactor) {
62-
RenderSystem.blendFunc(srcFactor, dstFactor);
64+
RenderGlobal.blendFunc(srcFactor, dstFactor);
6365
}
66+
//#endif
6467

6568
public void color4f(float red, float green, float blue, float alpha) {
66-
//#if MC > 11605
67-
//$$ RenderSystem.setShaderColor(red, green, blue, alpha);
68-
//#else
69-
RenderSystem.color4f(red, green, blue, alpha);
70-
//#endif
69+
RenderGlobal.color4f(red, green, blue, alpha);
7170
}
7271

7372
//#if MC < 11904
7473
public void enableTexture() {
75-
RenderSystem.enableTexture();
74+
RenderGlobal.enableTexture();
7675
}
7776
//#endif
7877

7978
//#if MC < 11700
8079
public void enableAlphaTest() {
81-
RenderSystem.enableAlphaTest();
80+
RenderGlobal.enableAlphaTest();
8281
}
8382

8483
public void disableLighting() {
85-
RenderSystem.disableLighting();
84+
RenderGlobal.disableLighting();
8685
}
8786
//#endif
8887
}

magiclib-legacy-compat/src/main/java/top/hendrixshen/magiclib/malilib/impl/ConfigManager.java

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,9 @@ public boolean setValue(String optionName, Object value) {
147147
*
148148
* @param configClass Your configuration class.
149149
*/
150+
//#if MC > 12104
151+
//$$ @SuppressWarnings("removal")
152+
//#endif
150153
public void parseConfigClass(@NotNull Class<?> configClass) {
151154
for (Field field : configClass.getDeclaredFields()) {
152155
Config annotation = field.getAnnotation(Config.class);
@@ -220,6 +223,20 @@ public void parseConfigClass(@NotNull Class<?> configClass) {
220223

221224
((IMagicConfigBase) config).setValueChangedFromJsonCallback(
222225
c -> setFieldValue(field, null, ((ConfigColor) c).getColor()));
226+
//#if MC > 12104
227+
//$$ } else if (configFieldObj instanceof fi.dy.masa.malilib.util.data.Color4f) {
228+
//$$ config = new MagicConfigColor(String.format("%s.config.%s", this.identifier, annotation.category()),
229+
//$$ field.getName(), ((fi.dy.masa.malilib.util.data.Color4f) configFieldObj).toHexString());
230+
//$$ option = new ConfigOption(annotation, config);
231+
//$$
232+
//$$ config.setValueChangeCallback(c -> {
233+
//$$ setFieldValue(field, null, ((ConfigColor) c).getColor());
234+
//$$ option.getValueChangeCallback().accept(option);
235+
//$$ });
236+
//$$
237+
//$$ ((IMagicConfigBase) config).setValueChangedFromJsonCallback(
238+
//$$ c -> setFieldValue(field, null, ((ConfigColor) c).getColor()));
239+
//#endif
223240
} else if (configFieldObj instanceof Double) {
224241
Numeric numeric = field.getAnnotation(Numeric.class);
225242

0 commit comments

Comments
 (0)