-
Notifications
You must be signed in to change notification settings - Fork 200
Closed
Labels
Description
Minecraft Development for IntelliJ plugin version
2023.2.2-1.7.3
IntelliJ version
IntelliJ IDEA 2023.2.6 (Community Edition)
Operating System
Windows 10
Target platform
Mixins
Description of the bug
A @ModifyConstant with a boolean return value can be used to replace an instanceof check with some other check, but it gets incorrectly reported as two errors: one for the Class return type, and one for the method parameters, the latter being #2231. However, it works just fine and replaces the instanceof check as expected.
Reproducable mixin (yarn mappings):
@Mixin(ArmorFeatureRenderer.class)
public class ArmorFeatureRendererMixin {
@ModifyConstant(
method = "renderArmor",
constant = @Constant(
classValue = ArmorItem.class,
ordinal = 0
)
)
private boolean instanceOfArmorItemDoWhatever(Object reference, Class<ArmorItem> clazz) {
return false;
}
}