use of com.mart.solar.client.gui.GuiBook in project Solar by Martacus.
the class GuiCategoryButton method openCategory.
public void openCategory() {
GuiBook guiBook = GuiPagesManager.getPlayerGUI(Minecraft.getMinecraft().player);
guiBook.clearList();
guiBook.setCurrentGui(this.category);
Minecraft.getMinecraft().displayGuiScreen(this.category);
}
use of com.mart.solar.client.gui.GuiBook in project Solar by Martacus.
the class GuiPage method mouseClicked.
@Override
protected void mouseClicked(int mouseX, int mouseY, int mouseButton) throws IOException {
super.mouseClicked(mouseX, mouseY, mouseButton);
if (mouseButton == 1) {
GuiBook playerGui = GuiPagesManager.getPlayerGUI(Minecraft.getMinecraft().player);
Minecraft.getMinecraft().displayGuiScreen(playerGui.getPreviousGui());
}
this.pageComponents.forEach(pg -> pg.mouseClicked(mouseX, mouseY));
}
use of com.mart.solar.client.gui.GuiBook in project Solar by Martacus.
the class PageRitualComponent method mouseClicked.
@Override
public void mouseClicked(int mouseX, int mouseY) {
if (!this.hovered) {
return;
}
GuiRitualVisualizer ritualVisualizer = new GuiRitualVisualizer(this.ritual);
GuiBook book = GuiPagesManager.getPlayerGUI(Minecraft.getMinecraft().player);
book.setCurrentGui(ritualVisualizer);
Minecraft.getMinecraft().displayGuiScreen(ritualVisualizer);
}
use of com.mart.solar.client.gui.GuiBook in project Solar by Martacus.
the class BookButton method openPage.
public void openPage() {
GuiPage newPage = page.getNewInstance();
GuiBook guiBook = GuiPagesManager.getPlayerGUI(Minecraft.getMinecraft().player);
guiBook.setCurrentGui(newPage);
Minecraft.getMinecraft().displayGuiScreen(newPage);
}
Aggregations