}
continue;
}
if (stack.getItem() instanceof ItemModule){
LogisticsModule current = _module.getModule(i);
LogisticsModule next = ((ItemModule)stack.getItem()).getModuleForItem(stack, _module.getModule(i), this, this);
next.registerPosition(ModulePositionType.SLOT, i);
next.registerCCEventQueuer(this);
if (current != next){
_module.installModule(i, next);
if(!MainProxy.isClient()) {
ItemModuleInformationManager.readInformation(stack, next);
}
ItemModuleInformationManager.removeInformation(stack);
}
inventory.setInventorySlotContents(i,stack);
}
}
if (reInitGui) {
if(MainProxy.isClient(this.getWorld())) {
if (FMLClientHandler.instance().getClient().currentScreen instanceof GuiChassiPipe){
FMLClientHandler.instance().getClient().currentScreen.initGui();
}
}
}
if(MainProxy.isServer()) {
if(!localModeWatchers.isEmpty()) {
MainProxy.sendToPlayerList(PacketHandler.getPacket(ChassiePipeModuleContent.class).setIdentList(ItemIdentifierStack.getListFromInventory(_moduleInventory)).setPosX(getX()).setPosY(getY()).setPosZ(getZ()), localModeWatchers);
}
//register earlier provider modules with later ones, needed for the "who is the first whose filter allows that item" check
List<ILegacyActiveModule> prevModules = new LinkedList<ILegacyActiveModule>();
for (int i = 0; i < this.getChassiSize(); i++){
LogisticsModule x = _module.getSubModule(i);
if (x instanceof ILegacyActiveModule) {
ILegacyActiveModule y = (ILegacyActiveModule)x;
y.registerPreviousLegacyModules(new ArrayList<ILegacyActiveModule>(prevModules));
prevModules.add(y);
}