use of network.rs485.logisticspipes.module.SimpleFilter 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;
}
use of network.rs485.logisticspipes.module.SimpleFilter in project LogisticsPipes by RS485.
the class SimpleFilterInventoryInHand method getContainer.
@Override
public DummyContainer getContainer(EntityPlayer player) {
DummyModuleContainer dummy = new DummyModuleContainer(player, getInvSlot());
if (!(dummy.getModule() instanceof SimpleFilter)) {
return null;
}
dummy.setInventory(((SimpleFilter) dummy.getModule()).getFilterInventory());
dummy.addNormalSlotsForPlayerInventory(8, 60);
// Pipe slots
for (int pipeSlot = 0; pipeSlot < 9; pipeSlot++) {
dummy.addDummySlot(pipeSlot, 8 + pipeSlot * 18, 18);
}
return dummy;
}
Aggregations