summaryrefslogtreecommitdiff
path: root/ihl/processing/metallurgy/ElectricEngineItem.java
diff options
context:
space:
mode:
authorFoghrye4 <foghrye4@gmail.com>2017-06-17 08:12:18 +0300
committerFoghrye4 <foghrye4@gmail.com>2017-06-17 08:12:18 +0300
commitdc3df3edd5843bde0c1335d6a8e460b2c832aa48 (patch)
treeaf13bfeee567f2351e35e1ef176d168fe37c8aac /ihl/processing/metallurgy/ElectricEngineItem.java
parent1da8dcd58647e34c9af94ceeecaeaf3b0d08c48c (diff)
full project files
Diffstat (limited to 'ihl/processing/metallurgy/ElectricEngineItem.java')
-rw-r--r--ihl/processing/metallurgy/ElectricEngineItem.java84
1 files changed, 0 insertions, 84 deletions
diff --git a/ihl/processing/metallurgy/ElectricEngineItem.java b/ihl/processing/metallurgy/ElectricEngineItem.java
deleted file mode 100644
index c1e0003..0000000
--- a/ihl/processing/metallurgy/ElectricEngineItem.java
+++ /dev/null
@@ -1,84 +0,0 @@
-package ihl.processing.metallurgy;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import cpw.mods.fml.common.registry.GameRegistry;
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
-import ihl.IHLCreativeTab;
-import ihl.IHLModInfo;
-import net.minecraft.client.renderer.texture.IIconRegister;
-import net.minecraft.item.Item;
-import net.minecraft.util.IIcon;
-
-public class ElectricEngineItem extends Item{
-
- public Type type;
- public static List<ElectricEngineItem> instances = new ArrayList<ElectricEngineItem> ();
- private static Map<Type, IIcon> iconMap = new HashMap<Type, IIcon>();
-
-
- public ElectricEngineItem(Type type1)
- {
- super();
- this.type=type1;
- this.setCreativeTab(IHLCreativeTab.tab);
- this.setUnlocalizedName(type.unLocalizedName);
- this.setMaxStackSize(1);
- instances.add(this);
- }
-
- public static void init()
- {
- Type[] var1 = Type.values();
- for(int i=0;i<var1.length;i++)
- {
- new ElectricEngineItem(var1[i]);
- }
- Iterator<ElectricEngineItem> ii = instances.iterator();
- while(ii.hasNext())
- {
- ElectricEngineItem instance = ii.next();
- GameRegistry.registerItem(instance,instance.type.unLocalizedName);
- }
- }
-
- @Override
- @SideOnly(Side.CLIENT)
- public void registerIcons(IIconRegister register)
- {
- iconMap.put(this.type, register.registerIcon(IHLModInfo.MODID + ":"+this.type.unLocalizedName));
- }
-
- @Override
- @SideOnly(Side.CLIENT)
- public IIcon getIconFromDamage(int i)
- {
- return iconMap.get(type);
- }
-
-
- public enum Type
- {
- LVLEElectricEngine("electricMotorLVLEDC", 600,400,0.2F,1500);
- Type(String unlocalizedName1, int maxVoltage1, int generatedVoltage1, float efficiency1,int rpm1)
- {
- unLocalizedName=unlocalizedName1;
- maxVoltage=maxVoltage1;
- generatedVoltage=generatedVoltage1;
- efficiency=efficiency1;
- rpm=rpm1;
- }
-
- public String unLocalizedName;
- public int maxVoltage=600;
- public int generatedVoltage=400;
- public float efficiency = 0.2F;
- public int rpm=1500;//at max voltage
- }
-
-}