Search in sources :

Example 1 with DummyContainer

use of logisticspipes.utils.gui.DummyContainer in project LogisticsPipes by RS485.

the class ThaumicAspectSinkModuleSlot method getContainer.

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

Example 2 with DummyContainer

use of logisticspipes.utils.gui.DummyContainer in project LogisticsPipes by RS485.

the class ItemSinkSlot method getContainer.

@Override
public DummyContainer getContainer(EntityPlayer player) {
    ModuleItemSink module = this.getLogisticsModule(player.getEntityWorld(), ModuleItemSink.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 : DummyContainer(logisticspipes.utils.gui.DummyContainer) ModuleItemSink(logisticspipes.modules.ModuleItemSink)

Example 3 with DummyContainer

use of logisticspipes.utils.gui.DummyContainer in project LogisticsPipes by RS485.

the class AdvancedExtractorModuleSlot method getContainer.

@Override
public DummyContainer getContainer(EntityPlayer player) {
    ModuleAdvancedExtractor module = this.getLogisticsModule(player.getEntityWorld(), ModuleAdvancedExtractor.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 : DummyContainer(logisticspipes.utils.gui.DummyContainer) ModuleAdvancedExtractor(logisticspipes.modules.ModuleAdvancedExtractor)

Example 4 with DummyContainer

use of logisticspipes.utils.gui.DummyContainer in project LogisticsPipes by RS485.

the class ProviderModuleGuiProvider method getContainer.

@Override
public DummyContainer getContainer(EntityPlayer player) {
    ModuleProvider module = this.getLogisticsModule(player.getEntityWorld(), ModuleProvider.class);
    if (module == null) {
        return null;
    }
    DummyContainer dummy = new DummyContainer(player.inventory, module.getFilterInventory());
    dummy.addNormalSlotsForPlayerInventory(18, 97);
    int xOffset = 72;
    int yOffset = 18;
    for (int row = 0; row < 3; row++) {
        for (int column = 0; column < 3; column++) {
            dummy.addDummySlot(column + row * 3, xOffset + column * 18, yOffset + row * 18);
        }
    }
    return dummy;
}
Also used : DummyContainer(logisticspipes.utils.gui.DummyContainer) ModuleProvider(logisticspipes.modules.ModuleProvider)

Example 5 with DummyContainer

use of logisticspipes.utils.gui.DummyContainer in project LogisticsPipes by RS485.

the class ChassisGuiProvider method getContainer.

@Override
public DummyContainer getContainer(EntityPlayer player) {
    LogisticsTileGenericPipe pipe = getTileAs(player.world, LogisticsTileGenericPipe.class);
    if (!(pipe.pipe instanceof PipeLogisticsChassis)) {
        return null;
    }
    final PipeLogisticsChassis _chassiPipe = (PipeLogisticsChassis) pipe.pipe;
    IInventory _moduleInventory = _chassiPipe.getModuleInventory();
    DummyContainer dummy = new DummyContainer(player.inventory, _moduleInventory);
    if (_chassiPipe.getChassisSize() < 5) {
        dummy.addNormalSlotsForPlayerInventory(18, 97);
    } else {
        dummy.addNormalSlotsForPlayerInventory(18, 174);
    }
    for (int i = 0; i < _chassiPipe.getChassisSize(); i++) {
        dummy.addModuleSlot(i, _moduleInventory, 19, 9 + 20 * i, _chassiPipe);
    }
    if (_chassiPipe.getUpgradeManager().hasUpgradeModuleUpgrade()) {
        for (int i = 0; i < _chassiPipe.getChassisSize(); i++) {
            final int fI = i;
            ModuleUpgradeManager upgradeManager = _chassiPipe.getModuleUpgradeManager(i);
            dummy.addUpgradeSlot(0, upgradeManager, 0, 145, 9 + i * 20, itemStack -> ChassisGuiProvider.checkStack(itemStack, _chassiPipe, fI));
            dummy.addUpgradeSlot(1, upgradeManager, 1, 165, 9 + i * 20, itemStack -> ChassisGuiProvider.checkStack(itemStack, _chassiPipe, fI));
        }
    }
    return dummy;
}
Also used : IInventory(net.minecraft.inventory.IInventory) DummyContainer(logisticspipes.utils.gui.DummyContainer) LogisticsTileGenericPipe(logisticspipes.pipes.basic.LogisticsTileGenericPipe) PipeLogisticsChassis(logisticspipes.pipes.PipeLogisticsChassis) ModuleUpgradeManager(logisticspipes.pipes.upgrades.ModuleUpgradeManager)

Aggregations

DummyContainer (logisticspipes.utils.gui.DummyContainer)31 LogisticsTileGenericPipe (logisticspipes.pipes.basic.LogisticsTileGenericPipe)6 EntityPlayer (net.minecraft.entity.player.EntityPlayer)4 IGuiOpenControler (logisticspipes.interfaces.IGuiOpenControler)3 IInventory (net.minecraft.inventory.IInventory)3 TileEntity (net.minecraft.tileentity.TileEntity)3 Nullable (javax.annotation.Nullable)2 CoreRoutedPipe (logisticspipes.pipes.basic.CoreRoutedPipe)2 ItemIdentifierInventory (logisticspipes.utils.item.ItemIdentifierInventory)2 Iterator (java.util.Iterator)1 Map (java.util.Map)1 Objects (java.util.Objects)1 Stream (java.util.stream.Stream)1 Nonnull (javax.annotation.Nonnull)1 LogisticsProgramCompilerTileEntity (logisticspipes.blocks.LogisticsProgramCompilerTileEntity)1 LogisticsSecurityTileEntity (logisticspipes.blocks.LogisticsSecurityTileEntity)1 LogisticsSolderingTileEntity (logisticspipes.blocks.LogisticsSolderingTileEntity)1 LogisticsCraftingTableTileEntity (logisticspipes.blocks.crafting.LogisticsCraftingTableTileEntity)1 LogisticsPowerJunctionTileEntity (logisticspipes.blocks.powertile.LogisticsPowerJunctionTileEntity)1 LogisticsPowerProviderTileEntity (logisticspipes.blocks.powertile.LogisticsPowerProviderTileEntity)1