geforkt von Mirrors/Paper
Use MCDataConverter instead of raw convert call for cmd converter
MCDataConverter uses the breakpoint system, which for future updates may be neccesary (probably not). Also, add the 1.20.6 version field.
Dieser Commit ist enthalten in:
Ursprung
67b30c5ed5
Commit
af67859c56
@ -439,7 +439,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ 3825,
|
||||
+ 3828,
|
||||
+ 3833
|
||||
+ // All up to 1.20.6-rc1
|
||||
+ // All up to 1.20.6
|
||||
+ };
|
||||
+ Arrays.sort(converterVersions);
|
||||
+
|
||||
@ -1154,6 +1154,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ public static final int V1_20_5_RC3 = 3836;
|
||||
+ public static final int V1_20_5 = 3837;
|
||||
+ public static final int V1_20_6_RC1 = 3838;
|
||||
+ public static final int V1_20_6 = 3839;
|
||||
+
|
||||
+ private MCVersions() {}
|
||||
+}
|
||||
@ -2586,8 +2587,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ final String cmdString = cmd.getAsString();
|
||||
+
|
||||
+ if ((actionString.equals("suggest_command") && cmdString.startsWith("/")) || actionString.equals("run_command")) {
|
||||
+ final Object res = MCTypeRegistry.DATACONVERTER_CUSTOM_TYPE_COMMAND.convert(
|
||||
+ cmdString, MCVersions.V1_20_4, SharedConstants.getCurrentVersion().getDataVersion().getVersion()
|
||||
+ final Object res = MCDataConverter.convert(
|
||||
+ MCTypeRegistry.DATACONVERTER_CUSTOM_TYPE_COMMAND, cmdString, MCVersions.V1_20_4, SharedConstants.getCurrentVersion().getDataVersion().getVersion()
|
||||
+ );
|
||||
+ if (res instanceof String newCmd) {
|
||||
+ clickEvent.addProperty("value", newCmd);
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren