diff options
| author | Alkalus <3060479+draknyte1@users.noreply.github.com> | 2022-01-14 20:22:34 +0000 |
|---|---|---|
| committer | Alkalus <3060479+draknyte1@users.noreply.github.com> | 2022-01-14 20:22:34 +0000 |
| commit | f6599e799922840f2e5c94d2c0b638357e75e5cd (patch) | |
| tree | 7627ab7fd0267cc26a8e36e74bf92f9493f933e8 /src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations | |
| parent | 87b3fdb080ad0409d9593e09f4206e5d70c78756 (diff) | |
| download | GT5-Unofficial-f6599e799922840f2e5c94d2c0b638357e75e5cd.tar.gz GT5-Unofficial-f6599e799922840f2e5c94d2c0b638357e75e5cd.tar.bz2 GT5-Unofficial-f6599e799922840f2e5c94d2c0b638357e75e5cd.zip | |
Fix Computer Cube GUI.
Fix Glod's shitty implementation of perfect OC which broke some multis.
Diffstat (limited to 'src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations')
| -rw-r--r-- | src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java | 40 |
1 files changed, 14 insertions, 26 deletions
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java index ec7115cb0f..1232166baa 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java @@ -753,26 +753,6 @@ public abstract class GregtechMeta_MultiBlockBase<T extends GT_MetaTileEntity_En return checkRecipeGeneric(tItemInputs, tFluidInputs, aMaxParallelRecipes, aEUPercent, aSpeedBonusPercent, aOutputChanceRoll); } - public boolean checkRecipeGeneric(GT_Recipe aRecipe, - int aMaxParallelRecipes, int aEUPercent, - int aSpeedBonusPercent, int aOutputChanceRoll, boolean isPerfectOC) { - if (aRecipe == null) { - return false; - } - ArrayList<ItemStack> tItems = getStoredInputs(); - ArrayList<FluidStack> tFluids = getStoredFluids(); - ItemStack[] tItemInputs = tItems.toArray(new ItemStack[tItems.size()]); - FluidStack[] tFluidInputs = tFluids.toArray(new FluidStack[tFluids.size()]); - return checkRecipeGeneric(tItemInputs, tFluidInputs, aMaxParallelRecipes, aEUPercent, aSpeedBonusPercent, aOutputChanceRoll, aRecipe, isPerfectOC); - } - - public boolean checkRecipeGeneric( - ItemStack[] aItemInputs, FluidStack[] aFluidInputs, - int aMaxParallelRecipes, int aEUPercent, - int aSpeedBonusPercent, int aOutputChanceRoll) { - return checkRecipeGeneric(aItemInputs, aFluidInputs, aMaxParallelRecipes, aEUPercent, aSpeedBonusPercent, aOutputChanceRoll, null, false); - } - public boolean checkRecipeGeneric(GT_Recipe aRecipe, int aMaxParallelRecipes, int aEUPercent, int aSpeedBonusPercent, int aOutputChanceRoll) { @@ -783,14 +763,14 @@ public abstract class GregtechMeta_MultiBlockBase<T extends GT_MetaTileEntity_En ArrayList<FluidStack> tFluids = getStoredFluids(); ItemStack[] tItemInputs = tItems.toArray(new ItemStack[tItems.size()]); FluidStack[] tFluidInputs = tFluids.toArray(new FluidStack[tFluids.size()]); - return checkRecipeGeneric(tItemInputs, tFluidInputs, aMaxParallelRecipes, aEUPercent, aSpeedBonusPercent, aOutputChanceRoll, aRecipe, false); + return checkRecipeGeneric(tItemInputs, tFluidInputs, aMaxParallelRecipes, aEUPercent, aSpeedBonusPercent, aOutputChanceRoll, aRecipe); } public boolean checkRecipeGeneric( ItemStack[] aItemInputs, FluidStack[] aFluidInputs, int aMaxParallelRecipes, int aEUPercent, - int aSpeedBonusPercent, int aOutputChanceRoll, boolean isPerfectOC) { - return checkRecipeGeneric(aItemInputs, aFluidInputs, aMaxParallelRecipes, aEUPercent, aSpeedBonusPercent, aOutputChanceRoll, null, isPerfectOC); + int aSpeedBonusPercent, int aOutputChanceRoll) { + return checkRecipeGeneric(aItemInputs, aFluidInputs, aMaxParallelRecipes, aEUPercent, aSpeedBonusPercent, aOutputChanceRoll, null); } @@ -941,10 +921,14 @@ public abstract class GregtechMeta_MultiBlockBase<T extends GT_MetaTileEntity_En return rEnergy; } + public boolean hasPerfectOverclock() { + return false; + } + public boolean checkRecipeGeneric( ItemStack[] aItemInputs, FluidStack[] aFluidInputs, int aMaxParallelRecipes, int aEUPercent, - int aSpeedBonusPercent, int aOutputChanceRoll, GT_Recipe aRecipe, boolean isPerpectOC) { + int aSpeedBonusPercent, int aOutputChanceRoll, GT_Recipe aRecipe) { // Based on the Processing Array. A bit overkill, but very flexible. // Reset outputs and progress stats @@ -1069,8 +1053,12 @@ public abstract class GregtechMeta_MultiBlockBase<T extends GT_MetaTileEntity_En } else { while (this.mEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) { this.mEUt *= 4; - if (isPerpectOC) this.mMaxProgresstime /= 4; - else this.mMaxProgresstime /= 2; + if (hasPerfectOverclock()) { + this.mMaxProgresstime /= 4; + } + else { + this.mMaxProgresstime /= 2; + } } } |
