+ Reports @Local using a variable name where the target class does not have local variable names at runtime
+
+ Local variable names are read from the local variable table of the target class at runtime. Obfuscated versions of + Minecraft (1.21.11 and below) don't have a local variable table at runtime, even if one is present in the development + environment, so the injector will fail to find the variable. Use an ordinal or index instead. +
+ + Index: src/main/resources/inspectionDescriptions/ModifyVariableNameWithoutLVT.html =================================================================== --- src/main/resources/inspectionDescriptions/ModifyVariableNameWithoutLVT.html (revision c46cd568bbfbea09e8875244eea1f8b274494eff) +++ src/main/resources/inspectionDescriptions/ModifyVariableNameWithoutLVT.html (revision c46cd568bbfbea09e8875244eea1f8b274494eff) @@ -0,0 +1,33 @@ + + + + +
+ Reports @ModifyVariable using a variable name where the target class does not have local variable names at runtime
+
+ Local variable names are read from the local variable table of the target class at runtime. Obfuscated versions of + Minecraft (1.21.11 and below) don't have a local variable table at runtime, even if one is present in the development + environment, so the injector will fail to find the variable. Use an ordinal or index instead. +
+ + Index: src/main/resources/messages/MinecraftDevelopmentBundle.properties =================================================================== --- src/main/resources/messages/MinecraftDevelopmentBundle.properties (revision 8223d0a3669b4fd9f6d4dc5ac2beae977a35a67b) +++ src/main/resources/messages/MinecraftDevelopmentBundle.properties (revision c46cd568bbfbea09e8875244eea1f8b274494eff) @@ -274,6 +274,7 @@ inspection.local_capture_fail_exception.name=Usage of LocalCapture.CAPTURE_FAILEXCEPTION inspection.local_may_be_args_only.name=@Local may be argsOnly = true inspection.local_may_use_name.name=@Local may use name +inspection.local_name_without_lvt.name=@Local uses name without local variable table inspection.local_variable_declaration_side_only.name=Invalid usage of local variable declaration annotated with @SideOnly inspection.method_call_side_only.name=Invalid usage of method annotated with @SideOnly inspection.method_side_only.name=Invalid usage of @SideOnly in method declaration @@ -291,6 +292,7 @@ inspection.mixin_wrong_class_type.name=Mixin is wrong class type inspection.modify_variable_may_be_args_only.name=@ModifyVariable may be argsOnly = true inspection.modify_variable_may_use_name.name=@ModifyVariable may use variable name +inspection.modify_variable_name_without_lvt.name=@ModifyVariable uses name without local variable table inspection.mods_toml_validation.name=Forge's mods.toml validation inspection.name_doesnt_match_target_class.name=Mixin parameter names don't match the target class inspection.nested_class_side_only.name=Invalid usage of @SideOnly in nested class declaration