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;
}
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;
}
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;
}
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;
}
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;
}
Aggregations