aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic
diff options
context:
space:
mode:
authorJordan Byrne <draknyte1@hotmail.com>2017-12-24 11:54:30 +1000
committerJordan Byrne <draknyte1@hotmail.com>2017-12-24 11:54:30 +1000
commitecf908e98ccee72a713091e8ab547e35a41d7436 (patch)
treef0dade1481aa02fd0ac4fcf8a672cc7a761a0547 /src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic
parentb9fe3352840abe0846834cefd578895ec6f5e520 (diff)
parentfa5de3584ce7bc97ce6f32b31f6062b5b6e89e75 (diff)
downloadGT5-Unofficial-ecf908e98ccee72a713091e8ab547e35a41d7436.tar.gz
GT5-Unofficial-ecf908e98ccee72a713091e8ab547e35a41d7436.tar.bz2
GT5-Unofficial-ecf908e98ccee72a713091e8ab547e35a41d7436.zip
> Why does Git make me do these? arghhh...
Merge branch 'master' of https://github.com/draknyte1/GTplusplus # Conflicts: # src/Java/gtPlusPlus/core/material/ALLOY.java # src/Java/gtPlusPlus/core/material/ELEMENT.java # src/Java/gtPlusPlus/core/material/Material.java # src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Recycling.java
Diffstat (limited to 'src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic')
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_WorldAccelerator.java14
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaAtmosphericReconditioner.java28
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaPollutionCreator.java3
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaPollutionDetector.java4
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_CompactFusionReactor.java61
5 files changed, 54 insertions, 56 deletions
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_WorldAccelerator.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_WorldAccelerator.java
index e0f94036a7..da3b8aa551 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_WorldAccelerator.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_WorldAccelerator.java
@@ -13,8 +13,8 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.MetaTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_TieredMachineBlock;
import gregtech.api.objects.GT_RenderedTexture;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.player.PlayerUtils;
import net.minecraft.block.Block;
import net.minecraft.client.renderer.texture.IIconRegister;
@@ -213,8 +213,8 @@ public class GT_MetaTileEntity_WorldAccelerator extends GT_MetaTileEntity_Tiered
}
}
} catch (Exception e) {
- Utils.LOG_ERROR("GT_MetaTileEntity_WorldAccelerator.onPostTick.crash");
- Utils.LOG_ERROR(e.getMessage());
+ Logger.ERROR("GT_MetaTileEntity_WorldAccelerator.onPostTick.crash");
+ Logger.ERROR(e.getMessage());
}
}
@@ -236,8 +236,8 @@ public class GT_MetaTileEntity_WorldAccelerator extends GT_MetaTileEntity_Tiered
}
}
} catch (Exception e) {
- Utils.LOG_ERROR("GT_MetaTileEntity_WorldAccelerator.doAccelerateTileEntities.crash");
- Utils.LOG_ERROR(e.getMessage());
+ Logger.ERROR("GT_MetaTileEntity_WorldAccelerator.doAccelerateTileEntities.crash");
+ Logger.ERROR(e.getMessage());
}
}
@@ -316,8 +316,8 @@ public class GT_MetaTileEntity_WorldAccelerator extends GT_MetaTileEntity_Tiered
tBlock.updateTick(pWorld, pX, pY, pZ, pRnd);
}
} catch (Exception e) {
- Utils.LOG_ERROR("GT_MetaTileEntity_WorldAccelerator.tryTickBlock.crash");
- Utils.LOG_ERROR(e.getMessage());
+ Logger.ERROR("GT_MetaTileEntity_WorldAccelerator.tryTickBlock.crash");
+ Logger.ERROR(e.getMessage());
}
}
} \ No newline at end of file
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaAtmosphericReconditioner.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaAtmosphericReconditioner.java
index 69892ea995..b99ce19031 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaAtmosphericReconditioner.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaAtmosphericReconditioner.java
@@ -12,10 +12,10 @@ import gregtech.api.objects.GT_RenderedTexture;
import gregtech.api.util.GT_ModHandler;
import gregtech.api.util.GT_Utility;
import gregtech.common.items.GT_MetaGenerated_Tool_01;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.item.general.ItemAirFilter;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.util.PollutionUtils;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.math.MathUtils;
import gtPlusPlus.xmod.gregtech.api.gui.basic.CONTAINER_PollutionCleaner;
import gtPlusPlus.xmod.gregtech.api.gui.basic.GUI_PollutionCleaner;
@@ -158,7 +158,7 @@ public class GregtechMetaAtmosphericReconditioner extends GT_MetaTileEntity_Basi
//Use a Turbine
if(hasRotor(stackRotor) && hasAirFilter(stackFilter)){
- Utils.LOG_WARNING("Found Turbine.");
+ Logger.WARNING("Found Turbine.");
mBaseEff = (int) ((50.0F + (10.0F * ((GT_MetaGenerated_Tool) stackRotor.getItem()).getToolCombatDamage(stackRotor))) * 100);
mOptimalAirFlow = (int) Math.max(Float.MIN_NORMAL, ((GT_MetaGenerated_Tool) stackRotor.getItem()).getToolStats(stackRotor).getSpeedMultiplier()
* GT_MetaGenerated_Tool.getPrimaryMaterial(stackRotor).mToolSpeed * 50);
@@ -168,8 +168,8 @@ public class GregtechMetaAtmosphericReconditioner extends GT_MetaTileEntity_Basi
//Utils.LOG_WARNING("Pollution Cleaner [5]");
//Log Debug information.
- Utils.LOG_WARNING("mBaseEff[1]:"+mBaseEff);
- Utils.LOG_WARNING("mOptimalAirFlow[1]:"+mOptimalAirFlow);
+ Logger.WARNING("mBaseEff[1]:"+mBaseEff);
+ Logger.WARNING("mOptimalAirFlow[1]:"+mOptimalAirFlow);
//Calculate The Voltage we are running
long tVoltage = maxEUInput();
@@ -182,7 +182,7 @@ public class GregtechMetaAtmosphericReconditioner extends GT_MetaTileEntity_Basi
//If no sides are free, how will you process the atmosphere?
if (mAirSides > 0){
mPollutionReduction += (((mTier*2)*100)*mAirSides); //Was originally *100
- Utils.LOG_WARNING("mPollutionReduction[1]:"+mPollutionReduction);
+ Logger.WARNING("mPollutionReduction[1]:"+mPollutionReduction);
//I stole this code
mPollutionReduction = (MathUtils.safeInt((long)mPollutionReduction*this.mBaseEff)/100000)*mAirSides;
@@ -193,7 +193,7 @@ public class GregtechMetaAtmosphericReconditioner extends GT_MetaTileEntity_Basi
//Set a temp to remove variable to aleviate duplicate code.
int toRemove = 0;
- Utils.LOG_WARNING("mCurrentPollution[4]:"+mCurrentPollution);
+ Logger.WARNING("mCurrentPollution[4]:"+mCurrentPollution);
if (mPollutionReduction <= mCurrentPollution){
//Clean some Air.
toRemove = mPollutionReduction;
@@ -207,10 +207,10 @@ public class GregtechMetaAtmosphericReconditioner extends GT_MetaTileEntity_Basi
if (toRemove > 0){
if (damageTurbineRotor() && damageAirFilter()){
removePollution(toRemove);
- Utils.LOG_WARNING("mNewPollution[4]:"+getCurrentChunkPollution());
+ Logger.WARNING("mNewPollution[4]:"+getCurrentChunkPollution());
}
else {
- Utils.LOG_WARNING("Could not damage turbine rotor or Air Filter.");
+ Logger.WARNING("Could not damage turbine rotor or Air Filter.");
aBaseMetaTileEntity.setActive(false);
}
} //End of pollution removal block.
@@ -271,16 +271,16 @@ public class GregtechMetaAtmosphericReconditioner extends GT_MetaTileEntity_Basi
}
}
- Utils.LOG_WARNING("Trying to do "+damageValue+" damage to the rotor.");
+ Logger.WARNING("Trying to do "+damageValue+" damage to the rotor.");
//Damage Rotor
//int rotorDurability = this.mInventory[this.SLOT_ROTOR].getItemDamage();
long rotorDamage = GT_MetaGenerated_Tool.getToolDamage(this.mInventory[this.SLOT_ROTOR]);
long rotorDurabilityMax = GT_MetaGenerated_Tool.getToolMaxDamage(this.mInventory[this.SLOT_ROTOR]);
long rotorDurability = (rotorDurabilityMax - rotorDamage);
- Utils.LOG_WARNING("Rotor Damage: "+rotorDamage + " | Max Durability: "+rotorDurabilityMax+" | "+" Remaining Durability: "+rotorDurability);
+ Logger.WARNING("Rotor Damage: "+rotorDamage + " | Max Durability: "+rotorDurabilityMax+" | "+" Remaining Durability: "+rotorDurability);
if (rotorDurability > damageValue){
- Utils.LOG_WARNING("Damaging Rotor.");
+ Logger.WARNING("Damaging Rotor.");
GT_ModHandler.damageOrDechargeItem(this.mInventory[this.SLOT_ROTOR], (int) damageValue, 0, null);
long tempDur = GT_MetaGenerated_Tool.getToolDamage(this.mInventory[this.SLOT_ROTOR]);
@@ -293,14 +293,14 @@ public class GregtechMetaAtmosphericReconditioner extends GT_MetaTileEntity_Basi
}
if (rotorDurability <= 0) {
- Utils.LOG_WARNING("Destroying Rotor.");
+ Logger.WARNING("Destroying Rotor.");
this.mInventory[this.SLOT_ROTOR] = null;
return false;
}
}else {
- Utils.LOG_WARNING("Bad Rotor.");
+ Logger.WARNING("Bad Rotor.");
return false;
}
}
@@ -369,7 +369,7 @@ public class GregtechMetaAtmosphericReconditioner extends GT_MetaTileEntity_Basi
else {
//Do Damage
ItemAirFilter.setFilterDamage(filter, currentUse+1);
- Utils.LOG_WARNING("Filter Damage: "+currentUse);
+ Logger.WARNING("Filter Damage: "+currentUse);
return true;
}
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaPollutionCreator.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaPollutionCreator.java
index 77f139ccd8..d6286fb409 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaPollutionCreator.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaPollutionCreator.java
@@ -6,6 +6,7 @@ import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.objects.GT_RenderedTexture;
import gregtech.api.util.GT_Utility;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.util.PollutionUtils;
import gtPlusPlus.core.util.Utils;
@@ -394,7 +395,7 @@ public class GregtechMetaPollutionCreator extends GregtechMetaTileEntity {
else {
returnValue = getCurrentChunkPollution();
}
- Utils.LOG_INFO("| DEBUG: "+returnValue +" | ArrayPos:"+this.mArrayPos+" | Counter:"+counter+" | Total:"+total+" |");
+ Logger.INFO("| DEBUG: "+returnValue +" | ArrayPos:"+this.mArrayPos+" | Counter:"+counter+" | Total:"+total+" |");
return returnValue;
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaPollutionDetector.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaPollutionDetector.java
index 677f0342a1..53c66a0425 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaPollutionDetector.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaPollutionDetector.java
@@ -6,6 +6,7 @@ import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.objects.GT_RenderedTexture;
import gregtech.api.util.GT_Utility;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.util.PollutionUtils;
import gtPlusPlus.core.util.Utils;
@@ -404,7 +405,7 @@ public class GregtechMetaPollutionDetector extends GregtechMetaTileEntity {
else {
returnValue = getCurrentChunkPollution();
}
- Utils.LOG_INFO("| DEBUG: "+returnValue +" | ArrayPos:"+this.mArrayPos+" | Counter:"+counter+" | Total:"+total+" |");
+ Logger.INFO("| DEBUG: "+returnValue +" | ArrayPos:"+this.mArrayPos+" | Counter:"+counter+" | Total:"+total+" |");
return returnValue;
}
@@ -434,6 +435,7 @@ public class GregtechMetaPollutionDetector extends GregtechMetaTileEntity {
super.onScrewdriverRightClick(aSide, aPlayer, aX, aY, aZ);
}
+ @Override
public boolean allowGeneralRedstoneOutput() {
if (this.getCurrentChunkPollution() >= this.mRedstoneLevel){
this.markDirty();
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_CompactFusionReactor.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_CompactFusionReactor.java
index dc28b6b761..f739e73c26 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_CompactFusionReactor.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_CompactFusionReactor.java
@@ -9,11 +9,9 @@ import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.MetaTileEntity;
import gregtech.api.objects.GT_RenderedTexture;
-import gregtech.api.util.GT_Recipe;
-import gregtech.api.util.GT_Utility;
-import gregtech.api.util.Recipe_GT;
+import gregtech.api.util.*;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.math.MathUtils;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_DeluxeMachine;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
@@ -147,16 +145,16 @@ GT_MetaTileEntity_DeluxeMachine {
long mFusionPoint = 20000000L;
@Override
public int checkRecipe() {
- Utils.LOG_WARNING("Recipe Tick 1.");
+ Logger.WARNING("Recipe Tick 1.");
if (!this.mCanProcessRecipe) {
- Utils.LOG_WARNING("Recipe Tick 1.1 - Cannot Process Recipe.");
+ Logger.WARNING("Recipe Tick 1.1 - Cannot Process Recipe.");
if (this.mChargeConsumed < mFusionPoint) {
- Utils.LOG_WARNING("Recipe Tick 1.2 - Cannot Ignite Fusion, Charge too low.");
+ Logger.WARNING("Recipe Tick 1.2 - Cannot Ignite Fusion, Charge too low.");
this.mCharging = true;
this.mCanProcessRecipe = false;
if (this.getBaseMetaTileEntity().decreaseStoredEnergyUnits(
(mFusionPoint / 100), false)) {
- Utils.LOG_WARNING("Recipe Tick 1.3 - Charging Internal storage. "+(mFusionPoint / 100)+"/"+mFusionPoint);
+ Logger.WARNING("Recipe Tick 1.3 - Charging Internal storage. "+(mFusionPoint / 100)+"/"+mFusionPoint);
mChargeConsumed += (mFusionPoint / 100);
}
} else {
@@ -166,13 +164,13 @@ GT_MetaTileEntity_DeluxeMachine {
}
} else {
- Utils.LOG_WARNING("Recipe Tick 1.1 - Try to Process Recipe.");
+ Logger.WARNING("Recipe Tick 1.1 - Try to Process Recipe.");
if (checkRecipeMulti()) {
- Utils.LOG_WARNING("Recipe Tick 1.2 - Process Recipe was Successful.");
+ Logger.WARNING("Recipe Tick 1.2 - Process Recipe was Successful.");
return 2;
}
}
- Utils.LOG_WARNING("Recipe Tick 2. - Process Recipe failed.");
+ Logger.WARNING("Recipe Tick 2. - Process Recipe failed.");
return 0;
}
@@ -188,11 +186,11 @@ GT_MetaTileEntity_DeluxeMachine {
int tFluidList_sS = tFluidList.size();
for (int i = 0; i < tFluidList_sS - 1; i++) {
for (int j = i + 1; j < tFluidList_sS; j++) {
- if (GT_Utility.areFluidsEqual((FluidStack) tFluidList.get(i),
- (FluidStack) tFluidList.get(j))) {
- if (((FluidStack) tFluidList
- .get(i)).amount >= ((FluidStack) tFluidList
- .get(j)).amount) {
+ if (GT_Utility.areFluidsEqual(tFluidList.get(i),
+ tFluidList.get(j))) {
+ if (tFluidList
+ .get(i).amount >= tFluidList
+ .get(j).amount) {
tFluidList.remove(j--);
tFluidList_sS = tFluidList.size();
} else {
@@ -435,22 +433,22 @@ GT_MetaTileEntity_DeluxeMachine {
long aTick) {
//super.onPostTick(aBaseMetaTileEntity, aTick);
if (aBaseMetaTileEntity.isServerSide()) {
- Utils.LOG_WARNING("1");
+ Logger.WARNING("1");
if (mEfficiency < 0)
mEfficiency = 0;
if (mRunningOnLoad) {
- Utils.LOG_WARNING("2");
+ Logger.WARNING("2");
this.mEUStore = (int) aBaseMetaTileEntity.getStoredEU();
checkRecipeMulti();
}
if (--mUpdate == 0 || --mStartUpCheck == 0) {
- Utils.LOG_WARNING("3");
+ Logger.WARNING("3");
mMachine = true;
}
if (mStartUpCheck < 0) {
- Utils.LOG_WARNING("4");
+ Logger.WARNING("4");
if (mMachine) {
- Utils.LOG_WARNING("5");
+ Logger.WARNING("5");
if (aBaseMetaTileEntity.getStoredEU()
+ (2048 * tierOverclock()) < maxEUStore()) {
@@ -458,12 +456,12 @@ GT_MetaTileEntity_DeluxeMachine {
2048 * tierOverclock(), true);
}
if (this.mEUStore <= 0 && mMaxProgresstime > 0) {
- Utils.LOG_WARNING("6");
+ Logger.WARNING("6");
stopMachine();
this.mLastRecipe = null;
}
if (mMaxProgresstime > 0) {
- Utils.LOG_WARNING("7");
+ Logger.WARNING("7");
this.getBaseMetaTileEntity()
.decreaseStoredEnergyUnits(mEUt, true);
if (mMaxProgresstime > 0 && ++mProgresstime >= mMaxProgresstime) {
@@ -485,21 +483,21 @@ GT_MetaTileEntity_DeluxeMachine {
checkRecipeMulti();
}
} else {
- Utils.LOG_WARNING("8");
+ Logger.WARNING("8");
if (aTick % 100 == 0
|| aBaseMetaTileEntity.hasWorkJustBeenEnabled()
|| aBaseMetaTileEntity
.hasInventoryBeenModified()) {
- Utils.LOG_WARNING("9");
+ Logger.WARNING("9");
// turnCasingActive(mMaxProgresstime > 0);
if (aBaseMetaTileEntity.isAllowedToWork()) {
- Utils.LOG_WARNING("10");
+ Logger.WARNING("10");
this.mEUStore = (int) aBaseMetaTileEntity
.getStoredEU();
if (checkRecipeMulti()) {
- Utils.LOG_WARNING("11");
+ Logger.WARNING("11");
if (this.mEUStore < this.mLastRecipe.mSpecialValue) {
- Utils.LOG_WARNING("12");
+ Logger.WARNING("12");
mMaxProgresstime = 0;
// turnCasingActive(false);
}
@@ -515,12 +513,12 @@ GT_MetaTileEntity_DeluxeMachine {
}
} else {
// turnCasingActive(false);
- Utils.LOG_WARNING("Bad");
+ Logger.WARNING("Bad");
this.mLastRecipe = null;
stopMachine();
}
}
- Utils.LOG_WARNING("Good");
+ Logger.WARNING("Good");
aBaseMetaTileEntity.setActive(mMaxProgresstime > 0);
}
}
@@ -605,19 +603,16 @@ GT_MetaTileEntity_DeluxeMachine {
@Override
public int fill(FluidStack aFluid, boolean doFill) {
- // TODO Auto-generated method stub
return super.fill(aFluid, doFill);
}
@Override
public FluidStack drain(int maxDrain, boolean doDrain) {
- // TODO Auto-generated method stub
return super.drain(maxDrain, doDrain);
}
@Override
public int getTankPressure() {
- // TODO Auto-generated method stub
return 500;
}