aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities
diff options
context:
space:
mode:
authorAlkalus <draknyte1@hotmail.com>2017-08-05 17:08:38 +1000
committerAlkalus <draknyte1@hotmail.com>2017-08-05 17:08:38 +1000
commit85f53faa9201e468c58d3bf124f4c4dfbc36c2b7 (patch)
treeda9fba21edf4ddd8af88f99a18f7ae80c8499b0f /src/Java/gtPlusPlus/xmod/gregtech/common/tileentities
parent8aa1b1fdcdc906f607624c05f43367e9b5d23620 (diff)
downloadGT5-Unofficial-85f53faa9201e468c58d3bf124f4c4dfbc36c2b7.tar.gz
GT5-Unofficial-85f53faa9201e468c58d3bf124f4c4dfbc36c2b7.tar.bz2
GT5-Unofficial-85f53faa9201e468c58d3bf124f4c4dfbc36c2b7.zip
+ Added Custom RTG.
+ Added RTG fuel use recipes for RTG Pellets.
Diffstat (limited to 'src/Java/gtPlusPlus/xmod/gregtech/common/tileentities')
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntity_RTG_Generator.java108
1 files changed, 108 insertions, 0 deletions
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntity_RTG_Generator.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntity_RTG_Generator.java
new file mode 100644
index 0000000000..cf7ad2f8f3
--- /dev/null
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntity_RTG_Generator.java
@@ -0,0 +1,108 @@
+package gtPlusPlus.xmod.gregtech.common.tileentities.generators;
+
+import gregtech.api.enums.Textures;
+import gregtech.api.interfaces.ITexture;
+import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import gregtech.api.metatileentity.MetaTileEntity;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicGenerator;
+import gregtech.api.objects.GT_RenderedTexture;
+import gregtech.api.util.GT_Recipe;
+import gregtech.api.util.Recipe_GT;
+import gtPlusPlus.core.util.math.MathUtils;
+import net.minecraft.item.ItemStack;
+
+public class GregtechMetaTileEntity_RTG_Generator extends GT_MetaTileEntity_BasicGenerator {
+ public int mEfficiency;
+
+ //Generates fuel value based on MC days
+ public static int convertDaysToTicks(float days){
+ int value = 0;
+ value = MathUtils.roundToClosestInt(20*86400*days);
+ return value;
+ }
+
+
+ public GregtechMetaTileEntity_RTG_Generator(int aID, String aName, String aNameRegional, int aTier) {
+ super(aID, aName, aNameRegional, aTier, "Requires RTG Pellets", new ITexture[0]);
+ }
+
+ public GregtechMetaTileEntity_RTG_Generator(String aName, int aTier, String aDescription,
+ ITexture[][][] aTextures) {
+ super(aName, aTier, aDescription, aTextures);
+ }
+
+ public boolean isOutputFacing(byte aSide) {
+ return ((aSide > 1) && (aSide != getBaseMetaTileEntity().getFrontFacing())
+ && (aSide != getBaseMetaTileEntity().getBackFacing()));
+ }
+
+ public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
+ return new GregtechMetaTileEntity_RTG_Generator(this.mName, this.mTier, this.mDescription, this.mTextures);
+ }
+
+ public GT_Recipe.GT_Recipe_Map getRecipes() {
+ return Recipe_GT.Gregtech_Recipe_Map.sRTGFuels;
+ }
+
+ public int getCapacity() {
+ return 0;
+ }
+
+ public int getEfficiency() {
+ return this.mEfficiency = 100;
+ }
+
+ public ITexture[] getFront(byte aColor) {
+ return new ITexture[] { super.getFront(aColor)[0],
+ new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_FRONT) };
+ }
+
+ public ITexture[] getBack(byte aColor) {
+ return new ITexture[] { super.getBack(aColor)[0],
+ new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_BACK) };
+ }
+
+ public ITexture[] getBottom(byte aColor) {
+ return new ITexture[] { super.getBottom(aColor)[0],
+ new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_BOTTOM) };
+ }
+
+ public ITexture[] getTop(byte aColor) {
+ return new ITexture[] { super.getTop(aColor)[0],
+ new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_TOP) };
+ }
+
+ public ITexture[] getSides(byte aColor) {
+ return new ITexture[] { super.getSides(aColor)[0],
+ new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_SIDE) };
+ }
+
+ public ITexture[] getFrontActive(byte aColor) {
+ return new ITexture[] { super.getFrontActive(aColor)[0],
+ new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_FRONT_ACTIVE) };
+ }
+
+ public ITexture[] getBackActive(byte aColor) {
+ return new ITexture[] { super.getBackActive(aColor)[0],
+ new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_BACK_ACTIVE) };
+ }
+
+ public ITexture[] getBottomActive(byte aColor) {
+ return new ITexture[] { super.getBottomActive(aColor)[0],
+ new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_BOTTOM_ACTIVE) };
+ }
+
+ public ITexture[] getTopActive(byte aColor) {
+ return new ITexture[] { super.getTopActive(aColor)[0],
+ new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_TOP_ACTIVE) };
+ }
+
+ public ITexture[] getSidesActive(byte aColor) {
+ return new ITexture[] { super.getSidesActive(aColor)[0],
+ new GT_RenderedTexture(Textures.BlockIcons.NAQUADAH_REACTOR_SOLID_SIDE_ACTIVE) };
+ }
+
+ public int getPollution() {
+ return 0;
+ }
+} \ No newline at end of file