Skip to content

I need help with adding a button to the main menu #1795

Closed Answered by F5T3
Discussion options

You must be logged in to vote

Do this:
`package pack1.pack2.pack3;

import net.minecraft.client.gui.screen.Screen;
import net.minecraft.client.gui.screen.TitleScreen;
import net.minecraft.client.gui.screen.world.SelectWorldScreen;
import net.minecraft.client.gui.widget.ButtonWidget;
import net.minecraft.text.Text;
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 FilesName extends Screen {

protected FilesName (Text title) {
    super(title);
}

@Inject(at = @At("RETURN"), method = "initWidgetsNormal")
private void addMods…

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
3 replies
@JonasunderscoreJones
Comment options

@tanchevk
Comment options

@JFronny
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by JonasunderscoreJones
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
5 participants