Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,17 @@ public TitleScreenMixin(Component title) {

@Inject(method = "extractRenderState", at = @At("TAIL"))
private void onExtractRenderState(GuiGraphicsExtractor graphics, int mouseX, int mouseY, float a, CallbackInfo ci) {
if (Config.get().titleScreenCredits.get()) TitleScreenCredits.render(graphics);
// Minecraft 26.3 renders startup frames before Minecraft.<init> returns.
// Meteor initializes its systems at constructor TAIL; credits become
// available on the first frame after that normal initialization completes.
Config config = Config.get();
if (config != null && config.titleScreenCredits.get()) TitleScreenCredits.render(graphics);
}

@Inject(method = "mouseClicked", at = @At("HEAD"), cancellable = true)
private void onMouseClicked(MouseButtonEvent event, boolean doubleClick, CallbackInfoReturnable<Boolean> cir) {
if (Config.get().titleScreenCredits.get() && event.button() == InputConstants.MOUSE_BUTTON_LEFT) {
Config config = Config.get();
if (config != null && config.titleScreenCredits.get() && event.button() == InputConstants.MOUSE_BUTTON_LEFT) {
if (TitleScreenCredits.onClicked(event.x(), event.y())) cir.setReturnValue(true);
}
}
Expand Down