1 package com.irtimaled.bbor.mixin.client.gui;
3 import com.irtimaled.bbor.client.gui.SettingsScreenButton;
4 import net.minecraft.client.gui.GuiButton;
5 import net.minecraft.client.gui.GuiOptions;
6 import net.minecraft.client.gui.GuiScreen;
7 import org.spongepowered.asm.mixin.Mixin;
8 import org.spongepowered.asm.mixin.injection.At;
9 import org.spongepowered.asm.mixin.injection.Inject;
10 import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
12 @Mixin(GuiOptions.class)
13 public class MixinGuiOptions extends GuiScreen {
14 @Inject(method = "initGui", at = @At("RETURN"))
15 private void initGui(CallbackInfo ci) {
16 //shuffle middle buttons up by 12 px to make space
17 int top = this.height / 6 + 42;
18 int bottom = this.height / 6 + 168;
19 for (GuiButton button : buttons) {
20 if (button.y >= top && button.y < bottom)
23 this.addButton(new SettingsScreenButton(this.width / 2 - 155, top + 84, 150, "BBOR", this));