Skip to content

Commit c89d79f

Browse files
Add Translatable.allowArbitraryArgs() to support the new Component changes in 1.20.3 (#2)
1 parent 7a2a3ac commit c89d79f

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/main/java/com/demonwav/mcdev/annotations/Translatable.java

+11
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,17 @@
4848
*/
4949
boolean foldMethod() default false;
5050

51+
/**
52+
* Whether arbitrary argument types are allowed in the translation argument list, if present. If false, the argument
53+
* list must only contain instances of {@linkplain String}, {@linkplain Number}, {@linkplain Boolean} and
54+
* {@code Component}. If true, other argument types are allowed and are converted to strings as if by using
55+
* {@linkplain String.valueOf}.
56+
*
57+
* <p>If this annotation is used on a class within the {@code net.minecraft} package, and the current Minecraft
58+
* version is less than 23w40a (a snapshot for 1.20.3), then MinecraftDev behaves as if this value is true.
59+
*/
60+
boolean allowArbitraryArgs() default false;
61+
5162
/**
5263
* The prefix that will be added to this argument.
5364
*

0 commit comments

Comments
 (0)