Search in sources :

Example 21 with DummyContainer

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

the class ElectricModuleSlot method getContainer.

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

Example 22 with DummyContainer

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

the class SimpleFilterInventorySlot method getContainer.

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

Example 23 with DummyContainer

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

the class FluidSupplierSlot method getContainer.

@Override
public DummyContainer getContainer(EntityPlayer player) {
    ModuleFluidSupplier module = this.getLogisticsModule(player.getEntityWorld(), ModuleFluidSupplier.class);
    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) ModuleFluidSupplier(logisticspipes.modules.ModuleFluidSupplier)

Example 24 with DummyContainer

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

the class ActiveSupplierSlot method getContainer.

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

Example 25 with DummyContainer

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

the class LogisticsPlayerSettingsGuiProvider method getContainer.

@Override
public Container getContainer(EntityPlayer player) {
    DummyContainer dummy = new DummyContainer(player.inventory, null);
    // server does not care where the slots are
    dummy.addNormalSlotsForPlayerInventory(0, 0);
    return dummy;
}
Also used : DummyContainer(logisticspipes.utils.gui.DummyContainer)

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