MinecraftDev
MinecraftDev copied to clipboard
Invalid injector method signature inspection is not supressed by @Coerce
Minecraft Development for IntelliJ plugin version
2023.3-1.6.12-443
IntelliJ version
2023.3.2
Operating System
EndeavorOS Linux, kernel 6.6.8-arch1-1
Target platform
Mixins
Description of the bug
source: https://github.com/tildejustin/voyager/blob/mixin-extras/src%2Fmain%2Fjava%2Fme%2Fmodmuss50%2Fvoyager%2Fmixin%2FStructureManagerMixin.java
Maps.<Identifier, Structure>newHashMap(), which returns a HashMap<Identifier, Structure> is assigned to StructureManager#structures, which is just a Map<Identifier, Structure>. Without the @Coerce the error is correct as Mixin throws a ClassCastException when it finds that it can't cast a SyncronizedMap to a HashMap, but @Coerce bypasses this cast and thus the inspection is incorrect in this case.