Search in sources :

Example 6 with ModuleItemSink

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

the class ItemSinkDefault method processPacket.

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

Example 7 with ModuleItemSink

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

the class ItemSinkInHand method getContainer.

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

Aggregations

ModuleItemSink (logisticspipes.modules.ModuleItemSink)7 DummyContainer (logisticspipes.utils.gui.DummyContainer)2 GuiItemSink (logisticspipes.gui.modules.GuiItemSink)1 DummyModuleContainer (logisticspipes.utils.gui.DummyModuleContainer)1