Mixin
Mixin copied to clipboard
Class available at compile-time is incorrectly marked as imaginary if specified by name
This code:
@Mixin(CreativeInventoryScreen.class)
public interface ExampleMixin {
@Accessor(value = "fabric_currentPage", remap = false)
static int getFabricCurrentPage() {
throw new AssertionError();
}
}
Fails during compileJava
with the following:
error: Could not locate @Accessor target fabric_currentPage in target net.minecraft.client.gui.screen.ingame.CreativeInventoryScreen
However using
@Mixin(targets = "net.minecraft.client.gui.screen.ingame.CreativeInventoryScreen")
Works perfectly.
Have you tried changing the priority relative to the mixin which adds the field?
Yes, it's an AP error so that doesn't help.