This add-on package requires a BetaAPI
Supplement:
As @thendeiser said, I changed the JSON version to '1.26.0' and it worked as expected, but I think it should be compatible with versions above 1.21.90 according to the changelog.
Steps to Reproduce:
1. new ModalFormData() .textField('text1', 'text2', defaultValue: {translate:'translate.text'})
2. After editing the script, enter the game to display the ModalFormData UI
Observed Results:
UI error: "Error creating form. Received invalid form json. Error: /content/1/default: Invalid type for property. Expected 'string' got 'object'"
Expected Results:
It should correctly parse the object type to satisfy the minecraftserver.RawMessage type.
This add-on package requires a BetaAPI
Supplement:
As @thendeiser said, I changed the JSON version to '1.26.0' and it worked as expected, but I think it should be compatible with versions above 1.21.90 according to the changelog.
Steps to Reproduce:
1. new ModalFormData() .textField('text1', 'text2', defaultValue: {translate:'translate.text'})
2. After editing the script, enter the game to display the ModalFormData UI
Observed Results:
UI error: "Error creating form. Received invalid form json. Error: /content/1/default: Invalid type for property. Expected 'string' got 'object'"
Expected Results:
It should correctly parse the object type to satisfy the minecraftserver.RawMessage type.