aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/gregtech/GT_Mod.java4
-rw-r--r--src/main/java/gregtech/api/GregTech_API.java1
-rw-r--r--src/main/java/gregtech/api/enums/ItemList.java14
-rw-r--r--src/main/java/gregtech/common/GT_Proxy.java94
-rw-r--r--src/main/java/gregtech/common/items/armor/ArmorCalculation.java52
-rw-r--r--src/main/java/gregtech/common/items/armor/ArmorData.java418
-rw-r--r--src/main/java/gregtech/common/items/armor/ElectricModularArmor1.java37
-rw-r--r--src/main/java/gregtech/common/items/armor/ModularArmor_Item.java460
-rw-r--r--src/main/java/gregtech/common/items/armor/Vector3.java279
-rw-r--r--src/main/java/gregtech/common/items/armor/components/ArmorComponent.java63
-rw-r--r--src/main/java/gregtech/common/items/armor/components/ArmorComponentBattery.java18
-rw-r--r--src/main/java/gregtech/common/items/armor/components/ArmorComponentFunction.java21
-rw-r--r--src/main/java/gregtech/common/items/armor/components/ArmorElectricComponent.java31
-rw-r--r--src/main/java/gregtech/common/items/armor/components/ArmorPlating.java112
-rw-r--r--src/main/java/gregtech/common/items/armor/components/IArmorComponent.java11
-rw-r--r--src/main/java/gregtech/common/items/armor/components/LoadArmorComponents.java250
-rw-r--r--src/main/java/gregtech/common/items/armor/components/StatType.java52
-rw-r--r--src/main/java/gregtech/common/items/armor/gui/ContainerBasicArmor.java48
-rw-r--r--src/main/java/gregtech/common/items/armor/gui/ContainerElectricArmor1.java53
-rw-r--r--src/main/java/gregtech/common/items/armor/gui/ContainerModularArmor.java167
-rw-r--r--src/main/java/gregtech/common/items/armor/gui/FluidSync.java58
-rw-r--r--src/main/java/gregtech/common/items/armor/gui/FluidSync2.java57
-rw-r--r--src/main/java/gregtech/common/items/armor/gui/GuiElectricArmor1.java330
-rw-r--r--src/main/java/gregtech/common/items/armor/gui/GuiModularArmor.java200
-rw-r--r--src/main/java/gregtech/common/items/armor/gui/InventoryArmor.java233
-rw-r--r--src/main/java/gregtech/common/items/armor/gui/SlotArmor.java18
-rw-r--r--src/main/java/gregtech/common/items/armor/gui/SlotFluid.java26
-rw-r--r--src/main/java/gregtech/common/items/armor/gui/SlotLocked.java33
-rw-r--r--src/main/java/gregtech/loaders/preload/GT_Loader_Item_Block_And_Fluid.java15
-rw-r--r--src/main/resources/assets/gregtech/lang/en_US.lang13
-rw-r--r--src/main/resources/assets/gregtech/lang/zh_CN.lang13
-rw-r--r--src/main/resources/assets/gregtech/textures/items/modulararmor_boots.pngbin518 -> 0 bytes
-rw-r--r--src/main/resources/assets/gregtech/textures/items/modulararmor_chestplate.pngbin504 -> 0 bytes
-rw-r--r--src/main/resources/assets/gregtech/textures/items/modulararmor_helmet.pngbin469 -> 0 bytes
-rw-r--r--src/main/resources/assets/gregtech/textures/items/modulararmor_leggings.pngbin466 -> 0 bytes
-rw-r--r--src/main/resources/assets/gregtech/textures/items/modularelectric1_boots.pngbin593 -> 0 bytes
-rw-r--r--src/main/resources/assets/gregtech/textures/items/modularelectric1_chestplate.pngbin544 -> 0 bytes
-rw-r--r--src/main/resources/assets/gregtech/textures/items/modularelectric1_helmet.pngbin574 -> 0 bytes
-rw-r--r--src/main/resources/assets/gregtech/textures/items/modularelectric1_leggings.pngbin482 -> 0 bytes
-rw-r--r--src/main/resources/assets/gregtech/textures/items/modularelectric2_boots.pngbin668 -> 0 bytes
-rw-r--r--src/main/resources/assets/gregtech/textures/items/modularelectric2_chestplate.pngbin596 -> 0 bytes
-rw-r--r--src/main/resources/assets/gregtech/textures/items/modularelectric2_helmet.pngbin576 -> 0 bytes
-rw-r--r--src/main/resources/assets/gregtech/textures/items/modularelectric2_leggings.pngbin542 -> 0 bytes
-rw-r--r--src/main/resources/assets/gregtech/textures/models/armor/basic_helmet_chest.pngbin1215 -> 0 bytes
-rw-r--r--src/main/resources/assets/gregtech/textures/models/armor/basic_leggings_boots.pngbin493 -> 0 bytes
-rw-r--r--src/main/resources/assets/gregtech/textures/models/armor/e1_helmet_chest.pngbin1528 -> 0 bytes
-rw-r--r--src/main/resources/assets/gregtech/textures/models/armor/e1_leggings_boots.pngbin588 -> 0 bytes
-rw-r--r--src/main/resources/assets/gregtech/textures/models/armor/e2_helmet_chest.pngbin1792 -> 0 bytes
-rw-r--r--src/main/resources/assets/gregtech/textures/models/armor/e2_leggings_boots.pngbin750 -> 0 bytes
49 files changed, 6 insertions, 3175 deletions
diff --git a/src/main/java/gregtech/GT_Mod.java b/src/main/java/gregtech/GT_Mod.java
index 96e096bb44..f6243f91c2 100644
--- a/src/main/java/gregtech/GT_Mod.java
+++ b/src/main/java/gregtech/GT_Mod.java
@@ -24,7 +24,6 @@ import gregtech.common.GT_RecipeAdder;
import gregtech.common.entities.GT_Entity_Arrow;
import gregtech.common.entities.GT_Entity_Arrow_Potion;
import gregtech.common.items.GT_MetaGenerated_Tool_01;
-import gregtech.common.items.armor.components.LoadArmorComponents;
import gregtech.common.items.behaviors.Behaviour_DataOrb;
import gregtech.common.misc.GT_Command;
import gregtech.common.tileentities.machines.basic.GT_MetaTileEntity_Massfabricator;
@@ -191,7 +190,6 @@ public class GT_Mod implements IGT_Mod {
GregTech_API.sUnification = new GT_Config(new Configuration(new File(new File(aEvent.getModConfigurationDirectory(), "GregTech"), "Unification.cfg")));
GregTech_API.sSpecialFile = new GT_Config(new Configuration(new File(new File(aEvent.getModConfigurationDirectory(), "GregTech"), "Other.cfg")));
GregTech_API.sOPStuff = new GT_Config(new Configuration(new File(new File(aEvent.getModConfigurationDirectory(), "GregTech"), "OverpoweredStuff.cfg")));
- GregTech_API.sModularArmor = new GT_Config(new Configuration(new File(new File(aEvent.getModConfigurationDirectory(), "GregTech"), "ModularArmor.cfg")));
GregTech_API.sClientDataFile = new GT_Config(new Configuration(new File(aEvent.getModConfigurationDirectory().getParentFile(), "GregTech.cfg")));
GregTech_API.mIC2Classic = Loader.isModLoaded("IC2-Classic-Spmod");
@@ -746,8 +744,6 @@ public class GT_Mod implements IGT_Mod {
new GT_Worldgenloader().run();
new GT_CoverLoader().run();
- LoadArmorComponents.init();
-
GT_RecipeRegistrator.registerUsagesForMaterials(null, false, new ItemStack(Blocks.planks, 1), new ItemStack(Blocks.cobblestone, 1), new ItemStack(Blocks.stone, 1), new ItemStack(Items.leather, 1));
GT_OreDictUnificator.addItemData(GT_ModHandler.getRecipeOutput(null, GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Tin, 1L), null, GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Tin, 1L), null, GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Tin, 1L), null, null, null), new ItemData(Materials.Tin, 10886400L));
diff --git a/src/main/java/gregtech/api/GregTech_API.java b/src/main/java/gregtech/api/GregTech_API.java
index 17f171a953..53bb805528 100644
--- a/src/main/java/gregtech/api/GregTech_API.java
+++ b/src/main/java/gregtech/api/GregTech_API.java
@@ -221,7 +221,6 @@ public class GregTech_API {
sRecipeFile = null,
sMachineFile = null,
sWorldgenFile = null,
- sModularArmor = null,
sMaterialProperties = null,
sMaterialComponents = null,
sUnification = null,
diff --git a/src/main/java/gregtech/api/enums/ItemList.java b/src/main/java/gregtech/api/enums/ItemList.java
index 94efa0605f..57e42ea37f 100644
--- a/src/main/java/gregtech/api/enums/ItemList.java
+++ b/src/main/java/gregtech/api/enums/ItemList.java
@@ -1553,20 +1553,6 @@ public enum ItemList implements IItemContainer {
Moxcell_2,
Moxcell_4,
- ModularBasicHelmet,
- ModularBasicChestplate,
- ModularBasicLeggings,
- ModularBasicBoots,
-
- ModularElectric1Helmet,
- ModularElectric1Chestplate,
- ModularElectric1Leggings,
- ModularElectric1Boots,
-
- ModularElectric2Helmet,
- ModularElectric2Chestplate,
- ModularElectric2Leggings,
- ModularElectric2Boots,
Block_Powderbarrel,
GelledToluene,
diff --git a/src/main/java/gregtech/common/GT_Proxy.java b/src/main/java/gregtech/common/GT_Proxy.java
index dd0a369cdf..18dfc8e410 100644
--- a/src/main/java/gregtech/common/GT_Proxy.java
+++ b/src/main/java/gregtech/common/GT_Proxy.java
@@ -53,12 +53,6 @@ import gregtech.common.entities.GT_Entity_Arrow;
import gregtech.common.gui.GT_ContainerVolumetricFlask;
import gregtech.common.gui.GT_GUIContainerVolumetricFlask;
import gregtech.common.items.GT_MetaGenerated_Tool_01;
-import gregtech.common.items.armor.ModularArmor_Item;
-import gregtech.common.items.armor.gui.ContainerBasicArmor;
-import gregtech.common.items.armor.gui.ContainerElectricArmor1;
-import gregtech.common.items.armor.gui.GuiElectricArmor1;
-import gregtech.common.items.armor.gui.GuiModularArmor;
-import gregtech.common.items.armor.gui.InventoryArmor;
import net.minecraft.block.Block;
import net.minecraft.enchantment.Enchantment;
import net.minecraft.enchantment.EnchantmentHelper;
@@ -1533,32 +1527,10 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler {
public Object getServerGuiElement(int aID, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ) {
if(aID>=1000){
int ID = aID-1000;
- switch(ID){
- case 0:
- return new ContainerBasicArmor(aPlayer, new InventoryArmor(ModularArmor_Item.class, aPlayer.getCurrentEquippedItem()));
- case 1:
- return new ContainerElectricArmor1(aPlayer, new InventoryArmor(ModularArmor_Item.class, aPlayer.getCurrentEquippedItem()));
- case 2:
- return new ContainerElectricArmor1(aPlayer, new InventoryArmor(ModularArmor_Item.class, aPlayer.getCurrentEquippedItem()));
- case 10:
- return new GT_ContainerVolumetricFlask(aPlayer.inventory);
- default:
- return getRightItem(aPlayer, ID);
+ if (ID == 10) {
+ return new GT_ContainerVolumetricFlask(aPlayer.inventory);
}
- }
- if(aID>=100){
- int tSlot = aID / 100;
- int ID = aID%100;
- switch(ID){
- case 0:
- return new ContainerBasicArmor(aPlayer, new InventoryArmor(ModularArmor_Item.class, aPlayer.getEquipmentInSlot(tSlot)));
- case 1:
- return new ContainerElectricArmor1(aPlayer, new InventoryArmor(ModularArmor_Item.class, aPlayer.getEquipmentInSlot(tSlot)));
- case 2:
- return new ContainerElectricArmor1(aPlayer, new InventoryArmor(ModularArmor_Item.class, aPlayer.getEquipmentInSlot(tSlot)));
- default:
- return getRightItem(aPlayer, ID);
- }
+ return null;
}
TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ);
if ((tTileEntity instanceof IGregTechTileEntity)) {
@@ -1573,52 +1545,14 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler {
return null;
}
- public Object getRightItem(EntityPlayer player, int ID){
- ItemStack mStack = player.getEquipmentInSlot(ID/100);
- if(mStack==null||!(mStack.getItem() instanceof ModularArmor_Item))return null;
-
- switch(ID % 100){
- case 0:
- return new ContainerBasicArmor(player, new InventoryArmor(ModularArmor_Item.class, mStack));
- case 1:
- return new ContainerElectricArmor1(player, new InventoryArmor(ModularArmor_Item.class, mStack));
- case 2:
- return new ContainerElectricArmor1(player, new InventoryArmor(ModularArmor_Item.class, mStack));
- }
- return null;
-
- }
-
@Override
public Object getClientGuiElement(int aID, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ) {
if(aID>=1000){
int ID = aID-1000;
- switch(ID){
- case 0:
- return new GuiModularArmor(new ContainerBasicArmor(aPlayer, new InventoryArmor(ModularArmor_Item.class, aPlayer.getCurrentEquippedItem())), aPlayer);
- case 1:
- return new GuiElectricArmor1(new ContainerElectricArmor1(aPlayer, new InventoryArmor(ModularArmor_Item.class, aPlayer.getCurrentEquippedItem())), aPlayer);
- case 2:
- return new GuiElectricArmor1(new ContainerElectricArmor1(aPlayer, new InventoryArmor(ModularArmor_Item.class, aPlayer.getCurrentEquippedItem())), aPlayer);
- case 10:
- return new GT_GUIContainerVolumetricFlask(new GT_ContainerVolumetricFlask(aPlayer.inventory));
- default:
- return getRightItemGui(aPlayer, ID);
+ if (ID == 10) {
+ return new GT_GUIContainerVolumetricFlask(new GT_ContainerVolumetricFlask(aPlayer.inventory));
}
- }
- if(aID>=100){
- int tSlot = aID / 100;
- int ID = aID%100;
- switch(ID){
- case 0:
- return new GuiModularArmor(new ContainerBasicArmor(aPlayer, new InventoryArmor(ModularArmor_Item.class, aPlayer.getEquipmentInSlot(tSlot))), aPlayer);
- case 1:
- return new GuiElectricArmor1(new ContainerElectricArmor1(aPlayer, new InventoryArmor(ModularArmor_Item.class, aPlayer.getEquipmentInSlot(tSlot))), aPlayer);
- case 2:
- return new GuiElectricArmor1(new ContainerElectricArmor1(aPlayer, new InventoryArmor(ModularArmor_Item.class, aPlayer.getEquipmentInSlot(tSlot))), aPlayer);
- default:
- return getRightItem(aPlayer, ID);
- }
+ return null;
}
TileEntity tTileEntity = aWorld.getTileEntity(aX, aY, aZ);
if ((tTileEntity instanceof IGregTechTileEntity)) {
@@ -1641,22 +1575,6 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler {
return null;
}
- public Object getRightItemGui(EntityPlayer player, int ID){
- ItemStack mStack = player.getEquipmentInSlot(ID/100);
- if(mStack==null||!(mStack.getItem() instanceof ModularArmor_Item))return null;
-
- switch(ID % 100){
- case 0:
- return new GuiModularArmor(new ContainerBasicArmor(player, new InventoryArmor(ModularArmor_Item.class, mStack)),player);
- case 1:
- return new GuiElectricArmor1(new ContainerElectricArmor1(player, new InventoryArmor(ModularArmor_Item.class, mStack)), player);
- case 2:
- return new GuiElectricArmor1(new ContainerElectricArmor1(player, new InventoryArmor(ModularArmor_Item.class, mStack)), player);
- }
- return null;
-
- }
-
public int getBurnTime(ItemStack aFuel) {
if ((aFuel == null) || (aFuel.getItem() == null)) {
return 0;
diff --git a/src/main/java/gregtech/common/items/armor/ArmorCalculation.java b/src/main/java/gregtech/common/items/armor/ArmorCalculation.java
deleted file mode 100644
index 8ecc5766ba..0000000000
--- a/src/main/java/gregtech/common/items/armor/ArmorCalculation.java
+++ /dev/null
@@ -1,52 +0,0 @@
-package gregtech.common.items.armor;
-
-import gregtech.api.util.GT_ModHandler;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraftforge.fluids.FluidStack;
-
-public class ArmorCalculation {
- public static float[] calculateArmor(ItemStack[] parts) {
- return new float[32];
- }
-
- public static int deChargeBatterys(ItemStack[] parts, int amount) {
- int decharged = 0;
- for (int i = 0; decharged < amount && i < parts.length; i++) {
- if (GT_ModHandler.isChargerItem(parts[i])) {
- decharged = (int) (decharged + ic2.api.item.ElectricItem.manager.discharge(parts[i], amount - decharged, 10, false, false, false));
- }
- }
- return decharged;
- }
-
- public static FluidStack getFluid(ItemStack[] parts, int tankCap) {
- int fluidAmount;
- if (parts.length > 12 && parts[12] != null) {
- NBTTagCompound nbt = parts[12].getTagCompound();
- if (nbt != null) {
- fluidAmount = (int) nbt.getLong("mFluidDisplayAmount");
- if (fluidAmount > tankCap) {
- nbt.setLong("mFluidDisplayAmount", tankCap);
- parts[12].setTagCompound(nbt);
- fluidAmount = tankCap;
- }
- return new FluidStack(parts[12].getItemDamage(), fluidAmount);
- }
-
- }
- return null;
- }
-
- public static void useFluid(ItemStack[] parts, int usedAmount) {
- int fluidAmount;
- if (parts.length > 12 && parts[12] != null) {
- NBTTagCompound nbt = parts[12].getTagCompound();
- if (nbt != null) {
- fluidAmount = (int) nbt.getLong("mFluidDisplayAmount");
- nbt.setLong("mFluidDisplayAmount", fluidAmount - usedAmount);
- parts[12].setTagCompound(nbt);
- }
- }
- }
-}
diff --git a/src/main/java/gregtech/common/items/armor/ArmorData.java b/src/main/java/gregtech/common/items/armor/ArmorData.java
deleted file mode 100644
index c8061db988..0000000000
--- a/src/main/java/gregtech/common/items/armor/ArmorData.java
+++ /dev/null
@@ -1,418 +0,0 @@
-package gregtech.common.items.armor;
-
-import gregtech.api.util.GT_LanguageManager;
-import gregtech.common.items.armor.components.ArmorComponent;
-import gregtech.common.items.armor.components.StatType;
-import gregtech.common.items.armor.gui.ContainerBasicArmor;
-import gregtech.common.items.armor.gui.ContainerModularArmor;
-import gregtech.common.items.armor.gui.InventoryArmor;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraftforge.fluids.FluidStack;
-
-import java.text.DecimalFormat;
-import java.text.DecimalFormatSymbols;
-import java.text.NumberFormat;
-import java.util.*;
-
-import static gregtech.GT_Mod.GT_FML_LOGGER;
-
-public class ArmorData {
-
- public int type; // 0 = helmet; 1 = chestplate; 2 = leggings; 3 = boots;
- public int armorTier; // 0 = Basic Modular Armor; 1 = Modular Exoskeleton; 2= Modular Nanosuit; 3 = Heavy Power Armor
- public List info; // needs Localization
- public boolean isTopItem;
- public int tooltipUpdate;
- public boolean openGui;
-
- public ArmorData helmet;
- public ArmorData chestplate;
- public ArmorData leggings;
- public ArmorData boots;
-
- public Map<StatType,Float> mStat = new HashMap<StatType,Float>();
- public Map<StatType,Boolean> mBStat = new HashMap<StatType,Boolean>();
- static ArrayList<StatType> updateArmorStatTypeList;
-// public boolean fullArmor;
-// public boolean fullRadiationDef;
-// public boolean fullElectricDef;
-//
-// public float fallDef;
-// public float physicalDef;
-// public float projectileDef;
-// public float fireDef;
-// public float magicDef;
-// public float explosionDef;
-// public float radiationDef;
-// public float electricDef;
-// public float witherDef;
-//
-// public float thorns;
-// public float thornsSingle;
-// public int magnet;
-// public int magnetSingle;
-//
-// public int partsCharge;
- public int maxCharge;
- public int charge;
-// public boolean thaumicGoggles;
-// public boolean nightVision;
-// public boolean potionInjector;
-// public boolean autoFeeder;
-
- public FluidStack fluid;
-// public int tankCap;
-//
-// public int weight;
- public float maxWeight;
-// public int processingPower;
-// public int processingPowerUsed;
-// public int partProcessing;
-// public int partProcessingUsed;
-//
-// public int motorPower;
-// public int motorEUusage;
-// public int pistonJumpboost;
-// public int pistonEUusage;
-// public int electrolyzerProd;
-// public int electrolyzerEUusage;
-// public int fieldGenCap;
-// public int fieldGenEUusage;
-//
-// public int jetpackMaxWeight;
-// public int antiGravMaxWeight;
-
- public ArmorData(EntityPlayer player, ItemStack stack, int type, int tier) {
- if(updateArmorStatTypeList == null)
- {
- updateArmorStatTypeList = new ArrayList<StatType>();
- updateArmorStatTypeList.add(StatType.MAGNET);
- updateArmorStatTypeList.add(StatType.THORNS);
- updateArmorStatTypeList.add(StatType.PROCESSINGPOWER);
- updateArmorStatTypeList.add(StatType.PROCESSINGPOWERUSED);
- }
- this.type = type;
- this.armorTier = tier;
- ContainerModularArmor tmp = new ContainerBasicArmor((EntityPlayer) player, new InventoryArmor(ModularArmor_Item.class, stack));
- calculateArmor(tmp.mInvArmor.parts);
- switch (tier) {
- case 0:
- maxCharge = 0;
- break;
- case 1:
- maxCharge = 250000;
- break;
- case 2:
- maxCharge = 1000000;
- }
- readNBT(stack.getTagCompound());
- }
-
- private void readNBT(NBTTagCompound nbt) {
- if (nbt == null) {
- return;
- }
- if (nbt.hasKey("Charge")) {
- this.charge = nbt.getInteger("Charge");
- }
- }
-
- public void writeToNBT(NBTTagCompound nbt) {
- if (nbt == null) {
- return;
- }
- nbt.setInteger("Charge", this.charge);
- }
-
- public ArmorData calculateArmor(ItemStack[] parts) {
- mStat.clear();
- mBStat.clear();
- for(ItemStack tPart : parts){
- if(tPart!=null && ArmorComponent.mStacks.containsKey(tPart.getUnlocalizedName()))
- ArmorComponent.mStacks.get(tPart.getUnlocalizedName()).calculateArmor(this);
- }
- for(StatType tType : StatType.values())if(!mStat.containsKey(tType))mStat.put(tType, .0f);
- for(StatType tType : StatType.values())if(!mBStat.containsKey(tType))mBStat.put(tType, false);
- updateTooltip();
- return this;
- }
-
- public void updateTooltip() {
- List<String> tagList = new ArrayList<String>();
- String tmp2 = "";
- if (maxWeight > 4000) {
- tmp2 = " " + GT_LanguageManager.getTranslation("Too Heavy");
- }
- if (maxCharge != 0) {
- DecimalFormat formatter = (DecimalFormat) NumberFormat.getInstance(Locale.US);
- DecimalFormatSymbols symbols = formatter.getDecimalFormatSymbols();
- symbols.setGroupingSeparator(' ');
- if (type == 0) {
- if (mBStat.get(StatType.THAUMICGOGGLES)) {
- tagList.add(GT_LanguageManager.getTranslation("Thaumic Goggles installed"));
- }
- if (mBStat.get(StatType.NIGHTVISION)) {
- tagList.add(GT_LanguageManager.getTranslation("Nightvision installed"));
- }
- }
- tagList.add("EU: " + formatter.format(charge + mStat.get(StatType.PARTSCHARGE)));
- if (type == 2) {
- tagList.add(GT_LanguageManager.getTranslation("Jumpboost") + ": " + mStat.get(StatType.PISTONJUMPBOOST) / 3 + "m");
- }
- if (type == 2 && mStat.get(StatType.PISTONJUMPBOOST) > 0) {
- tagList.add(GT_LanguageManager.getTranslation("Uphill step assist active"));
- }
- if (type == 2 && mStat.get(StatType.MOTPRPOWER) > 0) {
- tagList.add(GT_LanguageManager.getTranslation("Speedup") + ": " + mStat.get(StatType.MOTPRPOWER));
- tagList.add(GT_LanguageManager.getTranslation("Motor energy usage") + ": " + mStat.get(StatType.MOTOREUUSAGE) + " EU");
- if (maxWeight > 4000) {
- tagList.add(GT_LanguageManager.getTranslation("Too Heavy!!!"));
- }
- }
- tagList.add(GT_LanguageManager.getTranslation("Processing power ") + " " + mStat.get(StatType.PARTPROCESSING) + " " + GT_LanguageManager.getTranslation(""));
- tagList.add(GT_LanguageManager.getTranslation("Processing power used") + ": " + mStat.get(StatType.PARTPROCESSINGUSED) + " " + GT_LanguageManager.getTranslation(""));
- if (type == 0 && mStat.get(StatType.ELECTROLYZERPROD) > 0) {
- tagList.add(GT_LanguageManager.getTranslation("Electrolyzer produces ") + " " + mStat.get(StatType.ELECTROLYZERPROD) / 2 + GT_LanguageManager.getTranslation("per second"));
- }
- if (mStat.get(StatType.TANKCAP) > 0) {
- if (fluid != null) {
- tagList.add(GT_LanguageManager.getTranslation("Tank Capacity") + ": " + fluid.getLocalizedName() + " " + fluid.amount + "L (" + mStat.get(StatType.TANKCAP) + ")");
- } else {
- tagList.add(GT_LanguageManager.getTranslation("tankcap") + ": " + mStat.get(StatType.TANKCAP));
- }
- }
- }
- tagList.add(GT_LanguageManager.getTranslation("Weight") + ": " + mStat.get(StatType.WEIGHT) + tmp2);
- tagList.add(GT_LanguageManager.getTranslation("Physical Defence") + ": " + (Math.round(mStat.get(StatType.PHYSICALDEFENCE) * 1000) / 10.0) + "%");
- tagList.add(GT_LanguageManager.getTranslation("Projectile Defence") + ": " + (Math.round(mStat.get(StatType.PROJECTILEDEFENCE) * 1000) / 10.0) + "%");
- tagList.add(GT_LanguageManager.getTranslation("Fire Defence") + ": " + (Math.round(mStat.get(StatType.FIREDEFENCE) * 1000) / 10.0) + "%");
- tagList.add(GT_LanguageManager.getTranslation("Magic Defence") + ": " + (Math.round(mStat.get(StatType.MAGICDEFENCE) * 1000) / 10.0) + "%");
- tagList.add(GT_LanguageManager.getTranslation("Explosive Defence") + ": " + (Math.round(mStat.get(StatType.EXPLOSIONDEFENCE) * 1000) / 10.0) + "%");
- if (mStat.get(StatType.FALLDEFENCE) > 0 && type == 3) {
- tagList.add(GT_LanguageManager.getTranslation("Absorbs") + " " + mStat.get(StatType.FALLDEFENCE) + GT_LanguageManager.getTranslation(" m of Fall Defence"));
- }
- if (mStat.get(StatType.THORNS) > 0) {
- tagList.add(GT_LanguageManager.getTranslation("Thorns") + ": " + mStat.get(StatType.THORNS));
- }
- if (mStat.get(StatType.MAGNET) > 0) {
- tagList.add(GT_LanguageManager.getTranslation("Magnet") + ": " + mStat.get(StatType.MAGNET) + "m");
- }
- if (mBStat.get(StatType.FULLRADIATIONARMOR)) {
- tagList.add(GT_LanguageManager.getTranslation("Is Full Radiation Defence"));
- } else {
- if (mStat.get(StatType.RADIATIONDEFENCE) > 0.01d) {
- tagList.add(GT_LanguageManager.getTranslation("Radiation Defence") + ": " + (Math.round(mStat.get(StatType.RADIATIONDEFENCE) * 1000) / 10.0) + "%");
- }
- }
- info = tagList;
- }
-
- public void armorPartsEquipped(EntityPlayer aPlayer) {
- helmet = null;
- chestplate = null;
- leggings = null;
- boots = null;
- for (int i = 1; i < 5; i++) {
- ItemStack stack = aPlayer.getEquipmentInSlot(i);
- if (stack != null && stack.getItem() instanceof ModularArmor_Item) {
- ModularArmor_Item tmp = (ModularArmor_Item) stack.getItem();
- ContainerModularArmor tmp2 = new ContainerBasicArmor(aPlayer, new InventoryArmor(ModularArmor_Item.class, stack));
- if ((this.type + i) == 4) {
- fluid = ArmorCalculation.getFluid(tmp2.mInvArmor.parts, Math.round(mStat.get(StatType.TANKCAP)));
- }
- if (maxCharge > 0 && charge < maxCharge) {
- int loaded = ArmorCalculation.deChargeBatterys(tmp2.mInvArmor.parts, maxCharge - charge);
- charge = charge + loaded;
- change(mStat, StatType.PARTSCHARGE, -loaded);
-
- }
- switch (tmp.armorType) {
- case 0:
- helmet = tmp.data;
- break;
- case 1:
- chestplate = tmp.data;
- break;
- case 2:
- leggings = tmp.data;
- break;
- case 3:
- boots = tmp.data;
- break;
- default:
- break;
- }
- writeToNBT(stack.getTagCompound());
- }
- }
- if (helmet != null && chestplate != null && leggings != null && boots != null) {
- set(mBStat, StatType.FULLARMOR, true);
- boolean helmHasFullRadiationDefence=false;
- boolean chestplateHasFullRadiationDefence=false;
- boolean leggingsHasFullRadiationDefence=false;
- boolean bootsHasFullRadiationDefence=false;
-
- boolean helmHasFullElectricalDefenceDefence=false;
- boolean chestplateHasFullElectricalDefenceDefence=false;
- boolean leggingsHasFullElectricalDefenceDefence=false;
- boolean bootsHasFullElectricalDefenceDefence=false;
- //Check each armor pieces for valid mStat value and verify that the Hash contains the StatType key
- if(helmet.mStat!= null)
- {
- if(helmet.mStat.containsKey(StatType.RADIATIONDEFENCE))
- {
- helmHasFullRadiationDefence = helmet.mStat.get(StatType.RADIATIONDEFENCE)> 0.9f;
- }
- if(helmet.mStat.containsKey(StatType.ELECTRICALDEFENCE))
- {
- helmHasFullElectricalDefenceDefence = helmet.mStat.get(StatType.RADIATIONDEFENCE)> 0.9f;
- }
- }
- if(chestplate.mStat!= null)
- {
- if(chestplate.mStat.containsKey(StatType.RADIATIONDEFENCE))
- {
- chestplateHasFullRadiationDefence = chestplate.mStat.get(StatType.RADIATIONDEFENCE)> 0.9f;
- }
- if(chestplate.mStat.containsKey(StatType.ELECTRICALDEFENCE))
- {
- chestplateHasFullElectricalDefenceDefence = chestplate.mStat.get(StatType.RADIATIONDEFENCE)> 0.9f;
- }
- }
- if(leggings.mStat!= null)
- {
- if(leggings.mStat.containsKey(StatType.RADIATIONDEFENCE))
- {
- leggingsHasFullRadiationDefence = leggings.mStat.get(StatType.RADIATIONDEFENCE)> 0.9f;
- }
- if(leggings.mStat.containsKey(StatType.ELECTRICALDEFENCE))
- {
- leggingsHasFullElectricalDefenceDefence = leggings.mStat.get(StatType.RADIATIONDEFENCE)> 0.9f;
- }
- }
- if(boots.mStat!= null)
- {
- if(boots.mStat.containsKey(StatType.RADIATIONDEFENCE))
- {
- bootsHasFullRadiationDefence = boots.mStat.get(StatType.RADIATIONDEFENCE)> 0.9f;
- }
- if(boots.mStat.containsKey(StatType.ELECTRICALDEFENCE))
- {
- bootsHasFullElectricalDefenceDefence = boots.mStat.get(StatType.RADIATIONDEFENCE)> 0.9f;
- }
- }
- //Set Status of Full Armor types
- set(mBStat, StatType.FULLRADIATIONARMOR, helmHasFullRadiationDefence&&chestplateHasFullRadiationDefence&&leggingsHasFullRadiationDefence &&bootsHasFullRadiationDefence);
- set(mBStat, StatType.F