Search in sources :

Example 6 with ModuleActiveSupplier

use of logisticspipes.modules.ModuleActiveSupplier in project LogisticsPipes by RS485.

the class ActiveSupplierSlot method getClientGui.

@Override
public Object getClientGui(EntityPlayer player) {
    ModuleActiveSupplier module = this.getLogisticsModule(player.getEntityWorld(), ModuleActiveSupplier.class);
    if (module == null) {
        return null;
    }
    module.setLimited(isLimit);
    if (patternUpgarde) {
        module.setPatternMode(PatternMode.values()[mode]);
    } else {
        module.setSupplyMode(SupplyMode.values()[mode]);
    }
    return new GuiSupplierPipe(player.inventory, module.getDummyInventory(), module, patternUpgarde, slotArray);
}
Also used : ModuleActiveSupplier(logisticspipes.modules.ModuleActiveSupplier) GuiSupplierPipe(logisticspipes.gui.GuiSupplierPipe)

Aggregations

ModuleActiveSupplier (logisticspipes.modules.ModuleActiveSupplier)6 DummyContainer (logisticspipes.utils.gui.DummyContainer)2 List (java.util.List)1 GuiSupplierPipe (logisticspipes.gui.GuiSupplierPipe)1 IInventoryUtil (logisticspipes.interfaces.IInventoryUtil)1 SidedInventoryMinecraftAdapter (logisticspipes.utils.SidedInventoryMinecraftAdapter)1 DummyModuleContainer (logisticspipes.utils.gui.DummyModuleContainer)1 IInventory (net.minecraft.inventory.IInventory)1 ISidedInventory (net.minecraft.inventory.ISidedInventory)1 Slot (net.minecraft.inventory.Slot)1 ItemStack (net.minecraft.item.ItemStack)1 NBTTagCompound (net.minecraft.nbt.NBTTagCompound)1 ChatComponentTranslation (net.minecraft.util.ChatComponentTranslation)1