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);
}
}
}
}
Aggregations