aboutsummaryrefslogtreecommitdiff
path: root/src/Java
diff options
context:
space:
mode:
authorAlkalus <draknyte1@hotmail.com>2017-08-05 19:14:04 +1000
committerAlkalus <draknyte1@hotmail.com>2017-08-05 19:14:04 +1000
commitb0d3a60dca5e98d84a99ff9d7ff29dd265f9e891 (patch)
treee2daa934f9e08d742fb0c5a07698b33ba3b84ba8 /src/Java
parent62e9a133bac776048009db6b20842b47f9f18996 (diff)
downloadGT5-Unofficial-b0d3a60dca5e98d84a99ff9d7ff29dd265f9e891.tar.gz
GT5-Unofficial-b0d3a60dca5e98d84a99ff9d7ff29dd265f9e891.tar.bz2
GT5-Unofficial-b0d3a60dca5e98d84a99ff9d7ff29dd265f9e891.zip
% Made the RTG pre .09 compliant.
% Changed the RTGs tier to HV.
Diffstat (limited to 'src/Java')
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntity_RTG.java19
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechRTG.java2
2 files changed, 15 insertions, 6 deletions
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntity_RTG.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntity_RTG.java
index 7b7e48864b..02c8b02aef 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntity_RTG.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntity_RTG.java
@@ -10,6 +10,7 @@ import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Utility;
import gregtech.api.util.Recipe_GT;
import gregtech.common.GT_Pollution;
+import gtPlusPlus.core.util.PollutionUtils;
import gtPlusPlus.core.util.math.MathUtils;
import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList;
import net.minecraft.init.Blocks;
@@ -38,7 +39,7 @@ public class GregtechMetaTileEntity_RTG extends GT_MetaTileEntity_BasicGenerator
this.mInventory[getStackDisplaySlot()] = null;
} else {
if (this.mInventory[getStackDisplaySlot()] == null)
- this.mInventory[getStackDisplaySlot()] = GregtechItemList.Pellet_RTG_AM241.get(1);
+ this.mInventory[getStackDisplaySlot()] = new ItemStack(Blocks.fire, 1);
this.mInventory[getStackDisplaySlot()].setStackDisplayName("Generating: "
+ (aBaseMetaTileEntity.getUniversalEnergyStored() - getMinimumStoredEU()) + " EU");
}
@@ -70,10 +71,7 @@ public class GregtechMetaTileEntity_RTG extends GT_MetaTileEntity_BasicGenerator
}
}
if ((tProducedEU > 0L) && (getPollution() > 0)) {
- GT_Pollution.addPollution(getBaseMetaTileEntity().getWorld(),
- new ChunkPosition(getBaseMetaTileEntity().getXCoord(), getBaseMetaTileEntity().getYCoord(),
- getBaseMetaTileEntity().getZCoord()),
- (int) (tProducedEU * getPollution() / 500 * this.mTier + 1L));
+ PollutionUtils.addPollution(aBaseMetaTileEntity, (int) (tProducedEU * getPollution() / 500 * this.mTier + 1L));
}
}
@@ -166,4 +164,15 @@ public class GregtechMetaTileEntity_RTG extends GT_MetaTileEntity_BasicGenerator
public int getPollution() {
return 0;
}
+
+ public int getFuelValue(ItemStack aStack) {
+ if ((GT_Utility.isStackInvalid(aStack)) || (getRecipes() == null))
+ return 0;
+ GT_Recipe tFuel = getRecipes().findRecipe(getBaseMetaTileEntity(), false, 9223372036854775807L, null,
+ new ItemStack[] { aStack });
+ if (tFuel != null)
+ //return (int) (tFuel.mSpecialValue * 365L * getEfficiency() / 100L);
+ return tFuel.mEUt;
+ return 0;
+ }
} \ No newline at end of file
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechRTG.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechRTG.java
index 53350a4621..f3e2a2c5f4 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechRTG.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechRTG.java
@@ -14,7 +14,7 @@ public class GregtechRTG {
}
private static void run1(){
- GregtechItemList.RTG.set(new GregtechMetaTileEntity_RTG(800, "rtg.01.tier.single", "Radioisotope Thermoelectric Generator", 0).getStackForm(1L));
+ GregtechItemList.RTG.set(new GregtechMetaTileEntity_RTG(800, "rtg.01.tier.single", "Radioisotope Thermoelectric Generator", 3).getStackForm(1L));
}
}