Search in sources :

Example 1 with ChassiModule

use of logisticspipes.modules.ChassiModule in project LogisticsPipes by RS485.

the class DummyContainer method handleSwitch.

private void handleSwitch(Slot slot2, ItemStack out, ItemStack in, EntityPlayer player) {
    if (slot2 instanceof ModuleSlot) {
        ChassiModule logisticsModule = (ChassiModule) ((ModuleSlot) slot2).get_pipe().getLogisticsModule();
        int moduleIndex = ((ModuleSlot) slot2).get_moduleIndex();
        if (out.getItem() instanceof ItemModule) {
            ItemModuleInformationManager.saveInfotmation(out, logisticsModule.getSubModule(moduleIndex));
            if (logisticsModule.hasModule(moduleIndex)) {
                logisticsModule.removeModule(moduleIndex);
            }
        }
    }
}
Also used : ChassiModule(logisticspipes.modules.ChassiModule) ItemModule(logisticspipes.items.ItemModule)

Aggregations

ItemModule (logisticspipes.items.ItemModule)1 ChassiModule (logisticspipes.modules.ChassiModule)1