Search in sources :

Example 1 with GuiEditInventoryGenItems

use of ivorius.reccomplex.gui.inventorygen.GuiEditInventoryGenItems in project RecurrentComplex by Ivorforce.

the class RCGuiHandler method getClientGuiElement.

@Override
public Object getClientGuiElement(int id, EntityPlayer player, ByteBuf data) {
    if (id == editInventoryGen || id == editInventoryGenItems) {
        String key = ByteBufUtils.readUTF8String(data);
        Component component = ItemCollectionSaveHandler.INSTANCE.read(data);
        SaveDirectoryData saveDirectoryData = SaveDirectoryData.readFrom(data);
        if (component != null) {
            if (id == editInventoryGen)
                return new GuiEditInventoryGen(player, component, key, saveDirectoryData);
            else
                return new GuiEditInventoryGenItems(player, component, key, saveDirectoryData);
        }
    }
    return null;
}
Also used : GuiEditInventoryGen(ivorius.reccomplex.gui.inventorygen.GuiEditInventoryGen) SaveDirectoryData(ivorius.reccomplex.utils.SaveDirectoryData) GuiEditInventoryGenItems(ivorius.reccomplex.gui.inventorygen.GuiEditInventoryGenItems) Component(ivorius.reccomplex.world.storage.loot.GenericItemCollection.Component)

Aggregations

GuiEditInventoryGen (ivorius.reccomplex.gui.inventorygen.GuiEditInventoryGen)1 GuiEditInventoryGenItems (ivorius.reccomplex.gui.inventorygen.GuiEditInventoryGenItems)1 SaveDirectoryData (ivorius.reccomplex.utils.SaveDirectoryData)1 Component (ivorius.reccomplex.world.storage.loot.GenericItemCollection.Component)1