use of network.rs485.logisticspipes.module.AsyncAdvancedExtractor in project LogisticsPipes by RS485.
the class AdvancedExtractorModuleInHand method getContainer.
@Override
public DummyContainer getContainer(EntityPlayer player) {
DummyModuleContainer dummy = new DummyModuleContainer(player, getInvSlot());
if (!(dummy.getModule() instanceof AsyncAdvancedExtractor)) {
return null;
}
dummy.setInventory(((AsyncAdvancedExtractor) 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;
}
use of network.rs485.logisticspipes.module.AsyncAdvancedExtractor in project LogisticsPipes by RS485.
the class AdvancedExtractorSneakyGuiPacket method processPacket.
@Override
public void processPacket(EntityPlayer player) {
if (getType() == ModulePositionType.IN_HAND) {
if (player.openContainer instanceof DummyModuleContainer) {
DummyModuleContainer dummy = (DummyModuleContainer) player.openContainer;
if (dummy.getModule() instanceof AsyncAdvancedExtractor) {
player.closeScreen();
NewGuiHandler.getGui(SneakyModuleInHandGuiProvider.class).setInvSlot(getPositionInt()).open(player);
}
}
return;
}
PipeLogisticsChassis pipe = getTileOrPipe(player.world, PipeLogisticsChassis.class);
LogisticsModule subModule = pipe.getSubModule(getPositionInt());
if (subModule instanceof AsyncAdvancedExtractor) {
NewGuiHandler.getGui(SneakyModuleInSlotGuiProvider.class).setSneakyOrientation(((AsyncAdvancedExtractor) subModule).getSneakyDirection()).setSlot(getType()).setPositionInt(getPositionInt()).setPosX(getPosX()).setPosY(getPosY()).setPosZ(getPosZ()).open(player);
}
}
use of network.rs485.logisticspipes.module.AsyncAdvancedExtractor in project LogisticsPipes by RS485.
the class AdvancedExtractorModuleSlot method getClientGui.
@Override
public Object getClientGui(EntityPlayer player) {
AsyncAdvancedExtractor module = this.getLogisticsModule(player.getEntityWorld(), AsyncAdvancedExtractor.class);
if (module == null) {
return null;
}
module.getItemsIncluded().setValue(areItemsIncluded);
return new GuiAdvancedExtractor(player.inventory, module);
}
use of network.rs485.logisticspipes.module.AsyncAdvancedExtractor in project LogisticsPipes by RS485.
the class AdvancedExtractorInclude method processPacket.
@Override
public void processPacket(EntityPlayer player) {
AsyncAdvancedExtractor receiver = this.getLogisticsModule(player, AsyncAdvancedExtractor.class);
if (receiver == null) {
return;
}
receiver.getItemsIncluded().setValue(isFlag());
}
Aggregations