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