diff options
author | Blood-Asp <bloodasphendrik@gmail.com> | 2016-10-30 22:39:40 +0100 |
---|---|---|
committer | Blood-Asp <bloodasphendrik@gmail.com> | 2016-10-30 22:39:40 +0100 |
commit | 814dc25690a60faaaeab710d0dad40fb4386b849 (patch) | |
tree | dc16a1911f585900367c35a623f9ad02e7e072fa /src/main/java/gregtech/common/items/armor/components | |
parent | ed724da44d7783705cb8fd503b3f4623b1cf1b86 (diff) | |
download | GT5-Unofficial-814dc25690a60faaaeab710d0dad40fb4386b849.tar.gz GT5-Unofficial-814dc25690a60faaaeab710d0dad40fb4386b849.tar.bz2 GT5-Unofficial-814dc25690a60faaaeab710d0dad40fb4386b849.zip |
Modular Armor changes 1
Diffstat (limited to 'src/main/java/gregtech/common/items/armor/components')
8 files changed, 492 insertions, 0 deletions
diff --git a/src/main/java/gregtech/common/items/armor/components/ArmorComponent.java b/src/main/java/gregtech/common/items/armor/components/ArmorComponent.java new file mode 100644 index 0000000000..caf33a3783 --- /dev/null +++ b/src/main/java/gregtech/common/items/armor/components/ArmorComponent.java @@ -0,0 +1,57 @@ +package gregtech.common.items.armor.components; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import gregtech.api.objects.ItemData; +import gregtech.api.util.GT_OreDictUnificator; +import gregtech.api.util.GT_Utility; +import gregtech.common.items.armor.ArmorData; +import net.minecraft.item.ItemStack; +import net.minecraftforge.oredict.OreDictionary; + +public abstract class ArmorComponent implements IArmorComponent { + public ItemStack mStack; + public String mOreDict; + public static Map<String, ArmorComponent> mOreDicts = new HashMap<String, ArmorComponent>(); + public static Map<String, ArmorComponent> mStacks = new HashMap<String, ArmorComponent>(); + public Map<StatType,Float> mStat = new HashMap<StatType,Float>(); + public Map<StatType,Boolean> mBStat = new HashMap<StatType,Boolean>(); + + public ArmorComponent(String aOreDict, boolean aElectric, float aWeight){ + mOreDict = aOreDict; + mBStat.put(StatType.ELECTRIC, aElectric); + mOreDicts.put(aOreDict, this); + for(ItemStack tStack : OreDictionary.getOres(aOreDict))if(tStack!=null)mStacks.put(tStack.getUnlocalizedName(), this); + mStat.put(StatType.WEIGHT, aWeight); + } + + public ArmorComponent(ItemStack aStack, boolean aElectric, float aWeight){ + mStack = aStack; + mBStat.put(StatType.ELECTRIC, aElectric); + mStacks.put(aStack.getUnlocalizedName(), this); + mStat.put(StatType.WEIGHT, aWeight); + } + + @Override + public boolean isArmorComponent(ItemStack aStack) { + if(mStack!=null && GT_Utility.areStacksEqual(mStack, aStack, true)){return true;} + if(mOreDict!=null){ + for(ItemStack tStack : OreDictionary.getOres(mOreDict)) + if(GT_Utility.areStacksEqual(tStack, aStack, true))return true;} + return false; + } + + public void addVal(StatType aType, ArmorData aArmorData){ + float tArmorDef = 0.0f; + if(aArmorData.mStat.containsKey(aType)){ + tArmorDef = aArmorData.mStat.get(aType); + aArmorData.mStat.remove(aType);} + aArmorData.mStat.put(aType, tArmorDef + mStat.get(aType)); + } + + public abstract void calculateArmor(ArmorData aArmorData); + +} diff --git a/src/main/java/gregtech/common/items/armor/components/ArmorComponentBattery.java b/src/main/java/gregtech/common/items/armor/components/ArmorComponentBattery.java new file mode 100644 index 0000000000..52ec405e98 --- /dev/null +++ b/src/main/java/gregtech/common/items/armor/components/ArmorComponentBattery.java @@ -0,0 +1,19 @@ +package gregtech.common.items.armor.components; + +import gregtech.common.items.armor.ArmorData; +import net.minecraft.item.ItemStack; + +public class ArmorComponentBattery extends ArmorComponent{ + public ArmorComponentBattery(ItemStack aStack, boolean aElectric, float aWeight, float aBatteryCapacity) { + super(aStack, aElectric, aWeight); + mStat.put(StatType.WEIGHT, aWeight); + mStat.put(StatType.BATTERYCAPACITY, aBatteryCapacity); + } + + @Override + public void calculateArmor(ArmorData aArmorData) { + addVal(StatType.WEIGHT, aArmorData); + addVal(StatType.BATTERYCAPACITY, aArmorData); + } + +} diff --git a/src/main/java/gregtech/common/items/armor/components/ArmorComponentFunction.java b/src/main/java/gregtech/common/items/armor/components/ArmorComponentFunction.java new file mode 100644 index 0000000000..99960d78f4 --- /dev/null +++ b/src/main/java/gregtech/common/items/armor/components/ArmorComponentFunction.java @@ -0,0 +1,22 @@ +package gregtech.common.items.armor.components; + +import gregtech.common.items.armor.ArmorData; +import net.minecraft.item.ItemStack; + +public class ArmorComponentFunction extends ArmorComponent{ + StatType mType; + public ArmorComponentFunction(ItemStack aStack, boolean aElectric, float aWeight, StatType aType, float aProcessingUsed) { + super(aStack, aElectric, aWeight); + mType = aType; + mStat.put(StatType.WEIGHT, aWeight); + mStat.put(StatType.PROCESSINGPOWERUSED, aProcessingUsed); + } + + @Override + public void calculateArmor(ArmorData aArmorData) { + addVal(StatType.WEIGHT, aArmorData); + addVal(StatType.PROCESSINGPOWERUSED, aArmorData); + if(!aArmorData.mBStat.containsKey(mType))aArmorData.mBStat.put(mType, true); + } + +} diff --git a/src/main/java/gregtech/common/items/armor/components/ArmorElectricComponent.java b/src/main/java/gregtech/common/items/armor/components/ArmorElectricComponent.java new file mode 100644 index 0000000000..a6cfb68f5b --- /dev/null +++ b/src/main/java/gregtech/common/items/armor/components/ArmorElectricComponent.java @@ -0,0 +1,30 @@ +package gregtech.common.items.armor.components; + +import gregtech.common.items.armor.ArmorData; +import net.minecraft.item.ItemStack; + +public class ArmorElectricComponent extends ArmorComponent{ + StatType mType1; + StatType mType2; + StatType mType3; + + public ArmorElectricComponent(ItemStack aStack, float aWeight, StatType aType1, float aValue1, StatType aType2, float aValue2, StatType aType3, float aValue3) { + super(aStack, true, aWeight); + mType1 = aType1; + mType2 = aType2; + mType3 = aType3; + mStat.put(StatType.WEIGHT, aWeight); + mStat.put(aType1, aValue1); + if(mType2!=null)mStat.put(mType2, aValue2); + if(mType3!=null)mStat.put(mType3, aValue3); + } + + @Override + public void calculateArmor(ArmorData aArmorData) { + addVal(mType1, aArmorData); + if(mType2!=null)addVal(mType2, aArmorData); + if(mType3!=null)addVal(mType3, aArmorData); + addVal(StatType.WEIGHT, aArmorData); + } + +} diff --git a/src/main/java/gregtech/common/items/armor/components/ArmorPlating.java b/src/main/java/gregtech/common/items/armor/components/ArmorPlating.java new file mode 100644 index 0000000000..6ee8095ce5 --- /dev/null +++ b/src/main/java/gregtech/common/items/armor/components/ArmorPlating.java @@ -0,0 +1,67 @@ +package gregtech.common.items.armor.components; + +import gregtech.common.items.armor.ArmorData; +import net.minecraft.item.ItemStack; + +public class ArmorPlating extends ArmorComponent{ + StatType mType; + public ArmorPlating(ItemStack aStack, float aWeight, float aPhysicalDef, float aProjectileDef, float aFireDef, float aMagicDef, float aExplosionDef, float aFallDef, float aRadiationDef, float aElectricDef, float aWitherDef) { + super(aStack, false, aWeight); + addStats(aPhysicalDef, aProjectileDef, aFireDef, aMagicDef, aExplosionDef, aFallDef, aRadiationDef, aElectricDef, aWitherDef); + } + + public ArmorPlating(String aOreDict, float aWeight, float aPhysicalDef, float aProjectileDef, float aFireDef, float aMagicDef, float aExplosionDef, float aFallDef, float aRadiationDef, float aElectricDef, float aWitherDef) { + super(aOreDict, false, aWeight); + addStats(aPhysicalDef, aProjectileDef, aFireDef, aMagicDef, aExplosionDef, aFallDef, aRadiationDef, aElectricDef, aWitherDef); + } + + public ArmorPlating(String aOreDict, float aWeight, float aPhysicalDef, float aProjectileDef, float aFireDef, float aMagicDef, float aExplosionDef, float aFallDef, float aRadiationDef, float aElectricDef, float aWitherDef, StatType aType, float aSpecial) { + super(aOreDict, false, aWeight); + addStats(aPhysicalDef, aProjectileDef, aFireDef, aMagicDef, aExplosionDef, aFallDef, aRadiationDef, aElectricDef, aWitherDef); + mType = aType; + mStat.put(mType, aSpecial); + } + + public ArmorPlating(String aOreDict,float aWeight, float aPhysicalDef, float aProjectileDef, float aFireDef, float aMagicDef, float aExplosionDef) { + super(aOreDict, false, aWeight); + addStats(aPhysicalDef, aProjectileDef, aFireDef, aMagicDef, aExplosionDef, 0, 0, 0, 0); + } + + public void addStats(float aPhysicalDef, float aProjectileDef, float aFireDef, float aMagicDef, float aExplosionDef, float aFallDef, float aRadiationDef, float aElectricDef, float aWitherDef){ + mStat.put(StatType.FALLDEFENCE, aFallDef); + mStat.put(StatType.PHYSICALDEFENCE, aPhysicalDef); + mStat.put(StatType.PROJECTILEDEFENCE, aProjectileDef); + mStat.put(StatType.FIREDEFENCE, aFireDef); + mStat.put(StatType.MAGICDEFENCE, aMagicDef); + mStat.put(StatType.EXPLOSIONDEFENCE, aExplosionDef); + mStat.put(StatType.RADIATIONDEFENCE, aRadiationDef); + mStat.put(StatType.ELECTRICALDEFENCE, aElectricDef); + mStat.put(StatType.WITHERDEFENCE, aWitherDef); + } + + @Override + public void calculateArmor(ArmorData aArmorData) { + calDef(StatType.FALLDEFENCE, aArmorData); + calDef(StatType.PHYSICALDEFENCE, aArmorData); + calDef(StatType.PROJECTILEDEFENCE, aArmorData); + calDef(StatType.FIREDEFENCE, aArmorData); + calDef(StatType.MAGICDEFENCE, aArmorData); + calDef(StatType.EXPLOSIONDEFENCE, aArmorData); + calDef(StatType.RADIATIONDEFENCE, aArmorData); + calDef(StatType.ELECTRICALDEFENCE, aArmorData); + calDef(StatType.WITHERDEFENCE, aArmorData); + addVal(StatType.WEIGHT, aArmorData); + if(mType!=null)addVal(mType, aArmorData); + } + + public void calDef(StatType aType, ArmorData aArmorData){ + float tArmorDef = 0.0f; + if(aArmorData.mStat.containsKey(aType)){ + tArmorDef = aArmorData.mStat.get(aType); + aArmorData.mStat.remove(aType);} + float tComponentDef = mStat.get(aType); + aArmorData.mStat.put(aType, tArmorDef + ((1.0f -tArmorDef) * tComponentDef)); +// System.out.println("calDef: "+aType.name()+" "+tArmorDef+" "+(tArmorDef + ((1.0f -tArmorDef) * tComponentDef))); + } + +} diff --git a/src/main/java/gregtech/common/items/armor/components/IArmorComponent.java b/src/main/java/gregtech/common/items/armor/components/IArmorComponent.java new file mode 100644 index 0000000000..340601b354 --- /dev/null +++ b/src/main/java/gregtech/common/items/armor/components/IArmorComponent.java @@ -0,0 +1,11 @@ +package gregtech.common.items.armor.components; + +import gregtech.common.items.armor.ArmorData; +import net.minecraft.item.ItemStack; + +public interface IArmorComponent { + + boolean isArmorComponent(ItemStack aStack); + + void calculateArmor(ArmorData aArmorData); +} diff --git a/src/main/java/gregtech/common/items/armor/components/LoadArmorComponents.java b/src/main/java/gregtech/common/items/armor/components/LoadArmorComponents.java new file mode 100644 index 0000000000..f394caa23b --- /dev/null +++ b/src/main/java/gregtech/common/items/armor/components/LoadArmorComponents.java @@ -0,0 +1,230 @@ +package gregtech.common.items.armor.components; + +import gregtech.api.enums.ItemList; +import gregtech.api.enums.Materials; +import gregtech.api.enums.OrePrefixes; +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_OreDictUnificator; +import ic2.core.Ic2Items; + +public class LoadArmorComponents { + public static void init(){ + new ArmorPlating("plateRubber", 60, 0.06f, 0.06f, 0.02f, 0.10f, 0.10f, 2f, 0f, .25f, 0f); + new ArmorPlating("plateWood", 80, 0.08f, 0.09f, 0.02f, 0.08f, 0.08f); + new ArmorPlating("plateBrass", 140, 0.12f, 0.12f, 0.10f, 0.10f, 0.12f); + new ArmorPlating("plateCopper", 140, 0.11f, 0.11f, 0.10f, 0.10f, 0.11f); + new ArmorPlating("plateLead", 280, 0.05f, 0.05f, 0.05f, 0.05f, 0.05f, 0, .3f, 0, 0); + new ArmorPlating("platePlastic", 60, 0.10f, 0.10f, 0.02f, 0.02f, 0.10f, 0, 0, .25f, 0); + new ArmorPlating("plateAluminium", 120, 0.14f, 0.14f, 0.12f, 0.12f, 0.14f); + new ArmorPlating("plateAstralSilver", 180, 0.10f, 0.10f, 0.10f, 0.18f, 0.10f); + new ArmorPlating("plateBismuthBronze", 160, 0.12f, 0.12f, 0.10f, 0.10f, 0.12f); + new ArmorPlating("plateBlackBronze", 160, 0.13f, 0.13f, 0.10f, 0.10f, 0.13f); + new ArmorPlating("plateBlackSteel", 200, 0.19f, 0.19f, 0.17f, 0.17f, 0.19f); + new ArmorPlating("plateBlueSteel", 200, 0.21f, 0.21f, 0.19f, 0.19f, 0.21f); + new ArmorPlating("plateBronze", 160, 0.13f, 0.13f, 0.12f, 0.12f, 0.13f); + new ArmorPlating("plateCobaltBrass", 180, 0.15f, 0.15f, 0.14f, 0.14f, 0.15f); + new ArmorPlating("plateDamascusSteel", 200, 0.22f, 0.22f, 0.20f, 0.20f, 0.22f); + new ArmorPlating("plateElectrum", 250, 0.11f, 0.11f, 0.10f, 0.10f, 0.11f); + new ArmorPlating("plateEmerald", 160, 0.10f, 0.10f, 0.14f, 0.14f, 0.10f); + new ArmorPlating("plateGold", 300, 0.09f, 0.09f, 0.05f, 0.25f, 0.09f); + new ArmorPlating("plateGreenSapphire", 160, 0.10f, 0.10f, 0.14f, 0.14f, 0.10f); + new ArmorPlating("plateInvar", 190, 0.10f, 0.10f, 0.22f, 0.22f, 0.10f); + new ArmorPlating("plateIron", 200, 0.12f, 0.12f, 0.10f, 0.10f, 0.12f); + new ArmorPlating("plateIronWood", 150, 0.17f, 0.17f, 0.02f, 0.02f, 0.17f); + new ArmorPlating("plateMagnalium", 120, 0.15f, 0.15f, 0.17f, 0.17f, 0.15f); + new ArmorPlating("plateNeodymiumMagnetic", 220, 0.14f, 0.14f, 0.14f, 0.14f, 0.14f, 0, 0, 0, 0, StatType.MAGNETSINGLE, 2.0f); + new ArmorPlating("plateManganese", 180, 0.15f, 0.15f, 0.14f, 0.14f, 0.15f); + new ArmorPlating("plateMeteoricIron", 200, 0.18f, 0.18f, 0.16f, 0.16f, 0.18f); + new ArmorPlating("plateMeteoricSteel", 200, 0.21f, 0.21f, 0.19f, 0.19f, 0.21f); + new ArmorPlating("plateMolybdenum", 140, 0.14f, 0.14f, 0.14f, 0.14f, 0.14f); + new ArmorPlating("plateNickel", 180, 0.12f, 0.12f, 0.15f, 0.15f, 0.12f); + new ArmorPlating("plateOlivine", 180, 0.10f, 0.10f, 0.14f, 0.14f, 0.10f); + new ArmorPlating("plateOpal", 180, 0.10f, 0.10f, 0.14f, 0.14f, 0.10f); + new ArmorPlating("platePalladium", 280, 0.14f, 0.14f, 0.12f, 0.12f, 0.14f); + new ArmorPlating("platePlatinum", 290, 0.15f, 0.15f, 0.13f, 0.13f, 0.15f); + new ArmorPlating("plateGarnetRed", 180, 0.10f, 0.10f, 0.14f, 0.14f, 0.10f); + new ArmorPlating("plateRedSteel", 200, 0.20f, 0.20f, 0.18f, 0.18f, 0.20f); + new ArmorPlating("plateRoseGold", 240, 0.10f, 0.10f, 0.08f, 0.18f, 0.10f); + new ArmorPlating("plateRuby", 180, 0.10f, 0.10f, 0.20f, 0.20f, 0.10f); + new ArmorPlating("plateSapphire", 180, 0.10f, 0.10f, 0.14f, 0.14f, 0.10f); + new ArmorPlating("plateSilver", 220, 0.11f, 0.11f, 0.07f, 0.24f, 0.11f); + new ArmorPlating("plateStainlessSteel", 200, 0.16f, 0.16f, 0.21f, 0.21f, 0.16f); + new ArmorPlating("plateSteel", 200, 0.18f, 0.18f, 0.16f, 0.16f, 0.18f); + new ArmorPlating("plateSterlingSilver", 210, 0.15f, 0.15f, 0.13f, 0.13f, 0.15f); + new ArmorPlating("plateTanzanite", 180, 0.10f, 0.10f, 0.14f, 0.14f, 0.10f); + new ArmorPlating("plateThorium", 280, 0.13f, 0.13f, 0.16f, 0.16f, 0.13f); + new ArmorPlating("plateWroughtIron", 200, 0.14f, 0.14f, 0.12f, 0.12f, 0.14f); + new ArmorPlating("plateGarnetYellow", 180, 0.10f, 0.10f, 0.14f, 0.14f, 0.10f); + new ArmorPlating("plateAlloyCarbon", 60, 0.06f, 0.23f, 0.05f, 0.05f, 0.06f); + new ArmorPlating("plateInfusedAir", 10, 0.10f, 0.10f, 0.10f, 0.10f, 0.10f); + new ArmorPlating("plateAmethyst", 180, 0.10f, 0.10f, 0.14f, 0.14f, 0.10f); + new ArmorPlating("plateInfusedWater", 150, 0.10f, 0.10f, 0.20f, 0.20f, 0.10f); + new ArmorPlating("plateBlueTopaz", 180, 0.10f, 0.10f, 0.14f, 0.14f, 0.10f); + new ArmorPlating("plateChrome", 200, 0.12f, 0.12f, 0.21f, 0.21f, 0.12f); + new ArmorPlating("plateCobalt", 220, 0.16f, 0.16f, 0.14f, 0.14f, 0.16f); + new ArmorPlating("plateDarkIron", 200, 0.21f, 0.21f, 0.19f, 0.19f, 0.21f); + new ArmorPlating("plateDiamond", 200, 0.20f, 0.20f, 0.22f, 0.22f, 0.20f); + new ArmorPlating("plateEnderium", 250, 0.22f, 0.22f, 0.21f, 0.21f, 0.22f); + new ArmorPlating("plateElectrumFlux", 180, 0.19f, 0.19f, 0.16f, 0.16f, 0.19f); + new ArmorPlating("plateForce", 180, 0.10f, 0.10f, 0.20f, 0.20f, 0.10f); + new ArmorPlating("plateHSLA", 200, 0.21f, 0.21f, 0.17f, 0.17f, 0.21f); + new ArmorPlating("plateInfusedFire", 150, 0.12f, 0.10f, 0.30f, 0.30f, 0.12f, 0, 0, 0, 0, StatType.THORNSSINGLE, 3.0f); + new ArmorPlating("plateInfusedGold", 300, 0.15f, 0.15f, 0.05f, 0.05f, 0.15f); + new ArmorPlating("plateMithril", 200, 0.25f, 0.25f, 0.10f, 0.30f, 0.25f); + new ArmorPlating("plateInfusedOrder", 150, 0.18f, 0.22f, 0.22f, 0.25f, 0.22f); + new ArmorPlating("plateSteeleaf", 120, 0.16f, 0.16f, 0.06f, 0.06f, 0.16f); + new ArmorPlating("plateInfusedEarth", 350, 0.30f, 0.30f, 0.30f, 0.30f, 0.30f); + new ArmorPlating("plateThaumium", 200, 0.18f, 0.19f, 0.20f, 0.30f, 0.18f); + new ArmorPlating("plateTitanium", 140, 0.20f, 0.20f, 0.18f, 0.18f, 0.20f); + new ArmorPlating("plateTungsten", 270, 0.27f, 0.26f, 0.23f, 0.26f, 0.26f); + new ArmorPlating("plateTopaz", 180, 0.10f, 0.10f, 0.14f, 0.14f, 0.10f); + new ArmorPlating("plateUltimet", 180, 0.21f, 0.21f, 0.19f, 0.19f, 0.21f); + new ArmorPlating("plateUranium", 290, 0.27f, 0.23f, 0.20f, 0.15f, 0.21f); + new ArmorPlating("plateVinteum", 180, 0.10f, 0.12f, 0.14f, 0.28f, 0.12f); + new ArmorPlating("plateDuranium", 140, 0.24f, 0.24f, 0.24f, 0.24f, 0.24f); + new ArmorPlating("plateAlloyIridium", 220, 0.24f, 0.24f, 0.22f, 0.22f, 0.24f); + new ArmorPlating("plateOsmiridium", 240, 0.18f, 0.18f, 0.16f, 0.16f, 0.18f); + new ArmorPlating("plateOsmium", 250, 0.12f, 0.12f, 0.10f, 0.10f, 0.12f); + new ArmorPlating("plateNaquadah", 250, 0.27f, 0.27f, 0.25f, 0.25f, 0.27f); + new ArmorPlating("plateNetherStar", 140, 0.22f, 0.22f, 0.24f, 0.24f, 0.22f, 0, 0, 0, .2f); + new ArmorPlating("plateInfusedEntropy", 150, 0.10f, 0.10f, 0.10f, 0.10f, 0.10f, 0, 0, 0, 0, StatType.THORNSSINGLE, 4.0f); + new ArmorPlating("plateTritanium", 140, 0.26f, 0.26f, 0.26f, 0.26f, 0.26f); + new ArmorPlating("plateTungstenSteel", 270, 0.30f, 0.28f, 0.25f, 0.28f, 0.30f); + new ArmorPlating("plateAdamantium", 200, 0.28f, 0.28f, 0.26f, 0.30f, 0.30f); + new ArmorPlating("plateNaquadahAlloy", 300, 0.33f, 0.33f, 0.33f, 0.33f, 0.33f); + new ArmorPlating("plateNeutronium", 600, 0.50f, 0.50f, 0.50f, 0.50f, 0.50f); + + new ArmorComponentFunction(GT_ModHandler.getIC2Item("nightvisionGoggles", 1), true, 100, StatType.NIGHTVISION, 100); + if(GT_ModHandler.getModItem("Thaumcraft", "ItemGoggles", 1)!=null)new ArmorComponentFunction(GT_ModHandler.getModItem("Thaumcraft", "ItemGoggles", 1), true, 100, StatType.THAUMICGOGGLES, 100); + new ArmorComponentBattery(ItemList.Battery_RE_LV_Lithium.get(1, new Object[]{}), true, 100, 100000); + new ArmorComponentBattery(ItemList.Battery_RE_MV_Lithium.get(1, new Object[]{}), true, 100, 400000); + new ArmorComponentBattery(ItemList.Battery_RE_HV_Lithium.get(1, new Object[]{}), true, 100, 1600000); + + new ArmorComponentBattery(ItemList.Battery_RE_LV_Cadmium.get(1, new Object[]{}), true, 100, 75000); + new ArmorComponentBattery(ItemList.Battery_RE_MV_Cadmium.get(1, new Object[]{}), true, 100, 300000); + new ArmorComponentBattery(ItemList.Battery_RE_HV_Cadmium.get(1, new Object[]{}), true, 100, 1200000); + + new ArmorComponentBattery(ItemList.Battery_RE_LV_Sodium.get(1, new Object[]{}), true, 100, 50000); + new ArmorComponentBattery(ItemList.Battery_RE_MV_Sodium.get(1, new Object[]{}), true, 100, 200000); + new ArmorComponentBattery(ItemList.Battery_RE_HV_Sodium.get(1, new Object[]{}), true, 100, 800000); + + new ArmorComponentBattery(ItemList.IC2_EnergyCrystal.get(1, new Object[]{}), true, 100, 1000000); + new ArmorComponentBattery(ItemList.IC2_LapotronCrystal.get(1, new Object[]{}), true, 100, 10000000); + new ArmorComponentBattery(ItemList.Energy_LapotronicOrb.get(1, new Object[]{}), true, 100, 100000000); + new ArmorComponentBattery(ItemList.Energy_LapotronicOrb2.get(1, new Object[]{}), true, 100, 1000000000); + + new ArmorElectricComponent(ItemList.Electric_Motor_LV.get(1, new Object[]{}), 20, StatType.MOTPRPOWER, 200f, StatType.MOTOREUUSAGE, 50f, StatType.PROCESSINGPOWERUSED, 10f); + new ArmorElectricComponent(ItemList.Electric_Motor_MV.get(1, new Object[]{}), 40, StatType.MOTPRPOWER, 300f, StatType.MOTOREUUSAGE, 100f, StatType.PROCESSINGPOWERUSED, 20f); + new ArmorElectricComponent(ItemList.Electric_Motor_HV.get(1, new Object[]{}), 60, StatType.MOTPRPOWER, 400f, StatType.MOTOREUUSAGE, 200f, StatType.PROCESSINGPOWERUSED, 50f); + new ArmorElectricComponent(ItemList.Electric_Motor_EV.get(1, new Object[]{}), 80, StatType.MOTPRPOWER, 500f, StatType.MOTOREUUSAGE, 400f, StatType.PROCESSINGPOWERUSED, 100f); + new ArmorElectricComponent(ItemList.Electric_Motor_IV.get(1, new Object[]{}),100, StatType.MOTPRPOWER, 600f, StatType.MOTOREUUSAGE, 800f, StatType.PROCESSINGPOWERUSED, 200f); + + new ArmorElectricComponent(ItemList.Electric_Piston_LV.get(1, new Object[]{}), 20, StatType.PISTONJUMPBOOST, 3, StatType.PISTONEUUSAGE, 200f, StatType.PROCESSINGPOWERUSED, 10f); + new ArmorElectricComponent(ItemList.Electric_Piston_MV.get(1, new Object[]{}), 40, StatType.PISTONJUMPBOOST, 4, StatType.PISTONEUUSAGE, 300f, StatType.PROCESSINGPOWERUSED, 20f); + new ArmorElectricComponent(ItemList.Electric_Piston_HV.get(1, new Object[]{}), 60, StatType.PISTONJUMPBOOST, 5, StatType.PISTONEUUSAGE, 450f, StatType.PROCESSINGPOWERUSED, 50f); + new ArmorElectricComponent(ItemList.Electric_Piston_EV.get(1, new Object[]{}), 80, StatType.PISTONJUMPBOOST, 6, StatType.PISTONEUUSAGE, 800f, StatType.PROCESSINGPOWERUSED, 100f); + new ArmorElectricComponent(ItemList.Electric_Piston_IV.get(1, new Object[]{}),100, StatType.PISTONJUMPBOOST, 7, StatType.PISTONEUUSAGE,1600f, StatType.PROCESSINGPOWERUSED, 200f); + + new ArmorElectricComponent(ItemList.Machine_LV_Electrolyzer.get(1, new Object[]{}), 20, StatType.ELECTROLYZERPROD, 10, StatType.ELECTROLYZEREUUSAGE, 1, StatType.PROCESSINGPOWERUSED, 50f); + new ArmorElectricComponent(ItemList.Machine_MV_Electrolyzer.get(1, new Object[]{}), 40, StatType.ELECTROLYZERPROD, 20, StatType.ELECTROLYZEREUUSAGE, 4, StatType.PROCESSINGPOWERUSED, 100f); + new ArmorElectricComponent(ItemList.Machine_HV_Electrolyzer.get(1, new Object[]{}), 60, StatType.ELECTROLYZERPROD, 40, StatType.ELECTROLYZEREUUSAGE, 16, StatType.PROCESSINGPOWERUSED, 150f); + new ArmorElectricComponent(ItemList.Machine_EV_Electrolyzer.get(1, new Object[]{}), 80, StatType.ELECTROLYZERPROD, 80, StatType.ELECTROLYZEREUUSAGE, 64, StatType.PROCESSINGPOWERUSED, 200f); + new ArmorElectricComponent(ItemList.Machine_IV_Electrolyzer.get(1, new Object[]{}),100, StatType.ELECTROLYZERPROD,160, StatType.ELECTROLYZEREUUSAGE, 128, StatType.PROCESSINGPOWERUSED, 250f); + + new ArmorElectricComponent(ItemList.Field_Generator_LV.get(1, new Object[]{}), 20, StatType.FIELDGENCAP, 1, StatType.FIELDGENEUUSAGE, 1, StatType.PROCESSINGPOWERUSED, 100f); + new ArmorElectricComponent(ItemList.Field_Generator_MV.get(1, new Object[]{}), 40, StatType.FIELDGENCAP, 2, StatType.FIELDGENEUUSAGE, 4, StatType.PROCESSINGPOWERUSED, 200f); + new ArmorElectricComponent(ItemList.Field_Generator_HV.get(1, new Object[]{}), 60, StatType.FIELDGENCAP, 3, StatType.FIELDGENEUUSAGE, 16, StatType.PROCESSINGPOWERUSED, 300f); + new ArmorElectricComponent(ItemList.Field_Generator_EV.get(1, new Object[]{}), 80, StatType.FIELDGENCAP, 4, StatType.FIELDGENEUUSAGE, 64, StatType.PROCESSINGPOWERUSED, 400f); + new ArmorElectricComponent(ItemList.Field_Generator_IV.get(1, new Object[]{}),100, StatType.FIELDGENCAP, 5, StatType.FIELDGENEUUSAGE, 512, StatType.PROCESSINGPOWERUSED, 500f); + + new ArmorElectricComponent(ItemList.Cell_Empty.get(1, new Object[]{}), 20, StatType.TANKCAP, 8000, null, 1, null, 0); + new ArmorElectricComponent(ItemList.Large_Fluid_Cell_Steel.get(1, new Object[]{}), 40, StatType.TANKCAP, 16000, null, 1, null, 0); + new ArmorElectricComponent(ItemList.Large_Fluid_Cell_TungstenSteel.get(1, new Object[]{}), 80, StatType.TANKCAP, 64000, null, 1, null, 0); + + new ArmorElectricComponent(GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Basic, 1), 10, StatType.PROCESSINGPOWER, 100, null, 1, null, 1); + new ArmorElectricComponent(GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Good, 1), 20, StatType.PROCESSINGPOWER, 200, null, 1, null, 1); + new ArmorElectricComponent(GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Advanced, 1),30, StatType.PROCESSINGPOWER, 300, null, 1, null, 1); + new ArmorElectricComponent(GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Data, 1), 40, StatType.PROCESSINGPOWER, 400, null, 1, null, 1); + new ArmorElectricComponent(GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Elite, 1), 50, StatType.PROCESSINGPOWER, 500, null, 1, null, 1); + new ArmorElectricComponent(GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Master, 1), 60, StatType.PROCESSINGPOWER, 600, null, 1, null, 1); + +// if (parts[i].getItem().getUnlocalizedName().equals("gte.meta.jetpack")) {// jeptack parts +// switch (parts[i].getItem().getDamage(parts[i])) { +// case 0: +// def[24] += 50; // JetpackFuelPower +// def[25] += 1; // FuelUsage +// def[31] += 10; +// break; +// case 1: +// def[24] += 75; // JetpackFuelPower +// def[25] += 2; // FuelUsage +// def[31] += 20; +// break; +// case 2: +// def[24] += 100; // JetpackFuelPower +// def[25] += 4; // FuelUsage +// def[31] += 30; +// break; +// case 3: +// def[24] += 125; // JetpackFuelPower +// def[25] += 8; // FuelUsage +// def[31] += 40; +// break; +// case 4: +// def[24] += 150; // JetpackFuelPower +// def[25] += 16; // FuelUsage +// def[31] += 50; +// break; +// case 5: +// def[26] += 20; // JetpackEUPower +// def[27] += 8; // JetpackEU +// def[31] += 30; +// break; +// case 6: +// def[26] += 30; // JetpackEUPower +// def[27] += 16; // JetpackEU +// def[31] += 60; +// break; +// case 7: +// def[26] += 40; // JetpackEUPower +// def[27] += 32; // JetpackEU +// def[31] += 90; +// break; +// case 8: +// def[26] += 50; // JetpackEUPower +// def[27] += 64; // JetpackEU +// def[31] += 120; +// break; +// case 9: +// def[26] += 60; // JetpackEUPower +// def[27] += 128; // JetpackEU +// def[31] += 150; +// break; +// case 10: +// def[28] += 100; // AntiGravPower +// def[29] += 32; // AntiGravEU +// def[31] += 100; +// break; +// case 11: +// def[28] += 133; // AntiGravPower +// def[29] += 64; // AntiGravEU +// def[31] += 200; +// break; +// case 12: +// def[28] += 166; // AntiGravPower +// def[29] += 128; // AntiGravEU +// def[31] += 300; +// break; +// case 13: +// def[28] += 200; // AntiGravPower +// def[29] += 256; // AntiGravEU +// def[31] += 400; +// break; +// case 14: +// def[28] += 233; // AntiGravPower +// def[29] += 512; // AntiGravEU +// def[31] += 500; +// break; +// } + } +} diff --git a/src/main/java/gregtech/common/items/armor/components/StatType.java b/src/main/java/gregtech/common/items/armor/components/StatType.java new file mode 100644 index 0000000000..80fe5cc6d4 --- /dev/null +++ b/src/main/java/gregtech/common/items/armor/components/StatType.java @@ -0,0 +1,56 @@ +package gregtech.common.items.armor.components; + +import java.util.List; + +import net.minecraftforge.fluids.FluidStack; + +public enum StatType { + ELECTRIC, + ELECTRIC2, + + FULLARMOR, + FULLRADIATIONARMOR, + FULLELECTRICARMOR, + + FALLDEFENCE, + PHYSICALDEFENCE, + PROJECTILEDEFENCE, + FIREDEFENCE, + MAGICDEFENCE, + EXPLOSIONDEFENCE, + RADIATIONDEFENCE, + ELECTRICALDEFENCE, + WITHERDEFENCE, + + THORNS, + THORNSSINGLE, + MAGNET, + MAGNETSINGLE, + + THAUMICGOGGLES, + NIGHTVISION, + POTIONINJECTOR, + AUTOFEEDER, + + TANKCAP, + WEIGHT, + PROCESSINGPOWER, + PROCESSINGPOWERUSED, + PARTPROCESSING, + PARTPROCESSINGUSED, + + MOTPRPOWER, + MOTOREUUSAGE, + PISTONJUMPBOOST, + PISTONEUUSAGE, + ELECTROLYZERPROD, + ELECTROLYZEREUUSAGE, + FIELDGENCAP, + FIELDGENEUUSAGE, + JETPACKMAXWEIGHT, + ANTIGRAVMAXWEIGHT, + + PARTSCHARGE, + BATTERYCAPACITY; + +} |