aboutsummaryrefslogtreecommitdiff
path: root/src/Java
diff options
context:
space:
mode:
authorAlkalus <draknyte1@hotmail.com>2017-08-23 08:39:36 +1000
committerAlkalus <draknyte1@hotmail.com>2017-08-23 08:39:36 +1000
commit98a0ca6df251d7fc1070b1ffb6fa43da950f4280 (patch)
tree0a34747c0a33efcbb8546ee6cb7bad6800344205 /src/Java
parentc6b47e25879c6da869f9591faac397a7569ac0ed (diff)
downloadGT5-Unofficial-98a0ca6df251d7fc1070b1ffb6fa43da950f4280.tar.gz
GT5-Unofficial-98a0ca6df251d7fc1070b1ffb6fa43da950f4280.tar.bz2
GT5-Unofficial-98a0ca6df251d7fc1070b1ffb6fa43da950f4280.zip
% More Reactor Work.
$ None of my items give the radiation de-buff when in creative any more.
Diffstat (limited to 'src/Java')
-rw-r--r--src/Java/gtPlusPlus/core/item/base/BaseItemComponent.java6
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMTE_NuclearReactor.java42
2 files changed, 31 insertions, 17 deletions
diff --git a/src/Java/gtPlusPlus/core/item/base/BaseItemComponent.java b/src/Java/gtPlusPlus/core/item/base/BaseItemComponent.java
index 4731581d83..35f1942040 100644
--- a/src/Java/gtPlusPlus/core/item/base/BaseItemComponent.java
+++ b/src/Java/gtPlusPlus/core/item/base/BaseItemComponent.java
@@ -187,7 +187,11 @@ public class BaseItemComponent extends Item{
@Override
public void onUpdate(final ItemStack iStack, final World world, final Entity entityHolding, final int p_77663_4_, final boolean p_77663_5_) {
if (this.componentMaterial != null){
- EntityUtils.applyRadiationDamageToEntity(this.componentMaterial.vRadiationLevel, world, entityHolding);
+ if (entityHolding instanceof EntityPlayer){
+ if (!((EntityPlayer) entityHolding).capabilities.isCreativeMode){
+ EntityUtils.applyRadiationDamageToEntity(this.componentMaterial.vRadiationLevel, world, entityHolding);
+ }
+ }
}
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMTE_NuclearReactor.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMTE_NuclearReactor.java
index 5e26132359..d5f2388305 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMTE_NuclearReactor.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMTE_NuclearReactor.java
@@ -85,7 +85,7 @@ public class GregtechMTE_NuclearReactor extends GT_MetaTileEntity_MultiBlockBase
"Liquid Fluoride Thorium Reactor",
tRunning,
tMaintainance,
- "Current Output: "+((this.mEUt*this.mEfficiency)/10000)+" EU/t",
+ "Current Output: "+this.mEUt+" EU/t",
"Fuel Consumption: "+this.fuelConsumption+"L/t",
"Fuel Value: "+this.fuelValue+" EU/L",
"Fuel Remaining: "+this.fuelRemaining+" Litres",
@@ -243,10 +243,10 @@ public class GregtechMTE_NuclearReactor extends GT_MetaTileEntity_MultiBlockBase
}
- if (this.mEnergyHatches != null) {
- for (int i = 0; i < this.mEnergyHatches.size(); i++) {
- if (this.mEnergyHatches.get(i).mTier < 5){
- Utils.LOG_INFO("You require at LEAST IV tier Energy Hatches.");
+ if (this.mDynamoHatches != null) {
+ for (int i = 0; i < this.mDynamoHatches.size(); i++) {
+ if (this.mDynamoHatches.get(i).mTier < 5){
+ Utils.LOG_INFO("You require at LEAST IV tier Dynamo Hatches.");
Utils.LOG_INFO(this.mOutputHatches.get(i).getBaseMetaTileEntity().getXCoord()+","+this.mOutputHatches.get(i).getBaseMetaTileEntity().getYCoord()+","+this.mOutputHatches.get(i).getBaseMetaTileEntity().getZCoord());
return false;
}
@@ -274,23 +274,23 @@ public class GregtechMTE_NuclearReactor extends GT_MetaTileEntity_MultiBlockBase
}
}
if (this.mMufflerHatches.size() != 4){
- Utils.LOG_INFO("You require EXACTLY 4 muffler hatches on top. FOUR.");
+ Utils.LOG_INFO("You require EXACTLY 4 muffler hatches on top. FOUR. You have "+this.mMufflerHatches.size());
return false;
}
- if (this.mInputHatches.size() >= 4){
- Utils.LOG_INFO("You require 4 or more input hatches.");
+ if (this.mInputHatches.size() < 4){
+ Utils.LOG_INFO("You require 4 or more input hatches. You have "+this.mInputHatches.size());
return false;
}
- if (this.mOutputHatches.size() >= 10){
- Utils.LOG_INFO("You require 4 or more output hatches.");
+ if (this.mOutputHatches.size() < 10){
+ Utils.LOG_INFO("You require 10 or more output hatches. You have "+this.mOutputHatches.size());
return false;
}
- if (this.mEnergyHatches.size() != 4){
- Utils.LOG_INFO("You require EXACTLY 4 dynamo hatches. FOUR.");
+ if (this.mDynamoHatches.size() != 4){
+ Utils.LOG_INFO("You require EXACTLY 4 dynamo hatches. FOUR. You have "+this.mDynamoHatches.size());
return false;
}
if (this.mMaintenanceHatches.size() != 2){
- Utils.LOG_INFO("You require EXACTLY 2 muffler hatches. TWO.");
+ Utils.LOG_INFO("You require EXACTLY 2 muffler hatches. TWO. You have "+this.mMaintenanceHatches.size());
return false;
}
this.mWrench = true;
@@ -481,9 +481,9 @@ public class GregtechMTE_NuclearReactor extends GT_MetaTileEntity_MultiBlockBase
}
Utils.LOG_INFO("Efficiency == "+this.mEfficiency);
- this.mEUt = (this.mEfficiency < 500 ? 2048 : (8196*4)); //Output 0 if startup is less than 20%
+ this.mEUt = (this.mEfficiency < 500 ? 2048 : (8196)); //Output 0 if startup is less than 20%
Utils.LOG_INFO("Generating "+this.mEUt+"EU/t @ an efficiency level of "+this.mEfficiency);
-
+
this.mProgresstime = 1;
this.mMaxProgresstime = 1;
this.mEfficiencyIncrease = 15;
@@ -506,7 +506,7 @@ public class GregtechMTE_NuclearReactor extends GT_MetaTileEntity_MultiBlockBase
public int getAmountOfOutputs() {
- return 1;
+ return 10;
}
@Override
@@ -593,4 +593,14 @@ public class GregtechMTE_NuclearReactor extends GT_MetaTileEntity_MultiBlockBase
return outputArrayOfGases;
}
+ @Override
+ public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
+ //Add Power if active
+ if (aBaseMetaTileEntity.isActive()){
+ Utils.LOG_INFO("Adding "+this.mEUt+"eu to internal storage.");
+ this.getBaseMetaTileEntity().increaseStoredEnergyUnits(this.mEUt, false);
+ }
+ super.onPostTick(aBaseMetaTileEntity, aTick);
+ }
+
} \ No newline at end of file