aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/xmod/gregtech
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
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')
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechItems.java47
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntity_RTG_Generator.java108
2 files changed, 152 insertions, 3 deletions
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechItems.java b/src/Java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechItems.java
index b6fdbb4272..c9d0230514 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechItems.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechItems.java
@@ -21,7 +21,9 @@ import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList;
import gtPlusPlus.xmod.gregtech.api.enums.GregtechOrePrefixes;
import gtPlusPlus.xmod.gregtech.api.enums.GregtechOrePrefixes.GT_Materials;
import gtPlusPlus.xmod.gregtech.api.items.Gregtech_MetaItem_X32;
+import gtPlusPlus.xmod.gregtech.common.tileentities.generators.GregtechMetaTileEntity_RTG_Generator;
import net.minecraft.item.EnumAction;
+import net.minecraft.item.ItemStack;
public class MetaGeneratedGregtechItems extends Gregtech_MetaItem_X32 {
public MetaGeneratedGregtechItems INSTANCE;
@@ -178,11 +180,50 @@ public class MetaGeneratedGregtechItems extends Gregtech_MetaItem_X32 {
GregtechItemList.Pellet_RTG_SR90.set(this.addItem(42, StringUtils.superscript("90")+"Sr Pellet", "", new Object[]{getTcAspectStack(TC_Aspects.RADIO, 4L), getTcAspectStack(TC_Aspects.POTENTIA, 2L), getTcAspectStack(TC_Aspects.METALLUM, 2L)}));
GregtechItemList.Pellet_RTG_PO210.set(this.addItem(43, StringUtils.superscript("210")+"Po Pellet", "", new Object[]{getTcAspectStack(TC_Aspects.RADIO, 4L), getTcAspectStack(TC_Aspects.POTENTIA, 2L), getTcAspectStack(TC_Aspects.METALLUM, 2L)}));
GregtechItemList.Pellet_RTG_AM241.set(this.addItem(44, StringUtils.superscript("241")+"Am Pellet", "", new Object[]{getTcAspectStack(TC_Aspects.RADIO, 4L), getTcAspectStack(TC_Aspects.POTENTIA, 2L), getTcAspectStack(TC_Aspects.METALLUM, 2L)}));
-
+ Recipe_GT.Gregtech_Recipe_Map.sRTGFuels.addRecipe(
+ true,
+ new ItemStack[]{GregtechItemList.Pellet_RTG_PU238.get(1)},
+ new ItemStack[]{},
+ null,
+ null,
+ null,
+ 0,
+ 0,
+ GregtechMetaTileEntity_RTG_Generator.convertDaysToTicks(87.7f));
+ Recipe_GT.Gregtech_Recipe_Map.sRTGFuels.addRecipe(
+ true,
+ new ItemStack[]{GregtechItemList.Pellet_RTG_SR90.get(1)},
+ new ItemStack[]{},
+ null,
+ null,
+ null,
+ 0,
+ 0,
+ GregtechMetaTileEntity_RTG_Generator.convertDaysToTicks(28.8f));
+ Recipe_GT.Gregtech_Recipe_Map.sRTGFuels.addRecipe(
+ true,
+ new ItemStack[]{GregtechItemList.Pellet_RTG_PO210.get(1)},
+ new ItemStack[]{},
+ null,
+ null,
+ null,
+ 0,
+ 0,
+ GregtechMetaTileEntity_RTG_Generator.convertDaysToTicks(0.4f));
+ Recipe_GT.Gregtech_Recipe_Map.sRTGFuels.addRecipe(
+ true,
+ new ItemStack[]{GregtechItemList.Pellet_RTG_AM241.get(1)},
+ new ItemStack[]{},
+ null,
+ null,
+ null,
+ 0,
+ 0,
+ GregtechMetaTileEntity_RTG_Generator.convertDaysToTicks(432));
//Computer Cube
GregtechItemList.Gregtech_Computer_Cube.set(this.addItem(tLastID = 55, "Gregtech Computer Cube", "Reusable", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 8L), getTcAspectStack(TC_Aspects.METALLUM, 8L), getTcAspectStack(TC_Aspects.POTENTIA, 8L)}));
this.setElectricStats(32000 + tLastID, Integer.MAX_VALUE, GT_Values.V[5], 5L, -3L, true);
-
+
//FOOOOOOOOOOOOOOD
GregtechItemList.Food_Baked_Raisin_Bread.set(this.addItem(tLastID = 60, "Raisin Bread", "Extra Raisins, Just for ImQ009", new Object[]{new GT_FoodStat(5, 0.5F, EnumAction.eat, null, false, true, false, new int[0]), getTcAspectStack(TC_Aspects.CORPUS, 1L), getTcAspectStack(TC_Aspects.FAMES, 1L), getTcAspectStack(TC_Aspects.IGNIS, 1L)}));
@@ -285,7 +326,7 @@ public class MetaGeneratedGregtechItems extends Gregtech_MetaItem_X32 {
GregtechItemList.Old_Circuit_Parts_Wiring_Elite.set(this.addItem(218, "Etched Extreme Voltage Wiring", "Part of Circuit Boards", new Object[0]));
GregtechItemList.Old_Empty_Board_Basic.set(this.addItem(219, "Empty Circuit Board", "A Board Part", new Object[0]));
GregtechItemList.Old_Empty_Board_Elite.set(this.addItem(220, "Empty Processor Board", "A Processor Board Part", new Object[0]));
-
+
return true;
}
}
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