use of net.minecraft.client.gui.screen.GameMenuScreen in project SpeedRunIGT by RedLime.
the class MinecraftClientMixin method drawTimer.
@Inject(method = "render", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/toast/ToastManager;draw(Lnet/minecraft/client/util/math/MatrixStack;)V", shift = At.Shift.AFTER))
private void drawTimer(CallbackInfo ci) {
this.profiler.swap("timer");
InGameTimer timer = InGameTimer.getInstance();
if (InGameTimerUtils.canUnpauseTimer(true)) {
if (!(SpeedRunOption.getOption(SpeedRunOptions.WAITING_FIRST_INPUT) && !timer.isStarted())) {
timer.setPause(false, "rendered");
} else {
timer.updateFirstRendered();
}
}
SpeedRunIGT.DEBUG_DATA = timer.getStatus().name();
if (!this.options.hudHidden && this.world != null && timer.getStatus() != TimerStatus.NONE && (!this.isPaused() || this.currentScreen instanceof CreditsScreen || this.currentScreen instanceof GameMenuScreen || !SpeedRunOption.getOption(SpeedRunOptions.HIDE_TIMER_IN_OPTIONS)) && !(!this.isPaused() && SpeedRunOption.getOption(SpeedRunOptions.HIDE_TIMER_IN_DEBUGS) && this.options.debugEnabled) && !(this.currentScreen instanceof TimerCustomizeScreen)) {
SpeedRunIGT.TIMER_DRAWER.draw();
}
}
Aggregations