Search in sources :

Example 1 with ModuleElectricManager

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

the class ElectricModuleSlot method getClientGui.

@Override
public Object getClientGui(EntityPlayer player) {
    ModuleElectricManager module = this.getLogisticsModule(player.getEntityWorld(), ModuleElectricManager.class);
    if (module == null) {
        return null;
    }
    module.setDischargeMode(isFlag());
    return new GuiElectricManager(player.inventory, module);
}
Also used : ModuleElectricManager(logisticspipes.modules.ModuleElectricManager) GuiElectricManager(logisticspipes.gui.modules.GuiElectricManager)

Example 2 with ModuleElectricManager

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

the class ElectricModuleInHand method getContainer.

@Override
public DummyContainer getContainer(EntityPlayer player) {
    DummyModuleContainer dummy = new DummyModuleContainer(player, getInvSlot());
    if (!(dummy.getModule() instanceof ModuleElectricManager)) {
        return null;
    }
    dummy.setInventory(((ModuleElectricManager) dummy.getModule()).getFilterInventory());
    dummy.addNormalSlotsForPlayerInventory(8, 60);
    //Pipe slots
    for (int pipeSlot = 0; pipeSlot < 9; pipeSlot++) {
        dummy.addDummySlot(pipeSlot, 8 + pipeSlot * 18, 18);
    }
    return dummy;
}
Also used : ModuleElectricManager(logisticspipes.modules.ModuleElectricManager) DummyModuleContainer(logisticspipes.utils.gui.DummyModuleContainer)

Example 3 with ModuleElectricManager

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

the class ElectricManagerPacket method processPacket.

@Override
public void processPacket(EntityPlayer player) {
    ModuleElectricManager module = this.getLogisticsModule(player, ModuleElectricManager.class);
    if (module == null) {
        return;
    }
    module.setDischargeMode(isFlag());
}
Also used : ModuleElectricManager(logisticspipes.modules.ModuleElectricManager)

Example 4 with ModuleElectricManager

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

the class ElectricManagetMode method processPacket.

@Override
public void processPacket(EntityPlayer player) {
    ModuleElectricManager module = this.getLogisticsModule(player, ModuleElectricManager.class);
    if (module == null) {
        return;
    }
    module.setDischargeMode(isFlag());
}
Also used : ModuleElectricManager(logisticspipes.modules.ModuleElectricManager)

Example 5 with ModuleElectricManager

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

the class ElectricModuleSlot method getContainer.

@Override
public DummyContainer getContainer(EntityPlayer player) {
    ModuleElectricManager module = this.getLogisticsModule(player.getEntityWorld(), ModuleElectricManager.class);
    if (module == null) {
        return null;
    }
    DummyContainer dummy = new DummyContainer(player.inventory, module.getFilterInventory());
    dummy.addNormalSlotsForPlayerInventory(8, 60);
    //Pipe slots
    for (int pipeSlot = 0; pipeSlot < 9; pipeSlot++) {
        dummy.addDummySlot(pipeSlot, 8 + pipeSlot * 18, 18);
    }
    return dummy;
}
Also used : ModuleElectricManager(logisticspipes.modules.ModuleElectricManager) DummyContainer(logisticspipes.utils.gui.DummyContainer)

Aggregations

ModuleElectricManager (logisticspipes.modules.ModuleElectricManager)5 GuiElectricManager (logisticspipes.gui.modules.GuiElectricManager)1 DummyContainer (logisticspipes.utils.gui.DummyContainer)1 DummyModuleContainer (logisticspipes.utils.gui.DummyModuleContainer)1