⁠
joe: Include much more detail in inspection descriptions
- <!--
- Minecraft Development for IntelliJ
-
- https://mcdev.io/
-
- Copyright (C) 2026 minecraft-dev
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Lesser General Public License as published
- by the Free Software Foundation, version 3.0 only.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public License
- along with this program. If not, see <https://www.gnu.org/licenses/>.
- -->
-
- <html>
- <body>
- Detect wrong argument types in translation arguments
- </body>
- </html>
- <!--
- Minecraft Development for IntelliJ
-
- https://mcdev.io/
-
- Copyright (C) 2026 minecraft-dev
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Lesser General Public License as published
- by the Free Software Foundation, version 3.0 only.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public License
- along with this program. If not, see <https://www.gnu.org/licenses/>.
- -->
-
- <html>
- <body>
- <p>
- Detect wrong argument types in translation arguments
- </p>
- <!-- tooltip end -->
- <p>
- Translation arguments must be a <code>String</code>, <code>Number</code>, <code>Boolean</code> or <code>Component</code>.
- Minecraft can't serialize arguments of other types, which causes errors, for example when the component is sent over the
- network. Convert such arguments to strings, or use <code>Component.translatableEscape</code>.
- </p>
- <pre><code>
- Component.translatable("my_mod.position", pos) // bad
- Component.translatable("my_mod.position", String.valueOf(pos)) // good
- </code></pre>
- </body>
- </html>