⁠
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>
- Reports when a parameter name in a Mixin does not match the target class
- </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>
- Reports when a parameter name in a Mixin does not match the target class
- </p>
- <!-- tooltip end -->
- <p>
- Naming parameters the same as the corresponding parameters or local variables in the target class makes the injector easier
- to read. A mismatched name can also indicate that the parameter doesn't refer to the variable it was meant to.
- </p>
- <pre><code>
- // target: public void setHealth(float health)
-
- // bad
- @Inject(method = "setHealth", at = @At("HEAD"))
- private void onSetHealth(float value, CallbackInfo ci) { ... }
-
- // good
- @Inject(method = "setHealth", at = @At("HEAD"))
- private void onSetHealth(float health, CallbackInfo ci) { ... }
- </code></pre>
- </body>
- </html>