diff options
author | Techlone <techlone.mc@gmail.com> | 2016-06-20 16:17:16 +0500 |
---|---|---|
committer | Techlone <techlone.mc@gmail.com> | 2016-06-20 16:17:16 +0500 |
commit | 8e9daf0f677045e1cd753123dcf2b649aaf0568d (patch) | |
tree | 0d4dcd8861248f38210a3d9d813078c93d5f0177 /src/main/java/gregtech/api/metatileentity | |
parent | 708f59d6e7f46868c06b14aa56de556413973751 (diff) | |
parent | f708fc5ff8faca68dcc334bcf85560630157cbf1 (diff) | |
download | GT5-Unofficial-8e9daf0f677045e1cd753123dcf2b649aaf0568d.tar.gz GT5-Unofficial-8e9daf0f677045e1cd753123dcf2b649aaf0568d.tar.bz2 GT5-Unofficial-8e9daf0f677045e1cd753123dcf2b649aaf0568d.zip |
Merge branch 'experimental' of https://github.com/Blood-Asp/GT5-Unofficial into experimental
Diffstat (limited to 'src/main/java/gregtech/api/metatileentity')
-rw-r--r-- | src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java index fad4ab153a..9003e441f5 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java @@ -37,6 +37,8 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { public ItemStack[] mOutputItems = null; public FluidStack[] mOutputFluids = null; public String mNEI; + public int damageFactorLow = 5; + public float damageFactorHigh = 0.6f; public ArrayList<GT_MetaTileEntity_Hatch_Input> mInputHatches = new ArrayList<GT_MetaTileEntity_Hatch_Input>(); public ArrayList<GT_MetaTileEntity_Hatch_Output> mOutputHatches = new ArrayList<GT_MetaTileEntity_Hatch_Output>(); @@ -50,12 +52,16 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { public GT_MetaTileEntity_MultiBlockBase(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional, 2); this.disableMaintenance = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "MultiBlockMachines.disableMaintenance", false); + this.damageFactorLow = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "MultiBlockMachines.damageFactorLow", 5); + this.damageFactorHigh = (float) GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "MultiBlockMachines.damageFactorHigh", 0.6f); this.mNEI = ""; } public GT_MetaTileEntity_MultiBlockBase(String aName) { super(aName, 2); this.disableMaintenance = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "MultiBlockMachines.disableMaintenance", false); + this.damageFactorLow = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "MultiBlockMachines.damageFactorLow", 5); + this.damageFactorHigh = (float) GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "MultiBlockMachines.damageFactorHigh", 0.6f); } public static boolean isValidMetaTileEntity(MetaTileEntity aMetaTileEntity) { @@ -465,7 +471,7 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { } } - ((GT_MetaGenerated_Tool) mInventory[1].getItem()).doDamage(mInventory[1], (long) Math.min(mEUt / 5, Math.pow(mEUt, 0.7))); + ((GT_MetaGenerated_Tool) mInventory[1].getItem()).doDamage(mInventory[1], (long) Math.min(mEUt / this.damageFactorLow, Math.pow(mEUt, this.damageFactorHigh))); if (mInventory[1].stackSize == 0) mInventory[1] = null; } } |