Work on tiers

This commit is contained in:
Technus 2016-09-08 23:31:15 +02:00
parent 93da2917ed
commit 9847f73d98
10 changed files with 20 additions and 19 deletions

View file

@ -542,9 +542,9 @@ public abstract class GT_MetaTileEntity_BasicMachine extends GT_MetaTileEntity_B
while (tempEUt <= V[mTier -1] * (long)mAmperage) { while (tempEUt <= V[mTier -1] * (long)mAmperage) {
tempEUt *= 4;//this actually controls overclocking tempEUt *= 4;//this actually controls overclocking
xEUt *= 4;//this is effect of everclocking //xEUt *= 4;//this is effect of everclocking
mMaxProgresstime /= 2;//this is effect of overclocking mMaxProgresstime /= 2;//this is effect of overclocking
xEUt = mMaxProgresstime==0 ? xEUt/2 : xEUt;//U know, if the time is less than 1 tick make the machine use 2x less power xEUt = mMaxProgresstime==0 ? (long)(xEUt/1.1D) : xEUt*4;//U know, if the time is less than 1 tick make the machine use 2x less power
} }
if(xEUt>Integer.MAX_VALUE-1){ if(xEUt>Integer.MAX_VALUE-1){
mEUt = Integer.MAX_VALUE-1; mEUt = Integer.MAX_VALUE-1;

View file

@ -541,9 +541,9 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity {
while (tempEUt <= V[mTier -1] * mAmperage) { while (tempEUt <= V[mTier -1] * mAmperage) {
tempEUt *= 4;//this actually controls overclocking tempEUt *= 4;//this actually controls overclocking
xEUt *= 4;//this is effect of everclocking //xEUt *= 4;//this is effect of everclocking
mMaxProgresstime /= 2;//this is effect of overclocking mMaxProgresstime /= 2;//this is effect of overclocking
xEUt = mMaxProgresstime==0 ? xEUt/2 : xEUt;//U know, if the time is less than 1 tick make the machine use 2x less power xEUt = mMaxProgresstime==0 ? (long)(xEUt/1.1D) : xEUt*4;//U know, if the time is less than 1 tick make the machine use less power
} }
if(xEUt>Integer.MAX_VALUE-1){ if(xEUt>Integer.MAX_VALUE-1){
mEUt = Integer.MAX_VALUE-1; mEUt = Integer.MAX_VALUE-1;

View file

@ -31,7 +31,7 @@ public class GT_MetaTileEntity_Boxinator
} }
public int checkRecipe() { public int checkRecipe() {
int tCheck = super.checkRecipe(true); int tCheck = super.checkRecipe();
if (tCheck != DID_NOT_FIND_RECIPE) { if (tCheck != DID_NOT_FIND_RECIPE) {
return tCheck; return tCheck;
} }

View file

@ -85,14 +85,14 @@ public class GT_MetaTileEntity_Massfabricator
//Long EUt calculation //Long EUt calculation
long xEUt=GT_Values.V[1] * (long)Math.pow(2,mTier+2); long xEUt=GT_Values.V[1] * (long)Math.pow(2,mTier+2);
long tempEUt = GT_Values.V[mTier]; long tempEUt = GT_Values.V[1];
mMaxProgresstime = sDurationMultiplier; mMaxProgresstime = sDurationMultiplier;
while (tempEUt <= V[mTier -1]) { while (tempEUt <= V[mTier -1]) {
tempEUt *= 4;//this actually controls overclocking tempEUt *= 4;//this actually controls overclocking
mMaxProgresstime /= 2;//this is effect of overclocking mMaxProgresstime /= 2;//this is effect of overclocking
xEUt = mMaxProgresstime==0 ? (int)(xEUt/1.1F) : xEUt;//U know, if the time is less than 1 tick make the machine use less power xEUt = mMaxProgresstime==0 ? (long)(xEUt/1.1D) : xEUt;//U know, if the time is less than 1 tick make the machine use less power
} }
if(xEUt>Integer.MAX_VALUE-1){ if(xEUt>Integer.MAX_VALUE-1){
mEUt = Integer.MAX_VALUE-1; mEUt = Integer.MAX_VALUE-1;

View file

@ -40,7 +40,7 @@ public class GT_MetaTileEntity_MonsterRepellent extends GT_MetaTileEntity_Tiered
if ((aTimer % 600 == 0) && !GT_SpawnEventHandler.mobReps.contains(tCoords)) { if ((aTimer % 600 == 0) && !GT_SpawnEventHandler.mobReps.contains(tCoords)) {
GT_SpawnEventHandler.mobReps.add(tCoords); GT_SpawnEventHandler.mobReps.add(tCoords);
} }
if (aBaseMetaTileEntity.isUniversalEnergyStored(getMinimumStoredEU()) && aBaseMetaTileEntity.decreaseStoredEnergyUnits(1 << (this.mTier * 2), false)) { if (aBaseMetaTileEntity.isUniversalEnergyStored(getMinimumStoredEU()) && aBaseMetaTileEntity.decreaseStoredEnergyUnits(1L << (this.mTier * 2), false)) {
mRange = 16 + (48 * mTier); mRange = 16 + (48 * mTier);
} else { } else {
mRange = 4 + (12 * mTier); mRange = 4 + (12 * mTier);

View file

@ -35,10 +35,16 @@ public class GT_MetaTileEntity_PotionBrewer
} }
public int checkRecipe() { public int checkRecipe() {
int tCheck = super.checkRecipe(true); int tCheck = super.checkRecipe();
if (tCheck != 0) { if (tCheck != DID_NOT_FIND_RECIPE) {
return tCheck; return tCheck;
} }
calculateOverclockedNess(4,128);
//In case recipe is too OP for that machine
if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1)
return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS;
FluidStack aFluid = getFillableStack(); FluidStack aFluid = getFillableStack();
if ((getDrainableStack() == null) && (aFluid != null) && (getInputAt(0) != null)) { if ((getDrainableStack() == null) && (aFluid != null) && (getInputAt(0) != null)) {
String tInputName = aFluid.getFluid().getName(); String tInputName = aFluid.getFluid().getName();
@ -106,11 +112,6 @@ public class GT_MetaTileEntity_PotionBrewer
} }
private final int setOutput(String aFluidName) { private final int setOutput(String aFluidName) {
calculateOverclockedNess(4,128);
//In case recipe is too OP for that machine
if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1)
return FOUND_RECIPE_BUT_DID_NOT_MEET_REQUIREMENTS;
this.mOutputFluid = FluidRegistry.getFluidStack(aFluidName, 750); this.mOutputFluid = FluidRegistry.getFluidStack(aFluidName, 750);
if (this.mOutputFluid == null) { if (this.mOutputFluid == null) {
this.mOutputFluid = FluidRegistry.getFluidStack("potion.mundane", getFillableStack().amount); this.mOutputFluid = FluidRegistry.getFluidStack("potion.mundane", getFillableStack().amount);

View file

@ -103,7 +103,7 @@ public class GT_MetaTileEntity_DistillationTower
if (tRecipe.isRecipeInputEqual(true, tFluids, new ItemStack[]{})) { if (tRecipe.isRecipeInputEqual(true, tFluids, new ItemStack[]{})) {
this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000);
this.mEfficiencyIncrease = 10000; this.mEfficiencyIncrease = 10000;
calculateOverclockedNessMulti(mEUt, mMaxProgresstime, 1, tVoltage); calculateOverclockedNessMulti(tRecipe.mEUt, tRecipe.mDuration, 1, tVoltage);
//In case recipe is too OP for that machine //In case recipe is too OP for that machine
if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1) if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1)
return false; return false;

View file

@ -108,7 +108,7 @@ public class GT_MetaTileEntity_ElectricBlastFurnace
if ((tRecipe != null) && (this.mHeatingCapacity >= tRecipe.mSpecialValue) && (tRecipe.isRecipeInputEqual(true, tFluids, tInputs))) { if ((tRecipe != null) && (this.mHeatingCapacity >= tRecipe.mSpecialValue) && (tRecipe.isRecipeInputEqual(true, tFluids, tInputs))) {
this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000);
this.mEfficiencyIncrease = 10000; this.mEfficiencyIncrease = 10000;
calculateOverclockedNessMulti(mEUt, mMaxProgresstime, 1, tVoltage); calculateOverclockedNessMulti(tRecipe.mEUt, tRecipe.mDuration, 1, tVoltage);
//In case recipe is too OP for that machine //In case recipe is too OP for that machine
if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1) if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1)
return false; return false;

View file

@ -88,7 +88,7 @@ public class GT_MetaTileEntity_ImplosionCompressor
this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000);
this.mEfficiencyIncrease = 10000; this.mEfficiencyIncrease = 10000;
//OC THAT EXPLOSIVE SHIT!!! //OC THAT EXPLOSIVE SHIT!!!
calculateOverclockedNessMulti(mEUt, tRecipe.mDuration, 1, getMaxInputVoltage()); calculateOverclockedNessMulti(tRecipe.mEUt, tRecipe.mDuration, 1, getMaxInputVoltage());
//In case recipe is too OP for that machine //In case recipe is too OP for that machine
if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1) if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1)
return false; return false;

View file

@ -83,7 +83,7 @@ public class GT_MetaTileEntity_OilCracker extends GT_MetaTileEntity_MultiBlockBa
this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000);
this.mEfficiencyIncrease = 10000; this.mEfficiencyIncrease = 10000;
calculateOverclockedNessMulti(mEUt, tRecipe.mDuration, 1, getMaxInputVoltage()); calculateOverclockedNessMulti(tRecipe.mEUt, tRecipe.mDuration, 1, getMaxInputVoltage());
//In case recipe is too OP for that machine //In case recipe is too OP for that machine
if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1) if (mMaxProgresstime == Integer.MAX_VALUE - 1 && mEUt == Integer.MAX_VALUE - 1)
return false; return false;