Initialize ClickGui.kt in the titlescreen by adding a mixin

This commit is contained in:
Username404-59 2021-05-04 13:46:31 +02:00
parent f72acaaf9a
commit 7b1aa0f876
Signed by: Username404-59
GPG Key ID: 7AB361FBB257A5D1
2 changed files with 16 additions and 1 deletions

View File

@ -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(); }
}

View File

@ -5,7 +5,8 @@
"client": [
"KeysAccessor",
"KeyMappings",
"EndTickMixin"
"EndTickMixin",
"TitleScreenMixin"
],
"injectors": {
"defaultRequire": 1