// Path: src/minecraft/andrew/powersuits/common/AddonComponent.java
// public class AddonComponent {
//     public static ItemStack magnet;
//     public static ItemStack solarPanel;
//     public static ItemStack computerChip;
// 
//     public static void populate() {
//         if (ModularPowersuits.components != null) {
//             solarPanel = ModularPowersuits.components.addComponent("componentSolarPanel", "A light sensitive device that will generate electricity from the sun.", "solarpanel");
//             magnet = ModularPowersuits.components.addComponent("componentMagnet", "A metallic device that generates a magnetic field which pulls items towards the player.", "magnetb");
//             computerChip = ModularPowersuits.components.addComponent("componentComputerChip", "An upgraded control circuit that contains a CPU which is capable of more advanced calculations.", "computerchip");
//         }
//         else {
//             AddonLogger.logError("MPS components were not initialized, MPSA componenets will not be activated.");
//         }
//     }
// 
// }
// 
// Path: src/minecraft/andrew/powersuits/common/Localization.java
// public class Localization {
//     public static final String LANG_PATH = "/mods/PowersuitAddons/lang/";
//     public static String extractedLanguage = "";
// 
//     public static String getCurrentLanguage() {
//         return StringTranslate.getInstance().getCurrentLanguage();
//     }
// 
//     public static void loadCurrentLanguage() {
//         if (getCurrentLanguage() != extractedLanguage) {
//             extractedLanguage = getCurrentLanguage();
//         }
//         try {
//             InputStream inputStream = ModularPowersuitsAddons.INSTANCE.getClass().getResourceAsStream(LANG_PATH + extractedLanguage + ".lang");
//             Properties langPack = new Properties();
//             langPack.load(new InputStreamReader(inputStream, Charsets.UTF_8));
//             LanguageRegistry.instance().addStringLocalization(langPack, extractedLanguage);
//         } catch (Exception e) {
//             e.printStackTrace();
//             AddonLogger.logError("Couldn't read MPSA localizations for language " + extractedLanguage + " :(");
//         }
//     }
// 
//     public static String translate(String str) {
//         loadCurrentLanguage();
//         return StatCollector.translateToLocal(str);
//     }
// }


import andrew.powersuits.common.AddonComponent;
import andrew.powersuits.common.Localization;
import net.machinemuse.api.IModularItem;
import net.machinemuse.api.ModuleManager;
import net.machinemuse.api.moduletrigger.IPlayerTickModule;
import net.machinemuse.api.moduletrigger.IToggleableModule;
import net.machinemuse.powersuits.item.ItemComponent;
import net.machinemuse.powersuits.powermodule.PowerModuleBase;
import net.machinemuse.utils.ElectricItemUtils;
import net.machinemuse.utils.MuseCommonStrings;
import net.machinemuse.utils.MuseItemUtils;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import java.util.List;
package andrew.powersuits.modules;



public class MagnetModule extends PowerModuleBase implements IPlayerTickModule, IToggleableModule {
    public static final String MODULE_MAGNET = "Magnet";
    public static final String MAGNET_ENERGY_CONSUMPTION = "Energy Consumption";

    public MagnetModule(List<IModularItem> validItems) {
        super(validItems);
        addBaseProperty(MuseCommonStrings.WEIGHT, 1000);
        addInstallCost(MuseItemUtils.copyAndResize(AddonComponent.magnet, 2));
        addInstallCost(MuseItemUtils.copyAndResize(ItemComponent.controlCircuit, 1));
        addBaseProperty(MAGNET_ENERGY_CONSUMPTION, 200);
    }

    @Override
    public String getTextureFile() {
        return "magnetmodule";
    }

    @Override
    public String getCategory() {
        return MuseCommonStrings.CATEGORY_SPECIAL;
    }

    @Override
    public String getDataName() {
        return MODULE_MAGNET;
    }

    @Override
    public String getLocalizedName() {
// Path: src/minecraft/andrew/powersuits/common/AddonComponent.java
// public class AddonComponent {
//     public static ItemStack magnet;
//     public static ItemStack solarPanel;
//     public static ItemStack computerChip;
// 
//     public static void populate() {
//         if (ModularPowersuits.components != null) {
//             solarPanel = ModularPowersuits.components.addComponent("componentSolarPanel", "A light sensitive device that will generate electricity from the sun.", "solarpanel");
//             magnet = ModularPowersuits.components.addComponent("componentMagnet", "A metallic device that generates a magnetic field which pulls items towards the player.", "magnetb");
//             computerChip = ModularPowersuits.components.addComponent("componentComputerChip", "An upgraded control circuit that contains a CPU which is capable of more advanced calculations.", "computerchip");
//         }
//         else {
//             AddonLogger.logError("MPS components were not initialized, MPSA componenets will not be activated.");
//         }
//     }
// 
// }
// 
// Path: src/minecraft/andrew/powersuits/common/Localization.java
// public class Localization {
//     public static final String LANG_PATH = "/mods/PowersuitAddons/lang/";
//     public static String extractedLanguage = "";
// 
//     public static String getCurrentLanguage() {
//         return StringTranslate.getInstance().getCurrentLanguage();
//     }
// 
//     public static void loadCurrentLanguage() {
//         if (getCurrentLanguage() != extractedLanguage) {
//             extractedLanguage = getCurrentLanguage();
//         }
//         try {
//             InputStream inputStream = ModularPowersuitsAddons.INSTANCE.getClass().getResourceAsStream(LANG_PATH + extractedLanguage + ".lang");
//             Properties langPack = new Properties();
//             langPack.load(new InputStreamReader(inputStream, Charsets.UTF_8));
//             LanguageRegistry.instance().addStringLocalization(langPack, extractedLanguage);
//         } catch (Exception e) {
//             e.printStackTrace();
//             AddonLogger.logError("Couldn't read MPSA localizations for language " + extractedLanguage + " :(");
//         }
//     }
// 
//     public static String translate(String str) {
//         loadCurrentLanguage();
//         return StatCollector.translateToLocal(str);
//     }
// }


// Path: src/minecraft/andrew/powersuits/modules/MagnetModule.java
import andrew.powersuits.common.AddonComponent;
import andrew.powersuits.common.Localization;
import net.machinemuse.api.IModularItem;
import net.machinemuse.api.ModuleManager;
import net.machinemuse.api.moduletrigger.IPlayerTickModule;
import net.machinemuse.api.moduletrigger.IToggleableModule;
import net.machinemuse.powersuits.item.ItemComponent;
import net.machinemuse.powersuits.powermodule.PowerModuleBase;
import net.machinemuse.utils.ElectricItemUtils;
import net.machinemuse.utils.MuseCommonStrings;
import net.machinemuse.utils.MuseItemUtils;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import java.util.List;

package andrew.powersuits.modules;



public class MagnetModule extends PowerModuleBase implements IPlayerTickModule, IToggleableModule {
    public static final String MODULE_MAGNET = "Magnet";
    public static final String MAGNET_ENERGY_CONSUMPTION = "Energy Consumption";

    public MagnetModule(List<IModularItem> validItems) {
        super(validItems);
        addBaseProperty(MuseCommonStrings.WEIGHT, 1000);
        addInstallCost(MuseItemUtils.copyAndResize(AddonComponent.magnet, 2));
        addInstallCost(MuseItemUtils.copyAndResize(ItemComponent.controlCircuit, 1));
        addBaseProperty(MAGNET_ENERGY_CONSUMPTION, 200);
    }

    @Override
    public String getTextureFile() {
        return "magnetmodule";
    }

    @Override
    public String getCategory() {
        return MuseCommonStrings.CATEGORY_SPECIAL;
    }

    @Override
    public String getDataName() {
        return MODULE_MAGNET;
    }

    @Override
    public String getLocalizedName() {
        return Localization.translate("module.magnet.name");