use of org.spongepowered.asm.mixin.injection.At in project Almura by AlmuraDev.
the class MixinGuiOptions method onInitGui.
// Add our button to the list and move the Done button lower
@Inject(method = "initGui", at = @At("RETURN"))
public void onInitGui(CallbackInfo ci) {
final GuiButton almuraButton = new GuiButton(301, this.width / 2 - 155, this.height / 6 + 144 - 6, 150, 20, "Almura");
this.buttonList.add(almuraButton);
/*
* Button IDs Buttons
* 108 = Difficulty
* 109 = Lock
* REALMS_NOTIFICATIONS ordinal = Realms notification
* 200 = Done
*/
// Move every button that isn't any of the above listed up by 12
this.buttonList.stream().filter(btn -> !(btn instanceof GuiOptionSlider) && btn.id != 200 && btn.id != 108 && btn.id != 109 && btn.id != GameSettings.Options.REALMS_NOTIFICATIONS.getOrdinal()).forEach(btn -> btn.y = btn.y - 12);
}
Aggregations