MinecraftDev icon indicating copy to clipboard operation
MinecraftDev copied to clipboard

Add an IDE inspection error for mixin and target type mismatches

Open O7410 opened this issue 1 year ago • 3 comments

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 avatar Aug 01 '24 13:08 O7410

should also mention i used fabric with yarn mappings to test

O7410 avatar Aug 01 '24 13:08 O7410

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

Earthcomputer avatar Aug 02 '24 17:08 Earthcomputer

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

O7410 avatar Aug 02 '24 18:08 O7410