minecraft-dev / MinecraftDev

Plugin for IntelliJ IDEA that gives special support for Minecraft modding projects.
https://minecraftdev.org/
GNU Lesser General Public License v3.0
1.51k stars 185 forks source link

Add an IDE inspection error for mixin and target type mismatches #2343

Open O7410 opened 2 months ago

O7410 commented 2 months ago

Minecraft Development for IntelliJ plugin version

2024.1-1.8.0

Description of the feature request

Currently, when the mixin is an interface and the target is a class, there is no IDE error, but there is a compile error that says: Targetted type 'net.minecraft.block.Block of mypackage.mixin.BlockMixin is not an interface When the mixin is a class and the target is an interface, there is a runtime error that says @Mixin target type mismatch: net.minecraft.text.Text is an interface in org.spongepowered.asm.mixin.transformer.MixinInfo$SubType$Standard@75769ab0 This is the behavior i want: image image

This is low priority since it's very easy to see what the problem is when you try to run it (the compile and runtime errors)

O7410 commented 2 months ago

should also mention i used fabric with yarn mappings to test

Earthcomputer commented 2 months ago

How did you get those screenshots? Did you make this inspection yourself already?

O7410 commented 2 months ago

Yeah i wrote some horrible code you can look at it here https://github.com/O7410/MinecraftDev/commit/2de6199d8d4a3b9cca49d3bae181d14e42f63966