Closed
Description
Minecraft Development for IntelliJ plugin version
2024.1-1.7.5
IntelliJ version
2024.1.2 (Community)
Operating System
macOS 14.2
Target platform
Architectury
Description of the bug
With this mixin in MouseHandler
(1.21-pre1):
@Inject(method = "onScroll",
at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/screens/Screen;mouseScrolled(DDDD)Z", ordinal = 0), cancellable = true, locals = LocalCapture.CAPTURE_FAILHARD)
public void onMouseScrolled(long handle, double xOffset, double yOffset, CallbackInfo info, boolean discreteMouseScroll, double mouseWheelSensitivity, double amountX, double amountY, double x, double y) {
if (!info.isCancelled()) {
var result = ClientScreenInputEvent.MOUSE_SCROLLED_PRE.invoker().mouseScrolled(minecraft, minecraft.screen, x, y, amountX, amountY);
if (result.isPresent())
info.cancel();
}
}
yOffset
is mistaken as a local variable, even though it isn't (it launches fine)