Search in sources :

Example 11 with DummyContainer

use of logisticspipes.utils.gui.DummyContainer 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 12 with DummyContainer

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

the class SimpleFilterInventorySlot method getContainerFromFilterModule.

@Nullable
public static DummyContainer getContainerFromFilterModule(ModuleCoordinatesGuiProvider guiProvider, EntityPlayer player) {
    SimpleFilter filter = guiProvider.getLogisticsModule(player.getEntityWorld(), SimpleFilter.class);
    if (filter == null) {
        return null;
    }
    DummyContainer dummy = new DummyContainer(player.inventory, filter.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) GuiSimpleFilter(logisticspipes.gui.modules.GuiSimpleFilter) SimpleFilter(network.rs485.logisticspipes.module.SimpleFilter) Nullable(javax.annotation.Nullable)

Example 13 with DummyContainer

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

the class CraftingModuleSlot method getContainer.

@Override
public DummyContainer getContainer(EntityPlayer player) {
    ModuleCrafter module = this.getLogisticsModule(player.getEntityWorld(), ModuleCrafter.class);
    if (module == null) {
        return null;
    }
    MainProxy.sendPacketToPlayer(module.getCPipePacket(), player);
    DummyContainer dummy = new DummyContainer(player, module.dummyInventory, module);
    dummy.addNormalSlotsForPlayerInventory(18, 97);
    // Input slots
    for (int l = 0; l < 9; l++) {
        dummy.addFuzzyDummySlot(l, 18 + l * 18, 18, module.inputFuzzy(l));
    }
    // Output slot
    dummy.addFuzzyDummySlot(9, 90, 64, module.outputFuzzy());
    for (int i = 0; i < liquidCrafter; i++) {
        int liquidLeft = -(i * 40) - 40;
        dummy.addFluidSlot(i, module.liquidInventory, liquidLeft + 13, 42);
    }
    if (hasByproductExtractor) {
        dummy.addDummySlot(10, 197, 104);
    }
    for (int Y = 0; Y < cleanupSize; Y++) {
        for (int X = 0; X < 3; X++) {
            dummy.addDummySlot(Y * 3 + X, module.cleanupInventory, X * 18 - 57, Y * 18 + 13);
        }
    }
    return dummy;
}
Also used : DummyContainer(logisticspipes.utils.gui.DummyContainer) ModuleCrafter(logisticspipes.modules.ModuleCrafter)

Example 14 with DummyContainer

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

the class AutoCraftingGui method getContainer.

@Override
public DummyContainer getContainer(EntityPlayer player) {
    LogisticsCraftingTableTileEntity tile = getTileAs(player.world, LogisticsCraftingTableTileEntity.class);
    DummyContainer dummy = new DummyContainer(player, tile.matrix, tile);
    for (int X = 0; X < 3; X++) {
        for (int Y = 0; Y < 3; Y++) {
            dummy.addFuzzyDummySlot(Y * 3 + X, 35 + X * 18, 10 + Y * 18, tile.inputFuzzy(Y * 3 + X));
        }
    }
    dummy.addFuzzyUnmodifiableSlot(0, tile.resultInv, 125, 28, tile.outputFuzzy());
    for (int Y = 0; Y < 2; Y++) {
        for (int X = 0; X < 9; X++) {
            dummy.addNormalSlot(Y * 9 + X, tile.inv, 8 + X * 18, 80 + Y * 18);
        }
    }
    dummy.addNormalSlotsForPlayerInventory(8, 135);
    return dummy;
}
Also used : DummyContainer(logisticspipes.utils.gui.DummyContainer) LogisticsCraftingTableTileEntity(logisticspipes.blocks.crafting.LogisticsCraftingTableTileEntity)

Example 15 with DummyContainer

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

the class PowerProviderGui method getContainer.

@Override
public DummyContainer getContainer(EntityPlayer player) {
    DummyContainer dummy = new DummyContainer(player, null, getTileAs(player.world, LogisticsPowerProviderTileEntity.class));
    dummy.addNormalSlotsForPlayerInventory(8, 80);
    return dummy;
}
Also used : DummyContainer(logisticspipes.utils.gui.DummyContainer) LogisticsPowerProviderTileEntity(logisticspipes.blocks.powertile.LogisticsPowerProviderTileEntity)

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