aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlkalus <3060479+draknyte1@users.noreply.github.com>2019-08-17 19:11:38 +0100
committerAlkalus <3060479+draknyte1@users.noreply.github.com>2019-08-17 19:11:38 +0100
commit828d9f0f8256f39d976f5ce6aedd6cb3b9cf560e (patch)
treedbee7e3d70a2dd8940341a4567a5bcf92d17a6ed
parent14a6ba866e1d2197d08b007011dc371f1b839552 (diff)
downloadGT5-Unofficial-828d9f0f8256f39d976f5ce6aedd6cb3b9cf560e.tar.gz
GT5-Unofficial-828d9f0f8256f39d976f5ce6aedd6cb3b9cf560e.tar.bz2
GT5-Unofficial-828d9f0f8256f39d976f5ce6aedd6cb3b9cf560e.zip
+ Added Air consumption to the LRE.
% Made the LRE longer. (10, up from 4) % Greatly improved NEI handling for decayables. $ Improved logic of LRE. $ Fixed NEI crash. $ Fixed bug in underlying GT code causing depleteInput to return false wrongly.
-rw-r--r--src/Java/gtPlusPlus/core/item/chemistry/RocketFuels.java177
-rw-r--r--src/Java/gtPlusPlus/nei/DecayableRecipeHandler.java151
-rw-r--r--src/Java/gtPlusPlus/nei/handlers/NeiTextureHandler.java85
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java72
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_Cyclotron.java1
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_LargeRocketEngine.java684
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechRocketFuelGenerator.java2
-rw-r--r--src/resources/assets/gregtech/lang/en_US.lang59
-rw-r--r--src/resources/assets/miscutils/lang/en_US.lang3
-rw-r--r--src/resources/assets/miscutils/textures/gui/nei/decayables.pngbin0 -> 2623 bytes
-rw-r--r--src/resources/assets/miscutils/textures/gui/nei/widgets.pngbin0 -> 1876 bytes
11 files changed, 852 insertions, 382 deletions
diff --git a/src/Java/gtPlusPlus/core/item/chemistry/RocketFuels.java b/src/Java/gtPlusPlus/core/item/chemistry/RocketFuels.java
index 7ade6d0371..c02e767dcd 100644
--- a/src/Java/gtPlusPlus/core/item/chemistry/RocketFuels.java
+++ b/src/Java/gtPlusPlus/core/item/chemistry/RocketFuels.java
@@ -25,7 +25,7 @@ import net.minecraftforge.fluids.FluidRegistry;
import net.minecraftforge.fluids.FluidStack;
public class RocketFuels extends ItemPackage {
-
+
public static HashSet<String> mValidRocketFuelNames = new HashSet<String>();
public static HashMap<Integer, Fluid> mValidRocketFuels = new HashMap<Integer, Fluid>();
@@ -52,16 +52,16 @@ public class RocketFuels extends ItemPackage {
public static Item Ammonium_Nitrate_Dust;
public static Item Formaldehyde_Catalyst;
-
+
public static void createKerosene(){
-
-
-
+
+
+
FluidStack fuelA = FluidUtils.getFluidStack("diesel", 300);
FluidStack fuelB = FluidUtils.getFluidStack("fuel", 300);
-
-
-
+
+
+
if (fuelA != null){
//GT_Values.RA.addDistilleryRecipe(23, fuelA, FluidUtils.getFluidStack(Kerosene, 50), 200, 64, false);
GT_Values.RA.addDistilleryRecipe(CI.getNumberedCircuit(23), fuelA, FluidUtils.getFluidStack(Kerosene, 100), 200, 64, false);
@@ -135,7 +135,11 @@ public class RocketFuels extends ItemPackage {
private static void createLOX() {
GT_Values.RA.addVacuumFreezerRecipe(ItemUtils.getItemStackOfAmountFromOreDict("cellOxygen", 1), ItemUtils.getItemStackOfAmountFromOreDict("cellLiquidOxygen", 1), 20*16);
CORE.RA.addAdvancedFreezerRecipe(new ItemStack[] {}, new FluidStack[] {FluidUtils.getFluidStack("oxygen", 3000)}, new FluidStack[] {FluidUtils.getFluidStack(Liquid_Oxygen, 3000)}, new ItemStack[] {}, new int[] {}, 20*16, 240, 0);
+ }
+ private static void createLOH() {
+ GT_Values.RA.addVacuumFreezerRecipe(ItemUtils.getItemStackOfAmountFromOreDict("cellHydrogen", 1), ItemUtils.getItemStackOfAmountFromOreDict("cellLiquidhydrogen", 1), 20*16);
+ CORE.RA.addAdvancedFreezerRecipe(new ItemStack[] {}, new FluidStack[] {FluidUtils.getFluidStack("hydrogen", 300)}, new FluidStack[] {FluidUtils.getFluidStack(Liquid_Hydrogen, 300)}, new ItemStack[] {}, new int[] {}, 20*4, 540, 0);
}
private static void createHydratedAmmoniumNitrateSlurry() {
@@ -214,7 +218,7 @@ public class RocketFuels extends ItemPackage {
0,
0,
256)); //Fuel Value
-
+
mRocketFuels.put(1, new Recipe_GT(
true,
new ItemStack[] {},
@@ -226,7 +230,7 @@ public class RocketFuels extends ItemPackage {
0,
0,
512)); //Fuel Value
-
+
mRocketFuels.put(2, new Recipe_GT(
true,
new ItemStack[] {},
@@ -238,7 +242,7 @@ public class RocketFuels extends ItemPackage {
0,
0,
768)); //Fuel Value
-
+
mRocketFuels.put(3, new Recipe_GT(
true,
new ItemStack[] {},
@@ -250,8 +254,8 @@ public class RocketFuels extends ItemPackage {
0,
0,
1024)); //Fuel Value
-
-
+
+
//Add in default Diesel for the Buggy
mValidRocketFuels.put(-1, Diesel);
@@ -349,7 +353,7 @@ public class RocketFuels extends ItemPackage {
20*48,
480);
}
-
+
GT_Values.RA.addCentrifugeRecipe(
CI.getNumberedCircuit(23),
@@ -430,6 +434,7 @@ public class RocketFuels extends ItemPackage {
if (!CORE.GTNH) {
createLOX();
}
+ createLOH();
createHydratedAmmoniumNitrateSlurry();
@@ -440,18 +445,18 @@ public class RocketFuels extends ItemPackage {
createRocketFuels();
addRocketFuelsToMap();
-
+
return true;
}
@Override
public boolean onLoadComplete(FMLLoadCompleteEvent event) {
-
+
if (MathUtils.randInt(1, 2) > 0) {
return false;
}
-
+
Materials aMaterial_Chloramine = MaterialUtils.getMaterial("Chloramine");
Materials aMaterial_Dimethylamine = MaterialUtils.getMaterial("Dimethylamine");
@@ -459,19 +464,19 @@ public class RocketFuels extends ItemPackage {
Materials aMaterial_NitrogenDioxide = MaterialUtils.getMaterial("NitrogenDioxide");
Materials aMaterial_DinitrogenTetroxide = MaterialUtils.getMaterial("DinitrogenTetroxide");
Materials aMaterial_Dimethylhydrazine = MaterialUtils.getMaterial("Dimethylhydrazine");
-
+
Materials aMaterial_Oxygen = Materials.Oxygen;
Materials aMaterial_Water = Materials.Water;
Materials aMaterial_HypochlorousAcid = MaterialUtils.getMaterial("HypochlorousAcid");
Materials aMaterial_Ammonia = MaterialUtils.getMaterial("Ammonia");
Materials aMaterial_Methanol = MaterialUtils.getMaterial("Methanol");
-
+
if (aMaterial_Chloramine == null || aMaterial_Dimethylamine == null || aMaterial_DilutedHydrochloricAcid == null
|| aMaterial_Dimethylhydrazine == null || aMaterial_NitrogenDioxide == null || aMaterial_DinitrogenTetroxide == null
|| aMaterial_HypochlorousAcid == null || aMaterial_Ammonia == null || aMaterial_Methanol == null) {
return false;
}
-
+
ItemStack aCellEmpty = CI.emptyCells(1);
ItemStack aCellWater = aMaterial_Water.getCells(1);
@@ -482,10 +487,10 @@ public class RocketFuels extends ItemPackage {
ItemStack aCellNitrogenDioxide = aMaterial_NitrogenDioxide.getCells(1);
ItemStack aCellDinitrogenTetroxide = aMaterial_DinitrogenTetroxide.getCells(1);
ItemStack aCellDimethylhydrazine = aMaterial_Dimethylhydrazine.getCells(1);
-
-
-
-
+
+
+
+
GT_Recipe aChemReactor_1 = new Recipe_GT(
@@ -511,10 +516,10 @@ public class RocketFuels extends ItemPackage {
0, //Dura
0, //Eu
0); //Special
-
-
-
-
+
+
+
+
GT_Recipe aChemReactor_Basic_1 = new Recipe_GT(
true, //Optimise
new ItemStack[] {}, //I
@@ -562,18 +567,18 @@ public class RocketFuels extends ItemPackage {
0, //Dura
0, //Eu
0); //Special
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
GT_Recipe aChemReactor_Adv_1 = new Recipe_GT(
true, //Optimise
@@ -599,26 +604,26 @@ public class RocketFuels extends ItemPackage {
0, //Eu
0); //Special
-
-
+
+
//RecipeUtils.removeGtRecipe(aChemReactor_Basic_1, GT_Recipe.GT_Recipe_Map.sChemicalRecipes);
//RecipeUtils.removeGtRecipe(aChemReactor_Basic_1, GT_Recipe.GT_Recipe_Map.sChemicalRecipes);
//RecipeUtils.removeGtRecipe(aChemReactor_Basic_1, GT_Recipe.GT_Recipe_Map.sChemicalRecipes);
//RecipeUtils.removeGtRecipe(aChemReactor_Basic_1, GT_Recipe.GT_Recipe_Map.sChemicalRecipes);
-
-
-
-
-
- /* GT_Values.RA.addChemicalRecipe( Materials.Chloramine.getCells(2), GT_Utility.getIntegratedCircuit(1), Materials.Dimethylamine.getGas(5000), Materials.Dimethylhydrazine.getFluid(6000), Materials.DilutedHydrochloricAcid.getCells(1), Materials.Empty.getCells(1), 960, 480);
+
+
+
+
+
+ /* GT_Values.RA.addChemicalRecipe( Materials.Chloramine.getCells(2), GT_Utility.getIntegratedCircuit(1), Materials.Dimethylamine.getGas(5000), Materials.Dimethylhydrazine.getFluid(6000), Materials.DilutedHydrochloricAcid.getCells(1), Materials.Empty.getCells(1), 960, 480);
GT_Values.RA.addChemicalRecipe( Materials.Dimethylamine.getCells(5), GT_Utility.getIntegratedCircuit(1), Materials.Chloramine.getFluid(2000), Materials.Dimethylhydrazine.getFluid(6000), Materials.DilutedHydrochloricAcid.getCells(1), Materials.Empty.getCells(4), 960, 480);
GT_Values.RA.addChemicalRecipeForBasicMachineOnly(Materials.Chloramine.getCells(2), Materials.Empty.getCells(4), Materials.Dimethylamine.getGas(5000), Materials.DilutedHydrochloricAcid.getFluid(1000), Materials.Dimethylhydrazine.getCells(6), GT_Values.NI, 960, 480);
GT_Values.RA.addChemicalRecipeForBasicMachineOnly(Materials.Dimethylamine.getCells(5), Materials.Empty.getCells(1), Materials.Chloramine.getFluid(2000), Materials.DilutedHydrochloricAcid.getFluid(1000), Materials.Dimethylhydrazine.getCells(6), GT_Values.NI, 960, 480);
GT_Values.RA.addChemicalRecipeForBasicMachineOnly(Materials.Dimethylamine.getCells(5), Materials.Chloramine.getCells(2), Materials.Chloramine.getFluid(2000), Materials.DilutedHydrochloricAcid.getFluid(1000), Materials.Dimethylhydrazine.getCells(6), Materials.DilutedHydrochloricAcid.getCells(1), 960, 480);
GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(24)}, new FluidStack[]{Materials.HypochlorousAcid.getFluid(3000), Materials.Ammonia.getGas(8000), Materials.Methanol.getFluid(12000)}, new FluidStack[]{Materials.Dimethylhydrazine.getFluid(12000), Materials.DilutedHydrochloricAcid.getFluid(2000), Materials.Water.getFluid(9000)}, null, 1040, 480);
-
+
GT_Values.RA.addChemicalRecipe(GT_Utility.getIntegratedCircuit(2), GT_Values.NI, Materials.NitrogenDioxide.getGas(1000), Materials.DinitrogenTetroxide.getGas(1000), GT_Values.NI, 640);
GT_Values.RA.addChemicalRecipe(Materials.NitrogenDioxide.getCells(1), GT_Utility.getIntegratedCircuit(2), GT_Values.NF, Materials.DinitrogenTetroxide.getGas(1000), Materials.Empty.getCells(1), 640);
GT_Values.RA.addChemicalRecipe(Materials.NitrogenDioxide.getCells(1), GT_Utility.getIntegratedCircuit(12), GT_Values.NF, GT_Values.NF, Materials.DinitrogenTetroxide.getCells(1), 640);
@@ -630,25 +635,25 @@ public class RocketFuels extends ItemPackage {
GT_Values.RA.addMixerRecipe(Materials.Dimethylhydrazine.getCells(2), GT_Values.NI, GT_Values.NI, GT_Values.NI, Materials.Oxygen.getGas(1000), new FluidStack(ItemList.sRocketFuel, 3000), Materials.Empty.getCells(2), 60, 16);
GT_Values.RA.addMixerRecipe(Materials.Oxygen.getCells(1), GT_Values.NI, GT_Values.NI, GT_Values.NI, Materials.Dimethylhydrazine.getFluid(2000), new FluidStack(ItemList.sRocketFuel, 3000), Materials.Empty.getCells(1), 60, 16);
-
- */
-
-
-
-
-
-
-
-
-
+
+ */
+
+
+
+
+
+
+
+
+
//Get Rocket Fuel
-
+
//Find recipes using default values
-
+
//Remove
-
+
//Rebake map
-
+
return true;
};
@@ -663,16 +668,16 @@ public class RocketFuels extends ItemPackage {
@Override
public void fluids() {
-
+
//Register default fluids
Diesel = MaterialUtils.getMaterial("Fuel", "Diesel").getFluid(1).getFluid();
Oil_Heavy = MaterialUtils.getMaterial("OilHeavy", "Oil").getFluid(1).getFluid();
-
-
+
+
//Create Kerosene
Kerosene = FluidUtils.generateFluidNonMolten("Kerosene", "Kerosene", 500, new short[]{150, 40, 150, 100}, null, null);
CoalTar.Coal_Oil = Kerosene;
-
+
//RP! Focket Fuel
RP1 = FluidUtils.generateFluidNonMolten("RP1Fuel", "RP-1 Rocket Fuel", 500, new short[]{210, 50, 50, 100}, null, null);
@@ -698,7 +703,7 @@ public class RocketFuels extends ItemPackage {
new BaseItemComponent("NitrousOxide", "Nitrous Oxide", new short[] {10, 10, 175});
}
}
-
+
//Unsymmetrical_Dimethylhydrazine
if (FluidUtils.getFluidStack("1,1dimethylhydrazine", 1) == null){
Unsymmetrical_Dimethylhydrazine = FluidUtils.generateFluidNonMolten("UnsymmetricalDimethylhydrazine", "Unsymmetrical Dimethylhydrazine", -57, new short[]{70, 210, 20, 100}, null, null);
@@ -728,31 +733,31 @@ public class RocketFuels extends ItemPackage {
new BaseItemComponent("LiquidOxygen", "Liquid Oxygen", new short[] {10, 10, 175});
}
}
-
+
//Create Liquid_Hydrogen
- if (FluidUtils.getFluidStack("LiquidHydrogen", 1) == null && FluidUtils.getFluidStack("liquidhydrogen", 1) == null){
- Liquid_Hydrogen = FluidUtils.generateFluidNonMolten("LiquidHydrogen", "Liquid Hydrogen", -240, new short[]{75, 75, 220, 100}, null, null);
- }
- else {
- if (FluidUtils.getFluidStack("LiquidHydrogen", 1) != null ) {
- Liquid_Hydrogen = FluidUtils.getFluidStack("LiquidHydrogen", 1).getFluid();
- }
- else {
- Liquid_Hydrogen = FluidUtils.getFluidStack("liquidhydrogen", 1).getFluid();
- }
- if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("cellLiquidHydrogen", 1) == null){
- new BaseItemComponent("LiquidHydrogen", "Liquid Hydrogen", new short[] {10, 10, 175});
- }
- }
+ if (FluidUtils.getFluidStack("LiquidHydrogen", 1) == null && FluidUtils.getFluidStack("liquidhydrogen", 1) == null){
+ Liquid_Hydrogen = FluidUtils.generateFluidNonMolten("LiquidHydrogen", "Liquid Hydrogen", -240, new short[]{75, 75, 220, 100}, null, null);
+ }
+ else {
+ if (FluidUtils.getFluidStack("LiquidHydrogen", 1) != null ) {
+ Liquid_Hydrogen = FluidUtils.getFluidStack("LiquidHydrogen", 1).getFluid();
+ }
+ else {
+ Liquid_Hydrogen = FluidUtils.getFluidStack("liquidhydrogen", 1).getFluid();
+ }
+ if (ItemUtils.getItemStackOfAmountFromOreDictNoBroken("cellLiquidHydrogen", 1) == null){
+ new BaseItemComponent("LiquidHydrogen", "Liquid Hydrogen", new short[] {10, 10, 175});
+ }
+ }
Formaldehyde = FluidUtils.generateFluidNonMolten("Formaldehyde", "Formaldehyde", -92, new short[]{150, 75, 150, 100}, null, null);
-
+
Unsymmetrical_Dimethylhydrazine_Plus_Nitrogen_Tetroxide = FluidUtils.generateFluidNonMolten("RocketFuelMixA", "H8N4C2O4 Rocket Fuel", -185, new short[]{50, 220, 50, 100}, null, null);
RP1_Plus_Liquid_Oxygen = FluidUtils.generateFluidNonMolten("RocketFuelMixB", "Rp-1 Fuel Mixture", -250, new short[]{250, 50, 50, 100}, null, null);
Monomethylhydrazine_Plus_Nitric_Acid = FluidUtils.generateFluidNonMolten("RocketFuelMixC", "CN3H7O3 Rocket Fuel", -300, new short[]{125, 75, 180, 100}, null, null);
Dense_Hydrazine_Mix = FluidUtils.generateFluidNonMolten("RocketFuelMixD", "Dense Hydrazine Fuel Mixture", -250, new short[]{175, 80, 120, 100}, null, null);
-
+
}
diff --git a/src/Java/gtPlusPlus/nei/DecayableRecipeHandler.java b/src/Java/gtPlusPlus/nei/DecayableRecipeHandler.java
index 6b7f24ed37..5144a56663 100644
--- a/src/Java/gtPlusPlus/nei/DecayableRecipeHandler.java
+++ b/src/Java/gtPlusPlus/nei/DecayableRecipeHandler.java
@@ -1,27 +1,33 @@
package gtPlusPlus.nei;
import java.awt.Rectangle;
-import java.util.Collection;
import java.util.List;
+import codechicken.lib.gui.GuiDraw;
import codechicken.nei.PositionedStack;
import codechicken.nei.recipe.TemplateRecipeHandler;
-import crazypants.enderio.gui.IconEIO;
import crazypants.enderio.machine.enchanter.GuiEnchanter;
+import gregtech.api.util.GT_Utility;
+import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.handler.Recipes.DecayableRecipe;
import gtPlusPlus.core.item.materials.DustDecayable;
+import gtPlusPlus.core.lib.CORE;
+import gtPlusPlus.core.lib.VanillaColours;
+import gtPlusPlus.core.util.minecraft.ItemUtils;
+import gtPlusPlus.nei.handlers.NeiTextureHandler;
import net.minecraft.client.gui.inventory.GuiContainer;
+import net.minecraft.client.resources.I18n;
import net.minecraft.item.ItemStack;
import net.minecraft.util.StatCollector;
public class DecayableRecipeHandler extends TemplateRecipeHandler {
public String getRecipeName() {
- return StatCollector.translateToLocal("gtpp.nei.decayables");
+ return StatCollector.translateToLocal("GTPP.container.decaychest.name");
}
public String getGuiTexture() {
- return "enderio:textures/gui/enchanter.png";
+ return CORE.MODID+":textures/gui/nei/decayables.png";
}
public Class<? extends GuiContainer> getGuiClass() {
@@ -31,20 +37,31 @@ public class DecayableRecipeHandler extends TemplateRecipeHandler {
public String getOverlayIdentifier() {
return "GTPP_Decayables";
}
+
+ public int recipiesPerPage() {
+ return 1;
+ }
public void loadTransferRects() {
- this.transferRects.add(new RecipeTransferRect(new Rectangle(149, -3, 16, 16), "GTPP_Decayables", new Object[0]));
+ this.transferRects.add(new RecipeTransferRect(new Rectangle(6, 3, 16, 16), "GTPP_Decayables", new Object[0]));
}
public void loadCraftingRecipes(ItemStack result) {
if (result == null || !DustDecayable.class.isInstance(result.getItem())) {
return;
}
+ if (result != null) {
+ Logger.INFO("Looking up crafting recipes for "+ItemUtils.getItemName(result));
+ }
final List<DecayableRecipe> recipes = DecayableRecipe.mRecipes;
for (final DecayableRecipe recipe : recipes) {
if (recipe.isValid()) {
final ItemStack input = recipe.mInput.copy();
final ItemStack output = recipe.mOutput.copy();
+ if (!GT_Utility.areStacksEqual(result, output, true)) {
+ continue;
+ }
+ Logger.INFO("Showing Usage result for "+ItemUtils.getItemName(result));
final DecayableRecipeNEI rec = new DecayableRecipeNEI(input, output, recipe.mTime);
this.arecipes.add(rec);
}
@@ -70,35 +87,128 @@ public class DecayableRecipeHandler extends TemplateRecipeHandler {
public void loadUsageRecipes(ItemStack ingredient) {
final List<DecayableRecipe> recipes = DecayableRecipe.mRecipes;
+ if (ingredient != null) {
+ Logger.INFO("Looking up Usage results for "+ItemUtils.getItemName(ingredient));
+ }
for (final DecayableRecipe recipe : recipes) {
if (recipe.isValid()) {
final ItemStack input = recipe.mInput.copy();
final ItemStack output = recipe.mOutput.copy();
- final DecayableRecipeNEI rec = new DecayableRecipeNEI(input, output, recipe.mTime);
- if (!rec.contains((Collection)rec.input, ingredient)) {
+ if (!GT_Utility.areStacksEqual(ingredient, input, true)) {
continue;
- }
- rec.setIngredientPermutation((Collection) rec.input, ingredient);
+ }
+ Logger.INFO("Showing up Usage results for "+ItemUtils.getItemName(ingredient));
+ final DecayableRecipeNEI rec = new DecayableRecipeNEI(input, output, recipe.mTime);
+ //rec.setIngredientPermutation((Collection) rec.input, ingredient);
this.arecipes.add(rec);
}
}}
public void drawExtras(int recipeIndex) {
DecayableRecipeNEI recipe = (DecayableRecipeNEI) this.arecipes.get(recipeIndex);
- //GuiDraw.drawStringC(recipe.getEnchantName(), 83, 10, 8421504, false);
- /*
- * int cost = TileEnchanter.getEnchantmentCost(recipe.recipe, 1); if (cost > 0)
- * { String s = I18n.format("container.repair.cost", new Object[]{cost});
- * GuiDraw.drawStringC(s, 83, 46, 8453920); }
- */
-
- IconEIO.RECIPE_BUTTON.renderIcon(149.0D, -3.0D, 16.0D, 16.0D, 0.0D, true);
+
+ //GuiDraw.drawStringC(I18n.format("GTPP.container.decaychest.result", new Object[]{}), 43, 10, 8421504, false);
+
+ int cost = recipe.time;
+ if (cost > 0){
+
+ // NEI Strings
+ String s = I18n.format("GTPP.nei.info", new Object[]{cost});
+ String s0 = I18n.format("GTPP.nei.timetaken", new Object[]{cost});
+
+ // Time Strings
+ String s1 = I18n.format("GTPP.time.ticks", new Object[]{cost});
+ String s2 = I18n.format("GTPP.time.seconds", new Object[]{cost});
+ String s3 = I18n.format("GTPP.time.minutes", new Object[]{cost});
+ String s4 = I18n.format("GTPP.time.hours", new Object[]{cost});
+ String s5 = I18n.format("GTPP.time.days", new Object[]{cost});
+ String s6 = I18n.format("GTPP.time.months", new Object[]{cost});
+ int y = 20;
+
+ int secs = cost / 20;
+ int mins = secs / 60;
+ int hours = mins / 60;
+ int days = hours / 24;
+ int months = days / 30;
+
+
+ String suffix;
+ int formattedTime;
+ if (cost <= 20) {
+ suffix = s1;
+ formattedTime = cost;
+ }
+ else if (cost <= (20 * 60)) {
+ suffix = s2;
+ formattedTime = secs;
+ }
+ else if (cost <= (20 * 60 * 60)) {
+ suffix = s3;
+ formattedTime = mins;
+ }
+ else if (cost <= (20 * 60 * 60 * 24)) {
+ suffix = s4;
+ formattedTime = hours;
+ }
+ else if (cost < (20 * 60 * 60 * 24 * 30)) {
+ suffix = s5;
+ formattedTime = days;
+ }
+ else if (cost <= (20 * 60 * 60 * 24 * 30)) {
+ suffix = s6;
+ formattedTime = months;
+ }
+ else {
+ suffix = s1;
+ formattedTime = cost;
+ }
+
+
+
+ int x = 5;
+ GuiDraw.drawString(s, x, 25, VanillaColours.DYE_BLACK.getAsInt(), false);
+ GuiDraw.drawString(s0, x, 40, VanillaColours.DYE_BLACK.getAsInt(), false);
+
+
+
+
+
+ GuiDraw.drawString(suffix, x + 16, y+30, VanillaColours.DYE_BLACK.getAsInt(), false);
+
+ //Values
+ GuiDraw.drawString((""+formattedTime), x, y+30, VanillaColours.DYE_GREEN.getAsInt(), false);
+
+
+ if (hours > 1) {
+ int aLeftoverMinutes = (cost - (hours * (20 * 60 * 60)));
+ if (aLeftoverMinutes > 0) {
+ int secs2 = aLeftoverMinutes / 20;
+ int mins2 = secs2 / 60;
+ GuiDraw.drawString(s3, x + 16, y+42, VanillaColours.DYE_BLACK.getAsInt(), false);
+ GuiDraw.drawString((""+mins2), x, y+42, VanillaColours.DYE_GREEN.getAsInt(), false);
+
+ }
+
+ }
+
+
+
+
+ }
+
+ NeiTextureHandler.RECIPE_BUTTON.renderIcon(6.0D, 3.0D, 16.0D, 16.0D, 0.0D, true);
}
public class DecayableRecipeNEI extends TemplateRecipeHandler.CachedRecipe
{
private PositionedStack input;
- private PositionedStack output;
+ private PositionedStack output;
+ public int time;
+
+ @Override
+ public PositionedStack getIngredient() {
+ return this.input;
+ }
public PositionedStack getResult() {
return this.output;
@@ -106,8 +216,9 @@ public class DecayableRecipeHandler extends TemplateRecipeHandler {
public DecayableRecipeNEI(final ItemStack input, final ItemStack result, final int time) {
super();
- this.input = new PositionedStack(input, 22, 24);
- this.output = new PositionedStack(result, 129, 24);
+ this.input = new PositionedStack(input, 93, 24);
+ this.output = new PositionedStack(result, 142, 42);
+ this.time = time;
}
}
} \ No newline at end of file
diff --git a/src/Java/gtPlusPlus/nei/handlers/NeiTextureHandler.java b/src/Java/gtPlusPlus/nei/handlers/NeiTextureHandler.java
new file mode 100644
index 0000000000..f433def57d
--- /dev/null
+++ b/src/Java/gtPlusPlus/nei/handlers/NeiTextureHandler.java
@@ -0,0 +1,85 @@
+package gtPlusPlus.nei.handlers;
+
+import crazypants.render.RenderUtil;
+import gtPlusPlus.core.lib.CORE;
+import net.minecraft.client.renderer.Tessellator;
+import net.minecraft.util.ResourceLocation;
+import org.lwjgl.opengl.GL11;
+
+/**
+ * Based on crazypants.enderio.gui.IconEIO
+ * @author Original EIO Author
+ *
+ */
+public final class NeiTextureHandler {
+
+ public static final NeiTextureHandler RECIPE = new NeiTextureHandler(16, 132, 16, 16);
+ public static final NeiTextureHandler RECIPE_BUTTON = new NeiTextureHandler(128, 116, 24, 24);
+
+ public final double minU;
+ public final double maxU;
+ public final double minV;
+ public final double maxV;
+ public final double width;
+ public final double height;
+
+ public static final ResourceLocation TEXTURE = new ResourceLocation(CORE.MODID+":textures/gui/nei/widgets.png");
+
+ public NeiTextureHandler(int x, int y) {
+ this(x, y, 16, 16);
+ }
+
+ public NeiTextureHandler(int x, int y, int width, int height) {
+ this((double) width, (double) height, (double) ((float) (0.00390625D * (double) x)),
+ (double) ((float) (0.00390625D * (double) (x + width))), (double) ((float) (0.00390625D * (double) y)),
+ (double) ((float) (0.00390625D * (double) (y + height))));
+ }
+
+ public NeiTextureHandler(double width, double height, double minU, double maxU, double minV, double maxV) {
+ this.width = width;
+ this.height = height;
+ this.minU = minU;
+ this.maxU = maxU;
+ this.minV = minV;
+ this.maxV = maxV;
+ }
+
+ public void renderIcon(double x, double y) {
+ this.renderIcon(x, y, this.width, this.height, 0.0D, false);
+ }
+
+ public void renderIcon(double x, double y, boolean doDraw) {
+ this.renderIcon(x, y, this.width, this.height, 0.0D, doDraw);
+ }
+
+ public void renderIcon(double x, double y, double width, double height, double zLevel, boolean doDraw) {
+ this.renderIcon(x, y, width, height, zLevel, doDraw, false);
+ }
+
+ public void renderIcon(double x, double y, double width, double height, double zLevel, boolean doDraw,
+ boolean flipY) {
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
+ Tessellator tessellator = Tessellator.instance;
+ if (doDraw) {
+ RenderUtil.bindTexture(TEXTURE);
+ tessellator.startDrawingQuads();
+ }
+
+ if (flipY) {
+ tessellator.addVertexWithUV(x, y + height, zLevel, this.minU, this.minV);
+ tessellator.addVertexWithUV(x + width, y + height, zLevel, this.maxU, this.minV);
+ tessellator.addVertexWithUV(x + width, y + 0.0D, zLevel, this.maxU, this.maxV);
+ tessellator.addVertexWithUV(x, y + 0.0D, zLevel, this.minU, this.maxV);
+ } else {
+ tessellator.addVertexWithUV(x, y + height, zLevel, this.minU, this.maxV);
+ tessellator.addVertexWithUV(x + width, y + height, zLevel, this.maxU, this.maxV);
+ tessellator.addVertexWithUV(x + width, y + 0.0D, zLevel, this.maxU, this.minV);
+ tessellator.addVertexWithUV(x, y + 0.0D, zLevel, this.minU, this.minV);
+ }
+
+ if (doDraw) {
+ tessellator.draw();
+ }
+
+ }
+} \ No newline at end of file
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java
index 31909b4018..cb091264dd 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java
@@ -53,6 +53,7 @@ import gtPlusPlus.core.util.reflect.ReflectionUtils;
import gtPlusPlus.xmod.gregtech.api.gui.CONTAINER_MultiMachine;
import gtPlusPlus.xmod.gregtech.api.gui.GUI_MultiMachine;
import gtPlusPlus.xmod.gregtech.api.gui.GUI_Multi_Basic_Slotted;
+import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_AirIntake;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_ControlCore;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_InputBattery;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_OutputBattery;
@@ -98,6 +99,7 @@ GT_MetaTileEntity_MultiBlockBase {
//Control Core Hatch
public ArrayList<GT_MetaTileEntity_Hatch_ControlCore> mControlCoreBus = new ArrayList<GT_MetaTileEntity_Hatch_ControlCore>();
+ public ArrayList<GT_MetaTileEntity_Hatch_AirIntake> mAirIntakes = new ArrayList<GT_MetaTileEntity_Hatch_AirIntake>();
public ArrayList<GT_MetaTileEntity_Hatch_InputBattery> mChargeHatches = new ArrayList<GT_MetaTileEntity_Hatch_InputBattery>();
public ArrayList<GT_MetaTileEntity_Hatch_OutputBattery> mDischargeHatches = new ArrayList<GT_MetaTileEntity_Hatch_OutputBattery>();
@@ -835,7 +837,7 @@ GT_MetaTileEntity_MultiBlockBase {
log("GOOD RETURN - 1");
return true;
-}
+ }
@@ -932,10 +934,10 @@ GT_MetaTileEntity_MultiBlockBase {
ItemStack[] aItemInputs, FluidStack[] aFluidInputs,
int aMaxParallelRecipes, int aEUPercent,
int aSpeedBonusPercent, int aOutputChanceRoll, GT_Recipe aRecipe) {
-
+
long tVoltage = getMaxInputVoltage();
byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage));
-
+
log("Running checkRecipeGeneric(0)");
GT_Recipe tRecipe = aRecipe != null ? aRecipe : findRecipe(
@@ -943,12 +945,12 @@ GT_MetaTileEntity_MultiBlockBase {
gregtech.api.enums.GT_Values.V[tTier], aFluidInputs, aItemInputs);
log("Running checkRecipeGeneric(1)");
-
+
//First we check whether or not we have an input cached for boosting.
//If not, we set it to the current recipe.
//If we do, we compare it against the current recipe, if thy are the same, we try return a boosted recipe, if not, we boost a new recipe.
boolean isRecipeInputTheSame = false;
-
+
//No cached recipe inputs, assume first run.
if (mInputVerificationForBoosting == null) {
mInputVerificationForBoosting = tRecipe.mInputs;
@@ -963,7 +965,7 @@ GT_MetaTileEntity_MultiBlockBase {
isRecipeInputTheSame = false;
}
}
-
+
//Inputs are the same, let's see if there's a boosted version.
if (isRecipeInputTheSame) {
//Yes, let's just set that as the recipe
@@ -999,14 +1001,14 @@ GT_MetaTileEntity_MultiBlockBase {
mHasBoostedCurrentRecipe = false;
}
}
-
+
//Bad modify, let's just use the original recipe.
if (!mHasBoostedCurrentRecipe || mBoostedRecipe == null) {
tRecipe = aRecipe != null ? aRecipe : findRecipe(
getBaseMetaTileEntity(), mLastRecipe, false,
gregtech.api.enums.GT_Values.V[tTier], aFluidInputs, aItemInputs);
}
-
+
// Remember last recipe - an optimization for findRecipe()
this.mLastRecipe = tRecipe;
@@ -1188,6 +1190,7 @@ GT_MetaTileEntity_MultiBlockBase {
this.mChargeHatches.clear();
this.mDischargeHatches.clear();
this.mControlCoreBus.clear();
+ this.mAirIntakes.clear();
this.mMultiDynamoHatches.clear();
}
}
@@ -1252,7 +1255,7 @@ GT_MetaTileEntity_MultiBlockBase {
ItemStack guiSlot = this.mInventory[1];
return guiSlot;
}
-
+
protected boolean setGUIItemStack(ItemStack aNewGuiSlotContents) {
boolean result = false;
if (this.mInventory[1] == null) {
@@ -1263,11 +1266,11 @@ GT_MetaTileEntity_MultiBlockBase {
}
return result;
}
-
+
protected boolean clearGUIItemSlot() {
return setGUIItemStack(null);
}
-
+
public ItemStack findItemInInventory(Item aSearchStack) {
return findItemInInventory(aSearchStack, 0);
@@ -1276,7 +1279,7 @@ GT_MetaTileEntity_MultiBlockBase {
public ItemStack findItemInInventory(Item aSearchStack, int aMeta) {
return findItemInInventory(ItemUtils.simpleMetaStack(aSearchStack, aMeta, 1));
}
-
+
public ItemStack findItemInInventory(ItemStack aSearchStack) {
if (aSearchStack != null && this.mInputBusses.size() > 0) {
for (GT_MetaTileEntity_Hatch_InputBus bus : this.mInputBusses) {
@@ -1365,14 +1368,14 @@ GT_MetaTileEntity_MultiBlockBase {
if (aTileEntity == null) {
return false;
}
-
+
//Check type
/*
* Class <?> aHatchType = ReflectionUtils.getTypeOfGenericObject(aList); if
* (!aHatchType.isInstance(aTileEntity)) { return false; }
*/
-
-
+
+
if (aList.isEmpty()) {
if (aTileEntity instanceof GT_MetaTileEntity_Hatch) {
if (GTplusplus.CURRENT_LOAD_PHASE == INIT_PHASE.STARTED) {
@@ -1546,6 +1549,20 @@ GT_MetaTileEntity_MultiBlockBase {
return addToMachineList(aTileEntity, aBaseCasingIndex);
}
+ public boolean addAirIntakeToMachineList(final IGregTechTileEntity aTileEntity, final int aBaseCasingIndex) {
+ if (aTileEntity == null) {
+ return false;
+ }
+ final IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
+ if (aMetaTileEntity == null) {
+ return false;
+ }
+ if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_AirIntake) {
+ this.mAirIntakes.add((GT_MetaTileEntity_Hatch_AirIntake)aMetaTileEntity);
+ }
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
+ }
+
public boolean addFluidInputToMachineList(final IGregTechTileEntity aTileEntity, final int aBaseCasingIndex) {
if (aTileEntity == null) {
return false;
@@ -2103,6 +2120,31 @@ GT_MetaTileEntity_MultiBlockBase {
log("A3");
return false;
}
+
+ @Override
+ public boolean depleteInput(final FluidStack aLiquid) {
+ if (aLiquid == null) {
+ return false;
+ }
+ for (final GT_MetaTileEntity_Hatch_Input tHatch : this.mInputHatches) {
+ tHatch.mRecipeMap = this.getRecipeMap();
+ if (isValidMetaTileEntity(tHatch)) {
+ FluidStack tLiquid = tHatch.getFluid();
+ if (tLiquid == null || !tLiquid.isFluidEqual(aLiquid) || tLiquid.amount < aLiquid.amount) {
+ continue;
+ }
+ tLiquid = tHatch.drain(aLiquid.amount, false);
+ if (tLiquid != null && tLiquid.amount >= aLiquid.amount) {
+ tLiquid = tHatch.drain(aLiquid.amount, true);
+ return tLiquid != null && tLiquid.amount >= aLiquid.amount;
+ }
+ continue;
+ }
+ }
+ return false;
+ }
+
+
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_Cyclotron.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_Cyclotron.java
index de5d731dd5..2c3bf29119 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_Cyclotron.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_Cyclotron.java
@@ -432,6 +432,7 @@ public class GregtechMetaTileEntity_Cyclotron extends GregtechMeta_MultiBlockBas
mChargeHatches.clear();
mDischargeHatches.clear();
mControlCoreBus.clear();
+ mAirIntakes.clear();
mMultiDynamoHatches.clear();
mMachine = aFormCheck;
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_LargeRocketEngine.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_LargeRocketEngine.java
index ab5cbd84d2..9b6da487e8 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_LargeRocketEngine.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_LargeRocketEngine.java
@@ -5,23 +5,29 @@ import java.util.Collection;
import gregtech.api.GregTech_API;
import gregtech.api.enums.GT_Values;
+import gregtech.api.enums.Materials;
import gregtech.api.enums.TAE;
import gregtech.api.enums.Textures;
import gregtech.api.gui.GT_GUIContainer_MultiMachine;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Dynamo;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Muffler;
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 gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.block.ModBlocks;
import gtPlusPlus.core.item.chemistry.RocketFuels;
import gtPlusPlus.core.material.MISC_MATERIALS;
import gtPlusPlus.core.util.minecraft.FluidUtils;
+import gtPlusPlus.core.util.minecraft.ItemUtils;
+import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_AirIntake;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase;
+import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
import net.minecraft.block.Block;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.item.ItemStack;
@@ -30,264 +36,448 @@ import net.minecraftforge.fluids.FluidStack;
public class GregtechMetaTileEntity_LargeRocketEngine extends GregtechMeta_MultiBlockBase
{
- protected int fuelConsumption;
- protected int fuelValue;
- protected int fuelRemaining;
- protected boolean boostEu;
+ protected int fuelConsumption;
+ protected int fuelValue;
+ protected int fuelRemaining;
+ protected int freeFuelTicks = 0;
+ protected boolean boostEu;
public static String mLubricantName = "Carbon Dioxide";
public static String mCoolantName = "Liquid Hydrogen";
-
+
public static String mCasingName = "Turbodyne Casing";
public static String mIntakeHatchName = "Tungstensteel Turbine Casing";
public static String mGearboxName = "Inconel Reinforced Casing";
-
- private final static int CASING_ID = TAE.getIndexFromPage(3, 11);
-
- public GregtechMetaTileEntity_LargeRocketEngine(final int aID, final String aName, final String aNameRegional) {
- super(aID, aName, aNameRegional);
- this.fuelConsumption = 0;
- this.fuelValue = 0;
- this.fuelRemaining = 0;
- this.boostEu = false;
- }
-
- public GregtechMetaTileEntity_LargeRocketEngine(final String aName) {
- super(aName);
- this.fuelConsumption = 0;
- this.fuelValue = 0;
- this.fuelRemaining = 0;
- this.boostEu = false;
- }
-
- @Override
- public String[] getTooltip() {
- return new String[] {
- "Controller Block for the Large Combustion Engine",
- "Supply Rocket Fuels and 1000L of "+mLubricantName+" per hour to run.",
- "Supply 40L of "+mCoolantName+" per second to boost output (optional).",
- "Default: Produces "+GT_Values.V[5]+"EU/t at 100% efficiency",
- "Boosted: Produces "+(GT_Values.V[5]*3)+"EU/t at 150% efficiency",
- "Size(WxHxD): 3x3x4, Controller (front centered)",
- "3x3x4 of Stable "+mCasingName+" (hollow, Min 16!)",
- "2x "+mGearboxName+" inside the Hollow Casing",
- "8x "+mIntakeHatchName+" (around controller)",
- ""+mIntakeHatchName+" must not be obstructed in front (only air blocks)",
- "2x Input Hatch (Fuel/Lubricant) (one of the Casings next to a Gear Box)",
- "1x Maintenance Hatch (one of the Casings next to a Gear Box)",
- "1x Muffler Hatch (top middle back, next to the rear Gear Box)",
- "1x Dynamo Hatch (back centered)",
- };
- }
-
- @Override
- public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) {
- if (aSide == aFacing) {
- return new ITexture[] { Textures.BlockIcons.CASING_BLOCKS[CASING_ID], new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_DIESEL_ENGINE_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_DIESEL_ENGINE) };
- }
- return new ITexture[] { Textures.BlockIcons.CASING_BLOCKS[CASING_ID] };
- }
-
- @Override
- public boolean isCorrectMachinePart(final ItemStack aStack) {
- return this.getMaxEfficiency(aStack) > 0;
- }
-
- @Override
- public Object getClientGUI(final int aID, final InventoryPlayer aPlayerInventory, final IGregTechTileEntity aBaseMetaTileEntity) {
- return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, this.getLocalName(), "LargeDieselEngine.png");
- }
-
- @Override
- public boolean checkRecipe(final ItemStack aStack) {
- final ArrayList<FluidStack> tFluids = this.getStoredFluids();
- final Collection<GT_Recipe> tRecipeList = Recipe_GT.Gregtech_Recipe_Map.sRocketFuels.mRecipeList;
- if (tFluids.size() > 0 && tRecipeList != null) {
- for (final FluidStack hatchFluid1 : tFluids) {
- for (final GT_Recipe aFuel : tRecipeList) {
- final FluidStack tLiquid;
- if ((tLiquid = GT_Utility.getFluidForFilledItem(aFuel.getRepresentativeInput(0), true)) != null && hatchFluid1.isFluidEqual(tLiquid)) {
- final FluidStack fluidStack = tLiquid;
- final int n = (int) (this.boostEu ? ((GT_Values.V[5]*2) / aFuel.mSpecialValue) : (GT_Values.V[5] / aFuel.mSpecialValue));
- fluidStack.amount = n;
- this.fuelConsumption = n;
- if (!this.depleteInput(tLiquid)) {
- continue;
- }
- this.boostEu = this.depleteInput(FluidUtils.getFluidStack(RocketFuels.Liquid_Hydrogen, 2));
- if (tFluids.contains(MISC_MATERIALS.CARBON_DIOXIDE.getFluid(this.boostEu ? 2 : 1))) {
- if (this.mRuntime % 72 == 0 || this.mRuntime == 0) {
- this.depleteInput(MISC_MATERIALS.CARBON_DIOXIDE.getFluid(this.boostEu ? 2 : 1));
- }
- this.fuelValue = aFuel.mSpecialValue;
- this.fuelRemaining = hatchFluid1.amount;
- this.mEUt = (int) ((this.mEfficiency < 2000) ? 0 : GT_Values.V[5]);
- this.mProgresstime = 1;
- this.mMaxProgresstime = 1;
- this.mEfficiencyIncrease = 5;
- return true;
- }
- return false;
- }
- }
- }
- }
- this.mEUt = 0;
- this.mEfficiency = 0;
- return false;
- }
-
- @Override
- public boolean checkMultiblock(final IGregTechTileEntity aBaseMetaTileEntity, final ItemStack aStack) {
- byte tSide = getBaseMetaTileEntity().getBackFacing();
- int tX = getBaseMetaTileEntity().getXCoord();
- int tY = getBaseMetaTileEntity().getYCoord();
- int tZ = getBaseMetaTileEntity().getZCoord();
-
- if(getBaseMetaTileEntity().getBlockAtSideAndDistance(tSide, 1) != getGearboxBlock() && getBaseMetaTileEntity().getBlockAtSideAndDistance(tSide, 2) != getGearboxBlock()) {
- return false;
- }
- if(getBaseMetaTileEntity().getMetaIDAtSideAndDistance(tSide, 1) != getGearboxMeta() && getBaseMetaTileEntity().getMetaIDAtSideAndDistance(tSide, 2) != getGearboxMeta()) {
- return false;
- }
- for (byte i = -1; i < 2; i = (byte) (i + 1)) {
- for (byte j = -1; j < 2; j = (byte) (j + 1)) {
- if ((i != 0) || (j != 0)) {
- for (byte k = 0; k < 4; k = (byte) (k + 1)) {
-
- final int fX = tX - (tSide == 5 ? 1 : tSide == 4 ? -1 : i),
- fZ = tZ - (tSide == 2 ? -1 : tSide == 3 ? 1 : i),
- aY = tY + j,
- aX = tX + (tSide == 5 ? k : tSide == 4 ? -k : i),
- aZ = tZ + (tSide == 2 ? -k : tSide == 3 ? k : i);
-
- final Block frontAir = getBaseMetaTileEntity().getBlock(fX, aY, fZ);
- final String frontAirName = frontAir.getUnlocalizedName();
- if(!(getBaseMetaTileEntity().getAir(fX, aY, fZ) || frontAirName.equalsIgnoreCase("tile.air") || frontAirName.equalsIgnoreCase("tile.railcraft.residual.heat"))) {
- return false; //Fail if vent blocks are obstructed
- }
-
- if (((i == 0) || (j == 0)) && ((k == 1) || (k == 2))) {
- if (getBaseMetaTileEntity().getBlock(aX, aY, aZ) == getCasingBlock() && getBaseMetaTileEntity().getMetaID(aX, aY, aZ) == getCasingMeta()) {
- // Do nothing
- } else if (!addMufflerToMachineList(getBaseMetaTileEntity().getIGregTechTileEntity(tX + (tSide == 5 ? 2 : tSide == 4 ? -2 : 0), tY + 1, tZ + (tSide == 3 ? 2 : tSide == 2 ? -2 : 0)), getCasingTextureIndex())) {
- return false; //Fail if no muffler top middle back
- } else if (!addToMachineList(getBaseMetaTileEntity().getIGregTechTileEntity(aX, aY, aZ), getCasingTextureIndex())) {
- return false;
- }
- } else if (k == 0) {
- if(!(getBaseMetaTileEntity().getBlock(aX, aY, aZ) == getIntakeBlock() && getBaseMetaTileEntity().getMetaID(aX, aY, aZ) == getIntakeMeta())) {
- return false;
- }
- } else if (getBaseMetaTileEntity().getBlock(aX, aY, aZ) == getCasingBlock() && getBaseMetaTileEntity().getMetaID(aX, aY, aZ) == getCasingMeta()) {
- // Do nothing
- } else {
- return false;
- }
- }
- }
- }
- }
- this.mDynamoHatches.clear();
- IGregTechTileEntity tTileEntity = getBaseMetaTileEntity().getIGregTechTileEntityAtSideAndDistance(getBaseMetaTileEntity().getBackFacing(), 3);
- if ((tTileEntity != null) && (tTileEntity.getMetaTileEntity() != null)) {
- if ((tTileEntity.getMetaTileEntity() instanceof GT_MetaTileEntity_Hatch_Dynamo)) {
- this.mDynamoHatches.add((GT_MetaTileEntity_Hatch_Dynamo) tTileEntity.getMetaTileEntity());
- ((GT_MetaTileEntity_Hatch) tTileEntity.getMetaTileEntity()).updateTexture(getCasingTextureIndex());
- } else {
- return false;
- }
- }
- return true;
- }
-
- public Block getCasingBlock() {
- return ModBlocks.blockCasings4Misc;
- }
-
- public byte getCasingMeta() {
- return 11;
- }
-
- public Block getIntakeBlock() {
- return GregTech_API.sBlockCasings4;
- }
-
- public byte getIntakeMeta() {
- return 12;
- }
-
- public Block getGearboxBlock() {
- return ModBlocks.blockCasings3Misc;
- }
-
- public byte getGearboxMeta() {
- return 1;
- }
-
- public byte getCasingTextureIndex() {
- return (byte) CASING_ID;
- }
-
- @Override
- public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) {
- return new GregtechMetaTileEntity_LargeRocketEngine(this.mName);
- }
-
- @Override
- public void saveNBTData(final NBTTagCompound aNBT) {
- super.saveNBTData(aNBT);
- }
-
- @Override
- public void loadNBTData(final NBTTagCompound aNBT) {
- super.loadNBTData(aNBT);
- }
-
- @Override
- public int getDamageToComponent(final ItemStack aStack) {
- return 1;
- }
-
- @Override
- public int getMaxEfficiency(final ItemStack aStack) {
- return this.boostEu ? 30000 : 10000;
- }
-
- @Override
- public int getPollutionPerTick(final ItemStack aStack) {
- return this.boostEu ? 150 : 75;
- }
-
- @Override
- public boolean explodesOnComponentBreak(final ItemStack aStack) {
- return true;
- }
-
- @Override
- public String[] getExtraInfoData() {
- return new String[] {
- "Rocket Engine",
- "Current Pollution: " + getPollutionPerTick(null),
- "Current Output: " + this.mEUt * this.mEfficiency / 10000 + " EU/t",
- "Fuel Consumption: " + this.fuelConsumption + "L/t",
- "Fuel Value: " + this.fuelValue + " EU/L",
- "Fuel Remaining: " + this.fuelRemaining + " Litres",
- "Current Efficiency: " + this.mEfficiency / 100 + "%",
- (this.getIdealStatus() == this.getRepairStatus()) ? "No Maintainance issues" : "Needs Maintainance" };
- }
-
- @Override
- public boolean isGivingInformation() {
- return true;
- }
+
+ private final static int CASING_ID = TAE.getIndexFromPage(3, 11);
+
+ public GregtechMetaTileEntity_LargeRocketEngine(final int aID, final String aName, final String aNameRegional) {
+ super(aID, aName, aNameRegional);
+ this.fuelConsumption = 0;
+ this.fuelValue = 0;
+ this.fuelRemaining = 0;
+ this.boostEu = false;
+ }
+
+ public GregtechMetaTileEntity_LargeRocketEngine(final String aName) {
+ super(aName);
+ this.fuelConsumption = 0;
+ this.fuelValue = 0;
+ this.fuelRemaining = 0;
+ this.boostEu = false;
+ }
+
+ @Override
+ public String[] getTooltip() {
+ if (mCasingName.toLowerCase().contains(".name")) {
+ mCasingName = ItemUtils.getLocalizedNameOfBlock(ModBlocks.blockCasings4Misc, 11);
+ }
+ if (mIntakeHatchName.toLowerCase().contains(".name")) {
+ mIntakeHatchName = ItemUtils.getLocalizedNameOfBlock(ModBlocks.blockCasings4Misc, 11);
+ }
+ if (mGearboxName.toLowerCase().contains(".name")) {
+ mGearboxName = ItemUtils.getLocalizedNameOfBlock(ModBlocks.blockCasings3Misc, 1);
+ }
+ if (mLubricantName.toLowerCase().contains(".")) {
+ mLubricantName = FluidUtils.getFluidStack("carbondioxide", 1).getLocalizedName();
+ }
+ if (mCoolantName.toLowerCase().contains(".")) {
+ mCoolantName = FluidUtils.getFluidStack("liquidhydrogen", 1).getLocalizedName();
+ }
+ return new String[] {
+ "Controller Block for the Large Combustion Engine",
+ "Supply Rocket Fuels and 1000L of "+mLubricantName+" per hour to run",
+ "Supply 40L of "+mCoolantName+" per second to boost output (optional)",
+ "Consumes upto 5000L of Air per second",
+ "Default: Produces "+GT_Values.V[5]+"EU/t at 100% efficiency",
+ "Boosted: Produces "+(GT_Values.V[5]*3)+"EU/t at 150% efficiency",
+ "Size(WxHxD): 3x3x10, Controller (front centered)",
+ "3x3x10 of Stable "+mCasingName+" (hollow, Min 64!)",
+ "8x "+mGearboxName+" inside the Hollow Casing",
+ "1x Dynamo Hatch (Top Middle, Max 8)",
+ "8x Air Intake Hatch (one of the Casings next to a Gear Box, top row allowed)",
+ "2x Input Hatch (Rocket Fuel/Booster) (one of the Casings next to a Gear Box, top row not allowed)",
+ "1x Maintenance Hatch (one of the Casings next to a Gear Box)",
+ "1x Muffler Hatch (Back Centre)",
+ };
+ }
@Override
- public boolean hasSlotInGUI() {
+ public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) {
+ if (aSide == aFacing) {
+ return new ITexture[] { Textures.BlockIcons.CASING_BLOCKS[CASING_ID], new GT_RenderedTexture(aActive ? TexturesGtBlock.Overlay_Machine_Controller_Advanced_Active : TexturesGtBlock.Overlay_Machine_Controller_Advanced) };
+ }
+ return new ITexture[] { Textures.BlockIcons.CASING_BLOCKS[CASING_ID] };
+ }
+
+ @Override
+ public boolean isCorrectMachinePart(final ItemStack aStack) {
+ return this.getMaxEfficiency(aStack) > 0;
+ }
+
+ @Override
+ public Object getClientGUI(final int aID, final InventoryPlayer aPlayerInventory, final IGregTechTileEntity aBaseMetaTileEntity) {
+ return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, this.getLocalName(), "LargeDieselEngine.png");
+ }
+
+ public int getAir() {
+ if (this.mAirIntakes.isEmpty() || this.mAirIntakes.size() <= 0) {
+ return 0;
+ }
+ else {
+ int totalAir = 0;
+ FluidStack airstack = FluidUtils.getFluidStack("air", 1);
+ for (GT_MetaTileEntity_Hatch_AirIntake u : this.mAirIntakes) {
+ if (u != null) {
+ FluidStack f = u.mFluid;
+ if (f.isFluidEqual(airstack)) {
+ totalAir += f.amount;
+ }
+ }
+ }
+ return totalAir;
+ }
+ }
+
+ @Override
+ public boolean checkRecipe(final ItemStack aStack) {
+ final ArrayList<FluidStack> tFluids = this.getStoredFluids();
+ FluidStack air = FluidUtils.getFluidStack("air", 1);
+
+ int aircount = getAir() ;
+ if (aircount < (boostEu ? 500 : 200)) {
+ Logger.INFO("Not Enough Air to Run "+aircount);
+ return false;
+ }
+ else {
+ boolean hasIntakeAir = this.depleteInput(FluidUtils.getFluidStack(air, boostEu ? 500 : 200));
+ if (!hasIntakeAir) {
+ Logger.INFO("Could not consume Air to run "+aircount);
+ return false;
+ }
+ }
+ Logger.INFO("Running "+aircount);
+
+ final Collection<GT_Recipe> tRecipeList = Recipe_GT.Gregtech_Recipe_Map.sRocketFuels.mRecipeList;
+ if (tFluids.size() > 0 && tRecipeList != null) {
+ for (final FluidStack hatchFluid1 : tFluids) {
+ if (hatchFluid1.isFluidEqual(air)) {
+ continue;
+ }
+ for (final GT_Recipe aFuel : tRecipeList) {
+ final FluidStack tLiquid;
+ tLiquid = aFuel.mFluidInputs[0];
+ if (hatchFluid1.isFluidEqual(tLiquid)) {
+ final FluidStack fluidStack = tLiquid;
+ Logger.INFO("Found valid thing");
+ final int n = (int) (this.boostEu ? ((GT_Values.V[5]*2) / aFuel.mSpecialValue) : (GT_Values.V[5] / aFuel.mSpecialValue));
+ fluidStack.amount = n;
+ this.fuelConsumption = n;
+
+ if (!consumeFuel(aFuel)) {
+ continue;
+ }
+
+ Logger.INFO("Consumed some input fuel");
+ this.boostEu = consumeLOH();
+ Logger.INFO("Did we consume LOH? "+boostEu);
+
+ if (tFluids.contains(MISC_MATERIALS.CARBON_DIOXIDE.getFluid(this.boostEu ? 2 : 1)) || tFluids.contains(FluidUtils.getFluidStack("carbondioxide", (this.boostEu ? 2 : 1)))) {
+ Logger.INFO("Found CO2");
+ if (this.mRuntime % 72 == 0 || this.mRuntime == 0) {
+ if (!consumeCO2()) {
+ return false;
+ }
+ }
+ this.fuelValue = aFuel.mSpecialValue;
+ this.fuelRemaining = hatchFluid1.amount;
+ this.mEUt = (int) ((this.mEfficiency < 2000) ? 0 : GT_Values.V[5]);
+ this.mProgresstime = 1;
+ this.mMaxProgresstime = 1;
+ this.mEfficiencyIncrease = 5;
+ return true;
+ }
+ return false;
+ }
+ }
+ }
+ }
+ this.mEUt = 0;
+ this.mEfficiency = 0;
return false;
}
+ /**
+ * Consumes Fuel if required. Free Fuel Ticks are handled here.
+ * @param aFuel
+ * @return
+ */
+ public boolean consumeFuel(GT_Recipe aFuel) {
+ if (freeFuelTicks > 0) {
+ freeFuelTicks--;
+ return true;
+ }
+ else {
+ freeFuelTicks = 0;
+ int value = aFuel.mSpecialValue * 3000;
+ value /= 1000;
+ FluidStack tLiquid = FluidUtils.getFluidStack(aFuel.mFluidInputs[0], value);
+ if (!this.depleteInput(tLiquid)) {
+ return false;
+ }
+ else {
+ freeFuelTicks = value;
+ return true;
+ }
+ }
+ }
+
+ public boolean consumeCO2() {
+ if (this.depleteInput(MISC_MATERIALS.CARBON_DIOXIDE.getFluid(this.boostEu ? 2 : 1)) || this.depleteInput(FluidUtils.getFluidStack("carbondioxide", (this.boostEu ? 2 : 1)))) {
+ Logger.INFO("consumed some CO2");
+ return true;
+ }
+ else {
+ Logger.INFO("No CO2 to consume");
+ return false;
+ }
+ }
+
+ public boolean consumeLOH() {
+ return this.depleteInput(FluidUtils.getFluidStack(RocketFuels.Liquid_Hydrogen, 2));
+ }
+
+ @Override
+ public boolean checkMultiblock(final IGregTechTileEntity aBaseMetaTileEntity, final ItemStack aStack) {
+ byte tSide = getBaseMetaTileEntity().getBackFacing();
+ int tX = getBaseMetaTileEntity().getXCoord();
+ int tY = getBaseMetaTileEntity().getYCoord();
+ int tZ = getBaseMetaTileEntity().getZCoord();
+ final int MAX_LENGTH = 8;
+ for (int length=0;length<MAX_LENGTH;length++) {
+ if(getBaseMetaTileEntity().getBlockAtSideAndDistance(tSide, length+1) != getGearboxBlock()) {
+ Logger.INFO("Bad Gearbox Block");
+ return false;
+ }
+ if(getBaseMetaTileEntity().getMetaIDAtSideAndDistance(tSide, length+1) != getGearboxMeta()) {
+ Logger.INFO("Bad Gearbox Meta");
+ return false;
+ }
+ }
+ Logger.INFO("Found "+MAX_LENGTH+" "+mGearboxName+"s.");
+ for (byte i = -1; i < 2; i = (byte) (i + 1)) {
+ for (byte j = -1; j < 2; j = (byte) (j + 1)) {
+ if ((i != 0) || (j != 0)) {
+ for (byte aLength = 0; aLength < (MAX_LENGTH+2); aLength = (byte) (aLength + 1)) { // Length
+
+
+ final int fX = tX - (tSide == 5 ? 1 : tSide == 4 ? -1 : i),
+ fZ = tZ - (tSide == 2 ? -1 : tSide == 3 ? 1 : i),
+ aY = tY + j,
+ aX = tX + (tSide == 5 ? aLength : tSide == 4 ? -aLength : i),
+ aZ = tZ + (tSide == 2 ? -aLength : tSide == 3 ? aLength : i);
+
+
+ //Why check for air in world when each intake requires 1 air block?
+ //final Block frontAir = getBaseMetaTileEntity().getBlock(fX, aY, fZ);
+ //final String frontAirName = frontAir.getUnlocalizedName();
+ //if(!(getBaseMetaTileEntity().getAir(fX, aY, fZ) || frontAirName.equalsIgnoreCase("tile.air") || frontAirName.equalsIgnoreCase("tile.railcraft.residual.heat"))) {
+ //Logger.INFO("Bad Air Check");
+ //return false; //Fail if vent blocks are obstructed
+ //}
+
+ if (((i == 0) || (j == 0)) && ((aLength > 0) && (aLength <= MAX_LENGTH))) {
+ Logger.INFO("Checking for Hatches. "+aLength);
+ //Top Row
+ if (j == 1) {
+ if (addDynamoToMachineList(getBaseMetaTileEntity().getIGregTechTileEntity(aX, aY, aZ), getCasingTextureIndex())) {
+ // Do Nothing
+ }
+ else if (addAirIntakeToMachineList(getBaseMetaTileEntity().getIGregTechTileEntity(aX, aY, aZ), getCasingTextureIndex())) {
+ // Do Nothing
+ }
+ else if (getBaseMetaTileEntity().getBlock(aX, aY, aZ) == getCasingBlock() && getBaseMetaTileEntity().getMetaID(aX, aY, aZ) == getCasingMeta()) {
+ // Do nothing
+ }
+ else {
+ Logger.INFO("Top Row - "+aLength+" | Did not find casing or Dynamo");
+ return false;
+ }
+ }
+ else {
+ IGregTechTileEntity aCheck = getBaseMetaTileEntity().getIGregTechTileEntity(aX, aY, aZ);
+ if (aCheck != null) {
+ final IMetaTileEntity bCheck = aCheck.getMetaTileEntity();
+ // Only allow Dynamos on Top
+ if (bCheck instanceof GT_MetaTileEntity_Hatch_Dynamo) {
+ Logger.INFO("Found dynamo in disallowed location | "+aX+", "+aY+", "+aZ+" | "+i+", "+j+", "+aLength);
+ return false;
+ }
+ }
+ if (addAirIntakeToMachineList(getBaseMetaTileEntity().getIGregTechTileEntity(aX, aY, aZ), getCasingTextureIndex())) {
+ // Do Nothing
+ }
+ else if (addInputToMachineList(getBaseMetaTileEntity().getIGregTechTileEntity(aX, aY, aZ), getCasingTextureIndex())) {
+ // Do Nothing
+ }
+ else if (addOutputToMachineList(getBaseMetaTileEntity().getIGregTechTileEntity(aX, aY, aZ), getCasingTextureIndex())) {
+ // Do Nothing
+ }
+ else if (getBaseMetaTileEntity().getBlock(aX, aY, aZ) == getCasingBlock() && getBaseMetaTileEntity().getMetaID(aX, aY, aZ) == getCasingMeta()) {
+ // Do nothing
+ }
+ else {Logger.INFO("Bad block.");
+ return false;
+ }
+
+ }
+ Logger.INFO("Passed check. "+aLength);
+
+ } else if (aLength == 0) {
+ Logger.INFO("Searching for Gearbox");
+ if (addMaintenanceToMachineList(getBaseMetaTileEntity().getIGregTechTileEntity(aX, aY, aZ), getCasingTextureIndex())) {
+ // Do Nothing
+ }
+ else if(!(getBaseMetaTileEntity().getBlock(aX, aY, aZ) == getCasingBlock() && getBaseMetaTileEntity().getMetaID(aX, aY, aZ) == getCasingMeta())) {
+ Logger.INFO("Bad Missing Casing || Bad Meta");
+ return false;
+ }
+ else {
+ Logger.INFO("Found "+mCasingName+".");
+ }
+ } else if (getBaseMetaTileEntity().getBlock(aX, aY, aZ) == getCasingBlock() && getBaseMetaTileEntity().getMetaID(aX, aY, aZ) == getCasingMeta()) {
+ Logger.INFO("Found Casing.");
+ // Do nothing
+ } else {
+ Logger.INFO("Bad XXX");
+ return false;
+ }
+ }
+ }
+ }
+ }
+
+ this.mMufflerHatches.clear();
+ IGregTechTileEntity tTileEntity = getBaseMetaTileEntity().getIGregTechTileEntityAtSideAndDistance(getBaseMetaTileEntity().getBackFacing(), MAX_LENGTH+1);
+ if ((tTileEntity != null) && (tTileEntity.getMetaTileEntity() != null)) {
+ if ((tTileEntity.getMetaTileEntity() instanceof GT_MetaTileEntity_Hatch_Muffler)) {
+ this.mMufflerHatches.add((GT_MetaTileEntity_Hatch_Muffler) tTileEntity.getMetaTileEntity());
+ this.updateTexture(tTileEntity, getCasingTextureIndex());
+ }
+ }
+
+ if (this.mDynamoHatches.size() <= 0 || this.mDynamoHatches.isEmpty()) {
+ Logger.INFO("Wrong count for Dynamos");
+ return false;
+ }
+ if (this.mMufflerHatches.size() != 1 || this.mMufflerHatches.isEmpty()) {
+ Logger.INFO("Wrong count for Mufflers");
+ return false;
+ }
+ if (this.mAirIntakes.size() < 8 || this.mAirIntakes.isEmpty()) {
+ Logger.INFO("Wrong count for Air Intakes | "+this.mAirIntakes.size());
+ return false;
+ }
+ if (this.mMaintenanceHatches.size() < 1 || this.mMaintenanceHatches.isEmpty()) {
+ Logger.INFO("Wrong count for Maint. Hatches");
+ return false;
+ }
+
+
+ Logger.INFO("Formed Rocket Engine.");
+ return true;
+ }
+
+ public Block getCasingBlock() {
+ return ModBlocks.blockCasings4Misc;
+ }
+
+ public byte getCasingMeta() {
+ return 11;
+ }
+
+ public Block getIntakeBlock() {
+ return GregTech_API.sBlockCasings4;
+ }
+
+ public byte getIntakeMeta() {
+ return 12;
+ }
+
+ public Block getGearboxBlock() {
+ return ModBlocks.blockCasings3Misc;
+ }
+
+ public byte getGearboxMeta() {
+ return 1;
+ }
+
+ public byte getCasingTextureIndex() {
+ return (byte) CASING_ID;
+ }
+
+ @Override
+ public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) {
+ return new GregtechMetaTileEntity_LargeRocketEngine(this.mName);
+ }
+
+ @Override
+ public void saveNBTData(final NBTTagCompound aNBT) {
+ aNBT.setInteger("freeFuelTicks", freeFuelTicks);
+ super.saveNBTData(aNBT);
+ }
+
+ @Override
+ public void loadNBTData(final NBTTagCompound aNBT) {
+ super.loadNBTData(aNBT);
+ freeFuelTicks = aNBT.getInteger("freeFuelTicks");
+ }
+
+ @Override
+ public int getDamageToComponent(final ItemStack aStack) {
+ return 1;
+ }
+
+ @Override
+ public int getMaxEfficiency(final ItemStack aStack) {
+ return this.boostEu ? 30000 : 10000;
+ }
+
+ @Override
+ public int getPollutionPerTick(final ItemStack aStack) {
+ return this.boostEu ? 150 : 75;
+ }
+
+ @Override
+ public boolean explodesOnComponentBreak(final ItemStack aStack) {
+ return true;
+ }
+
+ @Override
+ public String[] getExtraInfoData() {
+ return new String[] {
+ "Rocket Engine",
+ "Current Air: "+getAir(),
+ "Current Pollution: " + getPollutionPerTick(null),
+ "Current Output: " + this.mEUt * this.mEfficiency / 10000 + " EU/t",
+ "Fuel Consumption: " + this.fuelConsumption + "L/t",
+ "Fuel Value: " + this.fuelValue + " EU/L",
+ "Fuel Remaining: " + this.fuelRemaining + " Litres",
+ "Current Efficiency: " + this.mEfficiency / 100 + "%",
+ (this.getIdealStatus() == this.getRepairStatus()) ? "No Maintainance issues" : "Needs Maintainance" };
+ }
+
+ @Override
+ public boolean isGivingInformation() {
+ return true;
+ }
+
+ @Override
+ public boolean hasSlotInGUI() {
+ return true;
+ }
+
@Override
public String getCustomGUIResourceName() {
return null;
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechRocketFuelGenerator.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechRocketFuelGenerator.java
index 2c1507526d..b8dd8e4767 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechRocketFuelGenerator.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechRocketFuelGenerator.java
@@ -30,7 +30,7 @@ public class GregtechRocketFuelGenerator {
private static void run1() {
GregtechItemList.Controller_RocketEngine.set(
- new GregtechMetaTileEntity_LargeRocketEngine(30410, "gtpp.multimachine.rocketengine", "Rocketdyne F-1A Engine").getStackForm(1L));
+ new GregtechMetaTileEntity_LargeRocketEngine(996, "gtpp.multimachine.rocketengine", "Rocketdyne F-1A Engine").getStackForm(1L));
GT_ModHandler.addCraftingRecipe(
GregtechItemList.Controller_RocketEngine.get(1L),
diff --git a/src/resources/assets/gregtech/lang/en_US.lang b/src/resources/assets/gregtech/lang/en_US.lang
index caf4f636fb..c388f9785e 100644
--- a/src/resources/assets/gregtech/lang/en_US.lang
+++ b/src/resources/assets/gregtech/lang/en_US.lang
@@ -20,18 +20,6 @@ GTPP.CC.machinetier=Control Core Tier
GTPP.CC.discount=EU Discount
GTPP.CC.parallel=Maximum Parallel Processing
-
-
-//Some Generic Words
-GTPP.info.eu=EU
-GTPP.info.euInfo=EU Information
-GTPP.info.inputLimit=Input Limit
-GTPP.info.currentPower=Current Power
-GTPP.info.hidden=Hidden
-
-
-
-
//Tooltips for the Charger Packs
GTPP.battpack.tooltip.1=Worn as a Belt within Baubles
GTPP.battpack.tooltip.2=Drains
@@ -53,6 +41,53 @@ GTPP.monsterkiller.tooltip.2=Drains
GTPP.monsterkiller.tooltip.3=per each kill
GTPP.monsterkiller.tooltip.4=Target Type:
+//17/08/19
+GTPP.container.decaychest.name=Decayables
+
+
+
+
+
+
+
+
+
+
+
+
+//NEI INFORMATION
+GTPP.nei.info=Information
+GTPP.nei.eutick=Eu/t
+GTPP.nei.timetaken=Time Taken
+GTPP.nei.output=Output
+GTPP.nei.input=Input
+GTPP.nei.result=Result
+GTPP.nei.radioation=Radiation Level
+
+//Some Generic Words
+GTPP.info.eu=EU
+GTPP.info.euInfo=EU Information
+GTPP.info.inputLimit=Input Limit
+GTPP.info.currentPower=Current Power
+GTPP.info.hidden=Hidden
+
+//Some Time Words
+GTPP.time.ticks=Ticks
+GTPP.time.seconds=Seconds
+GTPP.time.minutes=Minutes
+GTPP.time.hours=Hours
+GTPP.time.days=Days
+GTPP.time.weeks=Weeks
+GTPP.time.months=Months
+
+
+
+
+
+
+
+
+
diff --git a/src/resources/assets/miscutils/lang/en_US.lang b/src/resources/assets/miscutils/lang/en_US.lang
index 3aefd6dee2..bc4b170654 100644
--- a/src/resources/assets/miscutils/lang/en_US.lang
+++ b/src/resources/assets/miscutils/lang/en_US.lang
@@ -2968,4 +2968,5 @@ item.itemCellHydrogenCyanide.name=Cell of Hydrogen Cyanide
item.itemCactusCharcoal.name=Cactus Charcoal
item.itemCactusCoke.name=Cactus Coke
item.itemSugarCharcoal.name=Sugar Charcoal
-item.itemSugarCoke.name=Sugar Coke \ No newline at end of file
+item.itemSugarCoke.name=Sugar Coke
+item.LiquidHydrogen.name=Liquid Hydrogen Cell [LOH] \ No newline at end of file
diff --git a/src/resources/assets/miscutils/textures/gui/nei/decayables.png b/src/resources/assets/miscutils/textures/gui/nei/decayables.png
new file mode 100644
index 0000000000..d1827433a0
--- /dev/null
+++ b/src/resources/assets/miscutils/textures/gui/nei/decayables.png
Binary files differ
diff --git a/src/resources/assets/miscutils/textures/gui/nei/widgets.png b/src/resources/assets/miscutils/textures/gui/nei/widgets.png
new file mode 100644
index 0000000000..0dc26c43e4
--- /dev/null
+++ b/src/resources/assets/miscutils/textures/gui/nei/widgets.png
Binary files differ