Search in sources :

Example 1 with ModuleOreDictItemSink

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

the class OreDictItemSinkModuleSlot method getClientGui.

@Override
public Object getClientGui(EntityPlayer player) {
    ModuleOreDictItemSink module = this.getLogisticsModule(player.getEntityWorld(), ModuleOreDictItemSink.class);
    if (module == null) {
        return null;
    }
    module.readFromNBT(getNbt());
    return new GuiOreDictItemSink(player.inventory, module);
}
Also used : GuiOreDictItemSink(logisticspipes.gui.modules.GuiOreDictItemSink) ModuleOreDictItemSink(logisticspipes.modules.ModuleOreDictItemSink)

Example 2 with ModuleOreDictItemSink

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

the class OreDictItemSinkModuleSlot method getContainer.

@Override
public DummyContainer getContainer(EntityPlayer player) {
    ModuleOreDictItemSink module = this.getLogisticsModule(player.getEntityWorld(), ModuleOreDictItemSink.class);
    if (module == null) {
        return null;
    }
    DummyContainer dummy = new DummyContainer(player.inventory, new ItemIdentifierInventory(1, "TMP", 1));
    dummy.addDummySlot(0, 0, 0);
    dummy.addNormalSlotsForPlayerInventory(0, 0);
    return dummy;
}
Also used : DummyContainer(logisticspipes.utils.gui.DummyContainer) ItemIdentifierInventory(logisticspipes.utils.item.ItemIdentifierInventory) ModuleOreDictItemSink(logisticspipes.modules.ModuleOreDictItemSink)

Example 3 with ModuleOreDictItemSink

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

the class OreDictItemSinkModuleInHand method getContainer.

@Override
public DummyContainer getContainer(EntityPlayer player) {
    DummyModuleContainer dummy = new DummyModuleContainer(player, getInvSlot());
    if (!(dummy.getModule() instanceof ModuleOreDictItemSink)) {
        return null;
    }
    dummy.setInventory(new ItemIdentifierInventory(1, "TMP", 1));
    dummy.addDummySlot(0, 0, 0);
    dummy.addNormalSlotsForPlayerInventory(0, 0);
    return dummy;
}
Also used : DummyModuleContainer(logisticspipes.utils.gui.DummyModuleContainer) ItemIdentifierInventory(logisticspipes.utils.item.ItemIdentifierInventory) ModuleOreDictItemSink(logisticspipes.modules.ModuleOreDictItemSink)

Example 4 with ModuleOreDictItemSink

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

the class OreDictItemSinkList method processPacket.

@Override
public void processPacket(EntityPlayer player) {
    ModuleOreDictItemSink module = this.getLogisticsModule(player, ModuleOreDictItemSink.class);
    if (module == null) {
        return;
    }
    module.readFromNBT(getTag());
    if (MainProxy.isServer(player.getEntityWorld()) && getType().isInWorld()) {
        module.OreListChanged();
    }
}
Also used : ModuleOreDictItemSink(logisticspipes.modules.ModuleOreDictItemSink)

Aggregations

ModuleOreDictItemSink (logisticspipes.modules.ModuleOreDictItemSink)4 ItemIdentifierInventory (logisticspipes.utils.item.ItemIdentifierInventory)2 GuiOreDictItemSink (logisticspipes.gui.modules.GuiOreDictItemSink)1 DummyContainer (logisticspipes.utils.gui.DummyContainer)1 DummyModuleContainer (logisticspipes.utils.gui.DummyModuleContainer)1