diff --git a/common/src/main/java/fr/username404/snowygui/mixins/TitleScreenMixin.java b/common/src/main/java/fr/username404/snowygui/mixins/TitleScreenMixin.java new file mode 100644 index 0000000..341ef7a --- /dev/null +++ b/common/src/main/java/fr/username404/snowygui/mixins/TitleScreenMixin.java @@ -0,0 +1,14 @@ +package fr.username404.snowygui.mixins; + +import fr.username404.snowygui.ClickGui; +import net.minecraft.client.gui.screens.TitleScreen; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Inject; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; + +@Mixin(TitleScreen.class) +public class TitleScreenMixin { + @Inject(method = "createNormalMenuOptions", at = @At("RETURN")) + public void createNormalMenuOptions(int i, int j, CallbackInfo ci) { ClickGui.INSTANCE.tick(); } +} diff --git a/common/src/main/resources/snowygui-mixins.json b/common/src/main/resources/snowygui-mixins.json index a0f5268..6b8c6ca 100644 --- a/common/src/main/resources/snowygui-mixins.json +++ b/common/src/main/resources/snowygui-mixins.json @@ -5,7 +5,8 @@ "client": [ "KeysAccessor", "KeyMappings", - "EndTickMixin" + "EndTickMixin", + "TitleScreenMixin" ], "injectors": { "defaultRequire": 1