Search in sources :

Example 1 with AsyncAdvancedExtractor

use of network.rs485.logisticspipes.module.AsyncAdvancedExtractor in project LogisticsPipes by RS485.

the class AdvancedExtractorModuleInHand method getContainer.

@Override
public DummyContainer getContainer(EntityPlayer player) {
    DummyModuleContainer dummy = new DummyModuleContainer(player, getInvSlot());
    if (!(dummy.getModule() instanceof AsyncAdvancedExtractor)) {
        return null;
    }
    dummy.setInventory(((AsyncAdvancedExtractor) 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 : DummyModuleContainer(logisticspipes.utils.gui.DummyModuleContainer) AsyncAdvancedExtractor(network.rs485.logisticspipes.module.AsyncAdvancedExtractor)

Example 2 with AsyncAdvancedExtractor

use of network.rs485.logisticspipes.module.AsyncAdvancedExtractor in project LogisticsPipes by RS485.

the class AdvancedExtractorSneakyGuiPacket method processPacket.

@Override
public void processPacket(EntityPlayer player) {
    if (getType() == ModulePositionType.IN_HAND) {
        if (player.openContainer instanceof DummyModuleContainer) {
            DummyModuleContainer dummy = (DummyModuleContainer) player.openContainer;
            if (dummy.getModule() instanceof AsyncAdvancedExtractor) {
                player.closeScreen();
                NewGuiHandler.getGui(SneakyModuleInHandGuiProvider.class).setInvSlot(getPositionInt()).open(player);
            }
        }
        return;
    }
    PipeLogisticsChassis pipe = getTileOrPipe(player.world, PipeLogisticsChassis.class);
    LogisticsModule subModule = pipe.getSubModule(getPositionInt());
    if (subModule instanceof AsyncAdvancedExtractor) {
        NewGuiHandler.getGui(SneakyModuleInSlotGuiProvider.class).setSneakyOrientation(((AsyncAdvancedExtractor) subModule).getSneakyDirection()).setSlot(getType()).setPositionInt(getPositionInt()).setPosX(getPosX()).setPosY(getPosY()).setPosZ(getPosZ()).open(player);
    }
}
Also used : DummyModuleContainer(logisticspipes.utils.gui.DummyModuleContainer) LogisticsModule(logisticspipes.modules.LogisticsModule) PipeLogisticsChassis(logisticspipes.pipes.PipeLogisticsChassis) AsyncAdvancedExtractor(network.rs485.logisticspipes.module.AsyncAdvancedExtractor) SneakyModuleInSlotGuiProvider(logisticspipes.network.guis.module.inpipe.SneakyModuleInSlotGuiProvider)

Example 3 with AsyncAdvancedExtractor

use of network.rs485.logisticspipes.module.AsyncAdvancedExtractor in project LogisticsPipes by RS485.

the class AdvancedExtractorModuleSlot method getClientGui.

@Override
public Object getClientGui(EntityPlayer player) {
    AsyncAdvancedExtractor module = this.getLogisticsModule(player.getEntityWorld(), AsyncAdvancedExtractor.class);
    if (module == null) {
        return null;
    }
    module.getItemsIncluded().setValue(areItemsIncluded);
    return new GuiAdvancedExtractor(player.inventory, module);
}
Also used : AsyncAdvancedExtractor(network.rs485.logisticspipes.module.AsyncAdvancedExtractor) GuiAdvancedExtractor(logisticspipes.gui.modules.GuiAdvancedExtractor)

Example 4 with AsyncAdvancedExtractor

use of network.rs485.logisticspipes.module.AsyncAdvancedExtractor in project LogisticsPipes by RS485.

the class AdvancedExtractorInclude method processPacket.

@Override
public void processPacket(EntityPlayer player) {
    AsyncAdvancedExtractor receiver = this.getLogisticsModule(player, AsyncAdvancedExtractor.class);
    if (receiver == null) {
        return;
    }
    receiver.getItemsIncluded().setValue(isFlag());
}
Also used : AsyncAdvancedExtractor(network.rs485.logisticspipes.module.AsyncAdvancedExtractor)

Aggregations

AsyncAdvancedExtractor (network.rs485.logisticspipes.module.AsyncAdvancedExtractor)4 DummyModuleContainer (logisticspipes.utils.gui.DummyModuleContainer)2 GuiAdvancedExtractor (logisticspipes.gui.modules.GuiAdvancedExtractor)1 LogisticsModule (logisticspipes.modules.LogisticsModule)1 SneakyModuleInSlotGuiProvider (logisticspipes.network.guis.module.inpipe.SneakyModuleInSlotGuiProvider)1 PipeLogisticsChassis (logisticspipes.pipes.PipeLogisticsChassis)1