Search in sources :

Example 1 with IStringBasedModule

use of logisticspipes.interfaces.IStringBasedModule in project LogisticsPipes by RS485.

the class StringBasedItemSinkModuleGuiSlot method getClientGui.

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

Example 2 with IStringBasedModule

use of logisticspipes.interfaces.IStringBasedModule in project LogisticsPipes by RS485.

the class ModuleBasedItemSinkList method processPacket.

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

Example 3 with IStringBasedModule

use of logisticspipes.interfaces.IStringBasedModule in project LogisticsPipes by RS485.

the class StringBasedItemSinkModuleGuiInHand method getContainer.

@Override
public DummyContainer getContainer(EntityPlayer player) {
    DummyModuleContainer dummy = new DummyModuleContainer(player, getInvSlot());
    if (!(dummy.getModule() instanceof IStringBasedModule)) {
        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) IStringBasedModule(logisticspipes.interfaces.IStringBasedModule) ItemIdentifierInventory(logisticspipes.utils.item.ItemIdentifierInventory)

Example 4 with IStringBasedModule

use of logisticspipes.interfaces.IStringBasedModule in project LogisticsPipes by RS485.

the class StringBasedItemSinkModuleGuiSlot method getContainer.

@Override
public DummyContainer getContainer(EntityPlayer player) {
    IStringBasedModule module = this.getLogisticsModule(player.getEntityWorld(), IStringBasedModule.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) IStringBasedModule(logisticspipes.interfaces.IStringBasedModule) ItemIdentifierInventory(logisticspipes.utils.item.ItemIdentifierInventory)

Aggregations

IStringBasedModule (logisticspipes.interfaces.IStringBasedModule)4 ItemIdentifierInventory (logisticspipes.utils.item.ItemIdentifierInventory)2 GuiStringBasedItemSink (logisticspipes.gui.modules.GuiStringBasedItemSink)1 DummyContainer (logisticspipes.utils.gui.DummyContainer)1 DummyModuleContainer (logisticspipes.utils.gui.DummyModuleContainer)1