Skip to content
This repository was archived by the owner on Jan 6, 2026. It is now read-only.

Quickstart and Basic Setup

Garkatron edited this page Dec 26, 2024 · 2 revisions

Mixin and Interfaces

You ill need use the classic way to add a custom GUI but with you GUI that extends from AdvancedGuiContainer

Block Container

package deus.guilib.examples.exampleGui;


import deus.guilib.interfaces.IPage;
import deus.guilib.guimanagement.AdvancedContainer;
import net.minecraft.core.entity.player.EntityPlayer;
import net.minecraft.core.player.inventory.IInventory;

public class ExampleContainer extends AdvancedContainer {

	public ExampleContainer(IPage page, IInventory inventory, IInventory playerInventory) {
		super(page, inventory, playerInventory);
	}

	@Override
	public boolean isUsableByPlayer(EntityPlayer entityPlayer) {
		return true;
	}
}

Block GUI

package deus.guilib.examples.exampleGui;

import deus.guilib.guimanagement.AdvancedGuiContainer;
import deus.guilib.guimanagement.routing.Page;
import net.minecraft.core.player.inventory.IInventory;

public class ExampleGui extends AdvancedGuiContainer {
	private static final Page page = new ExamplePage(router);

	static {
		router.registerRoute("0ºhome", page);
		router.navigateTo("0ºhome");

	}

	public ExampleGui(IInventory inventory, IInventory playerInventory) {
		super(new ExampleContainer(page, inventory, playerInventory));
	}



}

Your GUI Logic

package deus.guilib.examples.exampleGui;

import deus.guilib.GuiLib;
import deus.guilib.guimanagement.routing.Page;
import deus.guilib.guimanagement.routing.Router;

public class ExamplePage extends Page {

	public ExamplePage(Router router, String... text) {
		super(GuiLib.class, router);

		xmlPath = "path/to/your/xml/file.xml";

                setup(()->{
                  // GUI Logic Here
                })

		// ! DON'T DELETE IT
		reload();

	}
}

XML AND YAML

Use schemas for autocompletion

Using templates from xml and from java

Clone this wiki locally