use of meteordevelopment.meteorclient.events.game.OpenScreenEvent in project meteor-client by MeteorDevelopment.
the class MinecraftClientMixin method onSetScreen.
@Inject(method = "setScreen", at = @At("HEAD"), cancellable = true)
private void onSetScreen(Screen screen, CallbackInfo info) {
if (screen instanceof WidgetScreen)
screen.mouseMoved(mouse.getX() * window.getScaleFactor(), mouse.getY() * window.getScaleFactor());
OpenScreenEvent event = OpenScreenEvent.get(screen);
MeteorClient.EVENT_BUS.post(event);
if (event.isCancelled())
info.cancel();
}
Aggregations