Search in sources :

Example 1 with ChassisModule

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

the class DummyContainer method handleSwitch.

private void handleSwitch(Slot slot2, @Nonnull ItemStack out, @Nonnull ItemStack in, EntityPlayer player) {
    if (slot2 instanceof ModuleSlot) {
        ChassisModule chassis = (ChassisModule) ((ModuleSlot) slot2).get_pipe().getLogisticsModule();
        int moduleIndex = ((ModuleSlot) slot2).get_moduleIndex();
        if (out.getItem() instanceof ItemModule) {
            if (chassis.hasModule(moduleIndex)) {
                ItemModuleInformationManager.saveInformation(out, chassis.getModule(moduleIndex));
                chassis.removeModule(moduleIndex);
            }
        }
    }
}
Also used : ChassisModule(logisticspipes.modules.ChassisModule) ItemModule(logisticspipes.items.ItemModule)

Aggregations

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