Open LeafHacker opened 4 years ago
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I've encountered this as well. Copy Mixin Target Reference
on a call to this.remove()
inside FallingBlockEntity::tick
generates Lnet/minecraft/entity/Entity;remove()V
instead of the correct Lnet/minecraft/entity/FallingBlockEntity;remove()V
for my @Redirect
target.
This also results in a cryptic mixin error that only says it "failed injection check" which requires enabling mixin debugging to see what targets are considered.
This plugin could help prevent this from occurring, but there also could be a better error message output if you try to target a method implemented in a superclass.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Since #1221 was merged, completion of mixin target references is now correct for abstract classes, as well as the inspection for it. However, Copy Mixin target reference
is still broken.
Please include the following information in all bug reports:
When targeting a method (possibly only methods with a default implementation) on an abstract class, the abstract class is used in the method, rather than the implementing class.
This may only be fixable if you assume the class that is currently open in intellij is the implementing/target class. Alternatively it may make sense to display a warning if the implementing class cannot be determined.
Example: targeting
net.minecraft.client.gui.screen.MainMenuScreen#render
's use ofnet.minecraft.client.gui.AbstractGui#blit
If I write the following mixin and then auto complete the target, I get
Lnet/minecraft/client/gui/screen/MainMenuScreen;blit(IIIIFFIIII)V
, as expected.However, if I navigate to
net.minecraft.client.gui.screen.MainMenuScreen#render
, right click onblit
and selectCopy Mixin Target Reference
, it gives meLnet/minecraft/client/gui/AbstractGui;blit(IIIIFFIIII)V
.Since
net.minecraft.client.gui.AbstractGui
is abstract, that doesn't exist.