aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/elisis/gtnhlanth
diff options
context:
space:
mode:
authorMartin Robertz <dream-master@gmx.net>2023-06-05 20:16:48 +0200
committerGitHub <noreply@github.com>2023-06-05 20:16:48 +0200
commit6c1a3c9c5a09a050b780579f8784348f71cb3254 (patch)
tree3815ed2f69e354c3144b3c7b21945b7676866ff9 /src/main/java/com/elisis/gtnhlanth
parentf66e699b65e5357a59963e1aab4f39c85f715ce9 (diff)
parent13370db2fda91d09a03523748d84edad5f5b7b8c (diff)
downloadGT5-Unofficial-6c1a3c9c5a09a050b780579f8784348f71cb3254.tar.gz
GT5-Unofficial-6c1a3c9c5a09a050b780579f8784348f71cb3254.tar.bz2
GT5-Unofficial-6c1a3c9c5a09a050b780579f8784348f71cb3254.zip
Merge pull request #58 from chochem/remove-outdated-botdustries-fluids
Remove outdated botdustries fluids
Diffstat (limited to 'src/main/java/com/elisis/gtnhlanth')
-rw-r--r--src/main/java/com/elisis/gtnhlanth/common/register/BotWerkstoffMaterialPool.java71
-rw-r--r--src/main/java/com/elisis/gtnhlanth/loader/BotRecipes.java170
2 files changed, 39 insertions, 202 deletions
diff --git a/src/main/java/com/elisis/gtnhlanth/common/register/BotWerkstoffMaterialPool.java b/src/main/java/com/elisis/gtnhlanth/common/register/BotWerkstoffMaterialPool.java
index 77f33d2a61..82ad3aec82 100644
--- a/src/main/java/com/elisis/gtnhlanth/common/register/BotWerkstoffMaterialPool.java
+++ b/src/main/java/com/elisis/gtnhlanth/common/register/BotWerkstoffMaterialPool.java
@@ -5,8 +5,6 @@ import static com.github.bartimaeusnek.bartworks.util.BW_Util.subscriptNumbers;
import static gregtech.api.enums.Materials.*;
import static gregtech.api.enums.TextureSet.*;
-import net.minecraft.util.EnumChatFormatting;
-
import com.github.bartimaeusnek.bartworks.system.material.Werkstoff;
import com.github.bartimaeusnek.bartworks.util.Pair;
@@ -16,9 +14,6 @@ import com.github.bartimaeusnek.bartworks.util.Pair;
@SuppressWarnings("unchecked")
public class BotWerkstoffMaterialPool implements Runnable {
- private static final String DEPRECATED = EnumChatFormatting.DARK_RED
- + "Deprecated; Will be removed in the next update";
-
public static final Werkstoff TungsticAcid = new Werkstoff(
new short[] { 0xf5, 0xf1, 0x16 },
"Tungstic Acid",
@@ -40,18 +35,6 @@ public class BotWerkstoffMaterialPool implements Runnable {
SET_SHINY,
new Pair<>(Tungsten, 1),
new Pair<>(Oxygen, 3));
- // public static final Werkstoff TungstenSteelOxide = new Werkstoff(
- // new short[]{0x1f,0x27,0x69},
- // "Tungstensteel Oxide",
- // new Werkstoff.Stats(),
- // COMPOUND,
- // new Werkstoff.GenerationFeatures().onlyDust(),
- // 29902,
- // SET_FINE,
- // new Pair<>(Tungsten, 1),
- // new Pair<>(Oxygen,3),
- // new Pair<>(Steel,1)
- // );
public static final Werkstoff AmmoniumNitrate = new Werkstoff(
new short[] { 0x81, 0xcc, 0x00 },
"Ammonium Nitrate",
@@ -145,15 +128,6 @@ public class BotWerkstoffMaterialPool implements Runnable {
new Werkstoff.GenerationFeatures().disable().addCells(),
29912,
SET_FINE);
- public static final Werkstoff LMP103S = new Werkstoff(
- new short[] { 0xbf, 0x2f, 0xc2 },
- "LMP-103S",
- DEPRECATED,
- new Werkstoff.Stats(),
- COMPOUND,
- new Werkstoff.GenerationFeatures().disable().addCells(),
- 29913,
- SET_FINE);
public static final Werkstoff OXylene = new Werkstoff(
new short[] { 0x88, 0x94, 0xa8 },
"O-Xylene",
@@ -208,24 +182,6 @@ public class BotWerkstoffMaterialPool implements Runnable {
new Werkstoff.GenerationFeatures().disable().addCells(),
29920,
SET_METALLIC);
- public static final Werkstoff HydrogenPeroxide = new Werkstoff(
- new short[] { 0xad, 0x53, 0x1a },
- "Hydrogen Peroxide",
- subscriptNumbers("H2O2"),
- new Werkstoff.Stats(),
- COMPOUND,
- new Werkstoff.GenerationFeatures().disable().addCells().enforceUnification(),
- 29921,
- SET_METALLIC);
- public static final Werkstoff Hydrazine = new Werkstoff(
- new short[] { 0xb5, 0x07, 0x07 },
- "hydrazine",
- subscriptNumbers("N2H4"),
- new Werkstoff.Stats(),
- COMPOUND,
- new Werkstoff.GenerationFeatures().disable().addCells(),
- 29922,
- SET_METALLIC);
public static final Werkstoff DimethylSulfate = new Werkstoff(
new short[] { 0xff, 0xfb, 0x00 },
"Dimethyl Sulfate",
@@ -244,15 +200,6 @@ public class BotWerkstoffMaterialPool implements Runnable {
new Werkstoff.GenerationFeatures().disable().addCells(),
29924,
SET_METALLIC);
- public static final Werkstoff Formaldehyde = new Werkstoff(
- new short[] { 0x2e, 0xd9, 0x83 },
- "Formaldehyde",
- subscriptNumbers("CH2O"),
- new Werkstoff.Stats(),
- COMPOUND,
- new Werkstoff.GenerationFeatures().disable().addCells(),
- 29925,
- SET_METALLIC);
public static final Werkstoff EthylAcetate = new Werkstoff(
new short[] { 0x0c, 0xfb, 0x32b },
"Ethyl Acetate",
@@ -280,24 +227,6 @@ public class BotWerkstoffMaterialPool implements Runnable {
new Werkstoff.GenerationFeatures().disable().addCells(),
29928,
SET_METALLIC);
- public static final Werkstoff MonomethylhydrazineFuelMix = new Werkstoff(
- new short[] { 0x78, 0xe3, 0xa7 },
- "Monomethylhydrazine Fuel Mix",
- DEPRECATED,
- new Werkstoff.Stats(),
- COMPOUND,
- new Werkstoff.GenerationFeatures().disable().addCells(),
- 29929,
- SET_METALLIC);
- public static final Werkstoff UnsymmetricalDimethylhydrazineFuelMix = new Werkstoff(
- new short[] { 0xc8, 0xff, 0x00 },
- "Unsymmetrical Dimethylhydrazine Fuel Mix",
- DEPRECATED,
- new Werkstoff.Stats(),
- COMPOUND,
- new Werkstoff.GenerationFeatures().disable().addCells(),
- 29930,
- SET_METALLIC);
public static final Werkstoff Nitromethane = new Werkstoff(
new short[] { 0x87, 0x7d, 0x60 },
"Nitromethane",
diff --git a/src/main/java/com/elisis/gtnhlanth/loader/BotRecipes.java b/src/main/java/com/elisis/gtnhlanth/loader/BotRecipes.java
index b11d502f14..b2c8605976 100644
--- a/src/main/java/com/elisis/gtnhlanth/loader/BotRecipes.java
+++ b/src/main/java/com/elisis/gtnhlanth/loader/BotRecipes.java
@@ -1,26 +1,24 @@
package com.elisis.gtnhlanth.loader;
import static com.elisis.gtnhlanth.common.register.BotWerkstoffMaterialPool.*;
+import static gregtech.api.enums.Mods.GTPlusPlus;
import static gregtech.api.enums.OrePrefixes.*;
+import static gregtech.api.util.GT_ModHandler.getModItem;
import static gregtech.api.util.GT_Recipe.GT_Recipe_Map.sChemicalRecipes;
import static gregtech.api.util.GT_RecipeBuilder.SECONDS;
import static gregtech.api.util.GT_RecipeBuilder.TICKS;
import static gregtech.api.util.GT_RecipeConstants.UniversalChemical;
-import java.lang.reflect.Field;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
import java.util.Collection;
import java.util.HashSet;
import net.minecraft.item.ItemStack;
-import net.minecraftforge.fluids.Fluid;
+import net.minecraftforge.fluids.FluidRegistry;
import net.minecraftforge.fluids.FluidStack;
import com.elisis.gtnhlanth.common.register.BotWerkstoffMaterialPool;
import com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader;
-import cpw.mods.fml.common.Loader;
import gregtech.api.enums.GT_Values;
import gregtech.api.enums.Materials;
import gregtech.api.enums.TierEU;
@@ -113,10 +111,6 @@ public class BotRecipes {
// H2WO4 = WO3 + H2O
GT_Values.RA.addBlastRecipe(H2WO4, null, null, null, WO3, null, 200, 480, 1200);
- // ItemStack WO3Fe = TungstenSteelOxide.get(dust, 2);
- // GT_Values.RA.addMixerRecipe(WO3, Materials.Steel.getDust(1), null, null, null, null,
- // WO3Fe, 100, 1920);
-
// WO3 + 6H = W + 3H2O
GT_Values.RA.addBlastRecipe(
WO3,
@@ -222,13 +216,6 @@ public class BotRecipes {
200,
1920);
- // LMP-103S
- /*
- * GT_Values.RA.addMultiblockChemicalRecipe( new ItemStack[] {C24}, new FluidStack[] {
- * AmmoniumDinitramide.getFluidOrGas(6000), Materials.Methanol.getFluid(2000), Materials.Ammonia.getGas(500),
- * Materials.Water.getFluid(1500) }, new FluidStack[] {LMP103S.getFluidOrGas(10000)}, null, 1200, 1920);
- */
-
// P4O10 + 2HNO3 + 5H2O = 4H3PO4 + N2O5
GT_Values.RA.addChemicalRecipe(
Materials.PhosphorousPentoxide.getDust(14),
@@ -360,38 +347,6 @@ public class BotRecipes {
1200,
7680);
- // 2C18H17O2 + 2O = 2C18H16O2 + H2O2
- GT_Values.RA.addChemicalRecipe(
- Materials.Oxygen.getCells(2),
- C2,
- TwoTertButylAnthrahydroquinone.getFluidOrGas(2000),
- TwoTertButylAnthraquinone.getFluidOrGas(2000),
- HydrogenPeroxide.get(cell, 1),
- Materials.Empty.getCells(1),
- 40,
- 1920);
-
- // 2H + 2O =C18H16O2,Pd= H2O2
- GT_Values.RA.addMultiblockChemicalRecipe(
- new ItemStack[] { C24, Materials.Palladium.getDustTiny(1) },
- new FluidStack[] { Materials.Hydrogen.getGas(10000), Materials.Oxygen.getGas(10000),
- TwoTertButylAnthraquinone.getFluidOrGas(10000) },
- new FluidStack[] { HydrogenPeroxide.getFluidOrGas(5000),
- TwoTertButylAnthraquinone.getFluidOrGas(10000) },
- null,
- 1400,
- 7680);
-
- // H2O2 + 2NH3 = N2H4 + 2H2O
- GT_Values.RA.addChemicalRecipe(
- HydrogenPeroxide.get(cell, 1),
- C2,
- Materials.Ammonia.getGas(2000),
- Materials.Water.getFluid(2000),
- Hydrazine.get(cell, 1),
- 100,
- 120);
-
// 2CH4O + H2SO4 = C2H6O4S + 2H2O
GT_Values.RA.addChemicalRecipe(
Materials.SulfuricAcid.getCells(1),
@@ -412,23 +367,19 @@ public class BotRecipes {
50,
480);
- // N2H4 + C2H6O4S = SO3 + CH6N2 + CH4O
- GT_Values.RA.addChemicalRecipe(
- Hydrazine.get(cell, 1),
- Materials.Empty.getCells(1),
- DimethylSulfate.getFluidOrGas(1000),
- Materials.SulfurTrioxide.getGas(1000),
- Monomethylhydrazine.get(cell, 1),
- Materials.Methanol.getCells(1),
- 80,
- 16000);
-
- /*
- * GT_Values.RA.addMixerRecipe( AmmoniumDinitramide.get(cell, 1), C1, null, null,
- * Monomethylhydrazine.getFluidOrGas(2000), MonomethylhydrazineFuelMix.getFluidOrGas(3000), cells, 20, 480);
- * cells.stackSize = 2; GT_Values.RA.addMixerRecipe( Monomethylhydrazine.get(cell, 2), C2, null, null,
- * AmmoniumDinitramide.getFluidOrGas(1000), MonomethylhydrazineFuelMix.getFluidOrGas(3000), cells, 20, 480);
- */
+ if (GTPlusPlus.isModLoaded()) {
+ // N2H4 + C2H6O4S = SO3 + CH6N2 + CH4O
+ GT_Values.RA.addChemicalRecipe(
+ getModItem(GTPlusPlus.ID, "Hydrazine", 1),
+ Materials.Empty.getCells(1),
+ DimethylSulfate.getFluidOrGas(1000),
+ Materials.SulfurTrioxide.getGas(1000),
+ Monomethylhydrazine.get(cell, 1),
+ Materials.Methanol.getCells(1),
+ 80,
+ 16000);
+ }
+
cells.stackSize = 1;
// unsimetrical hydazine
@@ -526,75 +477,32 @@ public class BotRecipes {
50,
1920);
- // O + CH4O =Ag= CH2O
- GT_Values.RA.addChemicalRecipe(
- Materials.Oxygen.getCells(4),
- Materials.Silver.getDustTiny(1),
- Materials.Methanol.getFluid(4000),
- Formaldehyde.getFluidOrGas(4000),
- cells,
- 100,
- 480);
-
- // N2H4 + C2H4O2 =C2H6O= C2H6N2O + H2O
- GT_Values.RA.addMultiblockChemicalRecipe(
- new ItemStack[] { C2 },
- new FluidStack[] { Materials.AceticAcid.getFluid(1000), Materials.Ethanol.getFluid(1000),
- Hydrazine.getFluidOrGas(1000) },
- new FluidStack[] { Acetylhydrazine.getFluidOrGas(1000), Materials.Ethanol.getFluid(1000) },
- null,
- 40,
- 30_720);
-
- // C2H6N2O + 2CH2O + 4H = C2H8N2 + C2H4O2 + H2O
- GT_Values.RA.addMultiblockChemicalRecipe(
- new ItemStack[] { C2 },
- new FluidStack[] { Acetylhydrazine.getFluidOrGas(1000), Formaldehyde.getFluidOrGas(2000),
- Materials.Hydrogen.getGas(4000) },
- new FluidStack[] { UnsymmetricalDimethylhydrazine.getFluidOrGas(1000),
- Materials.AceticAcid.getFluid(1000), Materials.Water.getFluid(1000) },
- null,
- 20,
- 122_880);
-
- /*
- * cells.stackSize = 2; GT_Values.RA.addMixerRecipe( UnsymmetricalDimethylhydrazine.get(cell, 2), C2, null,
- * null, Trinitramid.getFluidOrGas(1000), UnsymmetricalDimethylhydrazineFuelMix.getFluidOrGas(3000), cells, 10,
- * 120); cells.stackSize = 1; GT_Values.RA.addMixerRecipe( Trinitramid.get(cell, 1), C2, null, null,
- * UnsymmetricalDimethylhydrazine.getFluidOrGas(2000),
- * UnsymmetricalDimethylhydrazineFuelMix.getFluidOrGas(3000), cells, 10, 120);
- */
+ if (GTPlusPlus.isModLoaded()) {
+ // N2H4 + C2H4O2 =C2H6O= C2H6N2O + H2O
+ GT_Values.RA.addMultiblockChemicalRecipe(
+ new ItemStack[] { C2 },
+ new FluidStack[] { Materials.AceticAcid.getFluid(1000), Materials.Ethanol.getFluid(1000),
+ new FluidStack(FluidRegistry.getFluid("fluid.hydrazine"), 1000) },
+ new FluidStack[] { Acetylhydrazine.getFluidOrGas(1000), Materials.Ethanol.getFluid(1000) },
+ null,
+ 40,
+ 30_720);
+
+ // C2H6N2O + 2CH2O + 4H = C2H8N2 + C2H4O2 + H2O
+ GT_Values.RA.addMultiblockChemicalRecipe(
+ new ItemStack[] { C2 },
+ new FluidStack[] { Acetylhydrazine.getFluidOrGas(1000),
+ new FluidStack(FluidRegistry.getFluid("fluid.formaldehyde"), 2000),
+ Materials.Hydrogen.getGas(4000) },
+ new FluidStack[] { UnsymmetricalDimethylhydrazine.getFluidOrGas(1000),
+ Materials.AceticAcid.getFluid(1000), Materials.Water.getFluid(1000) },
+ null,
+ 20,
+ 122_880);
+ }
}
public static void addFuels() {
- try {
- if (Loader.isModLoaded(GT_Values.MOD_ID_GC_CORE)) {
- Class<?> rocket = Class.forName("micdoodle8.mods.galacticraft.api.recipe.RocketFuelRecipe");
- Method addFuel = rocket.getMethod("addFuel", Fluid.class, int.class);
- addFuel.invoke(null, LMP103S.getFluidOrGas(1).getFluid(), 4);
- addFuel.invoke(null, MonomethylhydrazineFuelMix.getFluidOrGas(1).getFluid(), 6);
- addFuel.invoke(null, UnsymmetricalDimethylhydrazineFuelMix.getFluidOrGas(1).getFluid(), 8);
- }
- if (Loader.isModLoaded("miscutils")) {
- Class<?> gtppRecipeMap = Class.forName("gregtech.api.util.GTPP_Recipe$GTPP_Recipe_Map");
- Field rocketFuels = gtppRecipeMap.getDeclaredField("sRocketFuels");
- rocketFuels.setAccessible(true);
- Class<?> rocketFuelsClass = rocketFuels.getType();
- Object rocketFuelsObject = rocketFuels.get(null);
- Method addFuel = rocketFuelsClass
- .getDeclaredMethod("addFuel", FluidStack.class, FluidStack.class, int.class);
- addFuel.invoke(rocketFuelsObject, LMP103S.getFluidOrGas(1000), null, 666);
- addFuel.invoke(rocketFuelsObject, MonomethylhydrazineFuelMix.getFluidOrGas(1000), null, 1500);
- addFuel.invoke(
- rocketFuelsObject,
- UnsymmetricalDimethylhydrazineFuelMix.getFluidOrGas(1000),
- null,
- 3000);
- }
- } catch (ClassNotFoundException | NoSuchMethodException | IllegalAccessException | InvocationTargetException
- | NoSuchFieldException e) {
- e.printStackTrace();
- }
GT_Recipe.GT_Recipe_Map.sTurbineFuels.addFuel(TertButylbenzene.get(cell, 1), null, 420);
}