Skip to content

Commit

Permalink
2.7 Stargate (#3105)
Browse files Browse the repository at this point in the history
Co-authored-by: Martin Robertz <[email protected]>
Co-authored-by: NotAPenguin <[email protected]>
  • Loading branch information
3 people authored Sep 12, 2024
1 parent e003cdd commit 544a7b3
Show file tree
Hide file tree
Showing 26 changed files with 314 additions and 155 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@

import bartworks.system.material.WerkstoffLoader;
import cpw.mods.fml.common.registry.GameRegistry;
import goodgenerator.items.GGMaterial;
import goodgenerator.util.StackUtils;
import gregtech.api.enums.GTValues;
import gregtech.api.enums.ItemList;
Expand Down Expand Up @@ -401,20 +400,20 @@ private static void generateCasingRecipes() {
.get(OrePrefixes.frameGt, MaterialsUEVplus.MagnetohydrodynamicallyConstrainedStarMatter, 1),
GTOreDictUnificator
.get(OrePrefixes.plateDense, MaterialsUEVplus.MagnetohydrodynamicallyConstrainedStarMatter, 3),
GGMaterial.shirabon.get(OrePrefixes.plateDense, 3), ComponentType.Robot_Arm.getComponent(t)
GTOreDictUnificator.get(OrePrefixes.plateDense, MaterialsUEVplus.MagMatter, 3),
ComponentType.Robot_Arm.getComponent(t)
.get(8),
ComponentType.Electric_Piston.getComponent(t)
.get(10),
ComponentType.Electric_Motor.getComponent(t)
.get(16),
GTOreDictUnificator
.get(OrePrefixes.gearGt, MaterialsUEVplus.MagnetohydrodynamicallyConstrainedStarMatter, 2),
GGMaterial.shirabon.get(OrePrefixes.gearGt, 2),
GTOreDictUnificator.get(OrePrefixes.gearGt, MaterialsUEVplus.MagMatter, 2),
GTOreDictUnificator
.get(OrePrefixes.gearGtSmall, MaterialsUEVplus.MagnetohydrodynamicallyConstrainedStarMatter, 8),
GGMaterial.shirabon.get(OrePrefixes.gearGtSmall, 8),
GTOreDictUnificator.get(OrePrefixes.wireGt04, Materials.Infinity, 4),
GTOreDictUnificator.get(OrePrefixes.wireGt04, MaterialsUEVplus.SpaceTime, 4), getALCircuit(t, 8),
GTOreDictUnificator.get(OrePrefixes.gearGtSmall, MaterialsUEVplus.MagMatter, 8),
GTOreDictUnificator.get(OrePrefixes.wireGt04, MaterialsUEVplus.SpaceTime, 8), getALCircuit(t, 8),
getALCircuit(t - 1, 16) },
new FluidStack[] { new FluidStack(sold, 144 * t * 4),
MaterialsUEVplus.BlackDwarfMatter.getMolten(144 * t * 2), MaterialsUEVplus.Eternity.getMolten(144 * t),
Expand Down
16 changes: 14 additions & 2 deletions src/main/java/gregtech/api/enums/MaterialsUEVplus.java
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,7 @@ public class MaterialsUEVplus {
1.0F,
8 * 2621440,
26,
1 | 2 | 64 | 128,
1 | 2 | 32 | 64 | 128,
255,
120,
20,
Expand All @@ -664,7 +664,8 @@ public class MaterialsUEVplus {
Collections.singletonList(new TCAspects.TC_AspectStack(TCAspects.ITER, 1)))
.disableAutoGeneratedBlastFurnaceRecipes()
.disableAutoGeneratedVacuumFreezerRecipe()
.setProcessingMaterialTierEU(TierEU.RECIPE_UEV);
.setProcessingMaterialTierEU(TierEU.RECIPE_UEV)
.setHasCorrespondingPlasma(true);

public static Materials Mellion = new Materials(
148,
Expand Down Expand Up @@ -888,6 +889,17 @@ public class MaterialsUEVplus {
1,
Dyes._NULL);

public static Materials StargateCrystalSlurry = new MaterialBuilder(
160,
new TextureSet("sgcrystalfluid", true),
"Stargate Crystal Slurry").setName("sgcrystalslurry")
.addFluid()
.addCell()
.setRGBA(255, 255, 255, 0)
.setTransparent(false)
.constructMaterial()
.setProcessingMaterialTierEU(TierEU.RECIPE_MAX);

/**
* called by Materials. Can be safely called multiple times. exists to allow Materials ensure this class is
* initialized
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/gregtech/api/enums/OrePrefixes.java
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,6 @@ public enum OrePrefixes {
plateTriple.mNotGeneratedItems.add(MaterialsUEVplus.MagnetohydrodynamicallyConstrainedStarMatter);
plateQuadruple.mNotGeneratedItems.add(MaterialsUEVplus.MagnetohydrodynamicallyConstrainedStarMatter);
plateQuintuple.mNotGeneratedItems.add(MaterialsUEVplus.MagnetohydrodynamicallyConstrainedStarMatter);
plateSuperdense.mNotGeneratedItems.add(MaterialsUEVplus.MagnetohydrodynamicallyConstrainedStarMatter);
cell.mNotGeneratedItems.add(MaterialsUEVplus.MagnetohydrodynamicallyConstrainedStarMatter);
ingotDouble.mNotGeneratedItems.add(MaterialsUEVplus.MagnetohydrodynamicallyConstrainedStarMatter);
ingotTriple.mNotGeneratedItems.add(MaterialsUEVplus.MagnetohydrodynamicallyConstrainedStarMatter);
Expand Down Expand Up @@ -860,6 +859,7 @@ public enum OrePrefixes {
nanite.mGeneratedItems.add(Materials.Glowstone);
nanite.mGeneratedItems.add(MaterialsUEVplus.Eternity);
nanite.mGeneratedItems.add(MaterialsUEVplus.SixPhasedCopper);
nanite.mGeneratedItems.add(MaterialsUEVplus.MagMatter);
// -----

gear.mGeneratedItems.add(MaterialsUEVplus.MagnetohydrodynamicallyConstrainedStarMatter);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package gregtech.api.recipe.maps;

import static gregtech.api.util.GTRecipeConstants.EU_MULTIPLIER;
import static gregtech.api.util.GTUtility.formatNumbers;

import java.util.List;
Expand Down Expand Up @@ -44,12 +45,13 @@ public List<Pos2d> getFluidOutputPositions(int fluidOutputCount) {
protected void drawEnergyInfo(RecipeDisplayInfo recipeInfo) {
// These look odd because recipeInfo.recipe.mEUt is actually the EU per litre of fluid processed, not
// the EU/t.
long multiplier = recipeInfo.recipe.getMetadataOrDefault(EU_MULTIPLIER, 10);
recipeInfo.drawText(
GTUtility.trans("152", "Total: ")
+ formatNumbers(1000L * recipeInfo.recipe.mDuration / 100L * recipeInfo.recipe.mEUt)
+ formatNumbers(multiplier * recipeInfo.recipe.mDuration * recipeInfo.recipe.mEUt)
+ " EU");
// 1000 / (20 ticks * 5 seconds) = 10L/t. 10L/t * x EU/L = 10 * x EU/t.
long averageUsage = 10L * recipeInfo.recipe.mEUt;
long averageUsage = multiplier * recipeInfo.recipe.mEUt;
recipeInfo.drawText(
"Average: " + formatNumbers(averageUsage) + " EU/t" + GTUtility.getTierNameWithParentheses(averageUsage));
}
Expand Down
3 changes: 3 additions & 0 deletions src/main/java/gregtech/api/util/GTRecipeConstants.java
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,9 @@ public class GTRecipeConstants {

public static final RecipeMetadataKey<Boolean> NO_GAS = SimpleRecipeMetadataKey.create(Boolean.class, "no_gas");

public static final RecipeMetadataKey<Integer> EU_MULTIPLIER = SimpleRecipeMetadataKey
.create(Integer.class, "eu_multiplier");

/**
* Add a arc furnace recipe. Adds to both normal arc furnace and plasma arc furnace.
* Will override the fluid input with oxygen/plasma for the respective recipe maps, so there is no point setting it.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
import gregtech.api.recipe.check.CheckRecipeResultRegistry;
import gregtech.api.render.TextureFactory;
import gregtech.api.util.GTRecipe;
import gregtech.api.util.GTRecipeConstants;
import gregtech.api.util.MultiblockTooltipBuilder;
import gregtech.api.util.OverclockCalculator;

Expand Down Expand Up @@ -179,7 +180,8 @@ protected ProcessingLogic createProcessingLogic() {
@Override
protected CheckRecipeResult validateRecipe(@Nonnull GTRecipe recipe) {
BigInteger availableEU = getUserEU(ownerUUID);
recipeEU = BigInteger.valueOf(10L * recipe.mEUt * recipe.mDuration);
long multiplier = (long) recipe.getMetadataOrDefault(GTRecipeConstants.EU_MULTIPLIER, 10);
recipeEU = BigInteger.valueOf(multiplier * recipe.mEUt * recipe.mDuration);
if (availableEU.compareTo(recipeEU) < 0) {
finalConsumption = BigInteger.ZERO;
return CheckRecipeResultRegistry.insufficientStartupPower(recipeEU);
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/gregtech/loaders/materials/MaterialsInit1.java
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ public static void load() {
Materials.Naquadah = new Materials( 324, TextureSet.SET_METALLIC , 6.0F, 1280, 4, 1|2 |8 |32|64|128 , 50, 50, 50, 0, "Naquadah" , "Naquadah" , 0, 0, 5400, 5400, true, false, 10, 1, 1, Dyes.dyeBlack , Element.Nq, Arrays.asList(new TCAspects.TC_AspectStack(TCAspects.METALLUM, 3), new TCAspects.TC_AspectStack(TCAspects.RADIO, 1), new TCAspects.TC_AspectStack(TCAspects.NEBRISUM, 1))).disableAutoGeneratedBlastFurnaceRecipes().disableAutoGeneratedVacuumFreezerRecipe();
Materials.NaquadahAlloy = new Materials( 325, TextureSet.SET_METALLIC , 8.0F, 5120, 5, 1|2 |64|128 , 40, 40, 40, 0, "NaquadahAlloy" , "Naquadah Alloy" , 0, 0, 7200, 7200, true, false, 10, 1, 1, Dyes.dyeBlack , Arrays.asList(new TCAspects.TC_AspectStack(TCAspects.METALLUM, 4), new TCAspects.TC_AspectStack(TCAspects.NEBRISUM, 1))).disableAutoGeneratedBlastFurnaceRecipes().disableAutoGeneratedVacuumFreezerRecipe();
Materials.NaquadahEnriched = new Materials( 326, TextureSet.SET_METALLIC , 6.0F, 1280, 4, 1|2 |8 |64 , 50, 50, 50, 0, "NaquadahEnriched" , "Enriched Naquadah" , 0, 0, 4500, 4500, true, false, 15, 1, 1, Dyes.dyeBlack , Arrays.asList(new TCAspects.TC_AspectStack(TCAspects.METALLUM, 3), new TCAspects.TC_AspectStack(TCAspects.RADIO, 2), new TCAspects.TC_AspectStack(TCAspects.NEBRISUM, 2))).disableAutoGeneratedBlastFurnaceRecipes().disableAutoGeneratedVacuumFreezerRecipe();
Materials.Naquadria = new Materials( 327, TextureSet.SET_SHINY , 1.0F, 512, 4, 1|2 |8 |64 , 30, 30, 30, 0, "Naquadria" , "Naquadria" , 0, 0, 9000, 9000, true, false, 20, 1, 1, Dyes.dyeBlack , Arrays.asList(new TCAspects.TC_AspectStack(TCAspects.METALLUM, 4), new TCAspects.TC_AspectStack(TCAspects.RADIO, 3), new TCAspects.TC_AspectStack(TCAspects.NEBRISUM, 3))).disableAutoGeneratedBlastFurnaceRecipes().disableAutoGeneratedVacuumFreezerRecipe();
Materials.Naquadria = new Materials( 327, TextureSet.SET_SHINY , 1.0F, 512, 4, 1|2 |8 |32|64 , 30, 30, 30, 0, "Naquadria" , "Naquadria" , 0, 0, 9000, 9000, true, false, 20, 1, 1, Dyes.dyeBlack , Arrays.asList(new TCAspects.TC_AspectStack(TCAspects.METALLUM, 4), new TCAspects.TC_AspectStack(TCAspects.RADIO, 3), new TCAspects.TC_AspectStack(TCAspects.NEBRISUM, 3))).disableAutoGeneratedBlastFurnaceRecipes().disableAutoGeneratedVacuumFreezerRecipe().setHasCorrespondingPlasma(true);
Materials.Nether = new Materials( -1, TextureSet.SET_NONE , 1.0F, 0, 1, 0 , 255, 255, 255, 0, "Nether" , "Nether" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes._NULL );
Materials.NetherBrick = new Materials( 814, TextureSet.SET_DULL , 1.0F, 0, 1, 1 , 100, 0, 0, 0, "NetherBrick" , "Nether Brick" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeRed , Collections.singletonList(new TCAspects.TC_AspectStack(TCAspects.IGNIS, 1)));
Materials.NetherQuartz = new Materials( 522, TextureSet.SET_QUARTZ , 1.0F, 32, 1, 1 |4|8 |64 , 230, 210, 210, 0, "NetherQuartz" , "Nether Quartz" , 0, 0, -1, 0, false, false, 2, 1, 1, Dyes.dyeWhite , Arrays.asList(new TCAspects.TC_AspectStack(TCAspects.POTENTIA, 1), new TCAspects.TC_AspectStack(TCAspects.VITREUS, 1)));
Expand Down Expand Up @@ -901,8 +901,8 @@ public static void load() {
Materials.AstralSilver = new Materials( 333, TextureSet.SET_SHINY , 10.0F, 64, 2, 1|2 |64 , 230, 230, 255, 0, "AstralSilver" , "Astral Silver" , 0, 0, -1, 0, false, false, 4, 3, 2, Dyes.dyeWhite , 2, Arrays.asList(new MaterialStack(Silver, 2), new MaterialStack(Thaumium, 1)));

Materials.InfinityCatalyst = new Materials( 394, TextureSet.SET_SHINY , 64.0F,1310720, 10, 1|2 |8 |64|128 , 255, 255, 255, 0, "InfinityCatalyst" , "Infinity Catalyst" , 5, 500000, 10800, 10800, true, false, 20, 1, 1, Dyes.dyeLightGray ).setProcessingMaterialTierEU(TierEU.RECIPE_UV).disableAutoGeneratedVacuumFreezerRecipe();
Materials.Infinity = new Materials( 397, new TextureSet("infinity", true), 256.0F,2621440, 17, 1|2 |64|128 , 255, 255, 255, 0, "Infinity" , "Infinity" , 5, 5000000, 10800, 10800, true, false, 40, 1, 1, Dyes.dyeLightGray ).setProcessingMaterialTierEU(TierEU.RECIPE_UV).disableAutoGeneratedVacuumFreezerRecipe();
Materials.Bedrockium = new MaterialBuilder(395,TextureSet.SET_DULL, "Bedrockium").addOreItems().addDustItems().addMetalItems().setDurability(327680).setToolSpeed(8f).setToolQuality(9).setRGB(50,50,50).setName("Bedrockium").setBlastFurnaceRequired(true).setBlastFurnaceTemp(9900).setMeltingPoint(9900).setMaterialList(new MaterialStack(Materials.SiliconDioxide, 26244), new MaterialStack(Materials.Diamond, 9)).setColor(Dyes.dyeBlack).setOreValue(4).setDensityDivider(1).setDensityMultiplier(1).constructMaterial().setProcessingMaterialTierEU(TierEU.RECIPE_EV).disableAutoGeneratedVacuumFreezerRecipe();
Materials.Infinity = new Materials( 397, new TextureSet("infinity", true), 256.0F,2621440, 17, 1|2|32|64|128 , 255, 255, 255, 0, "Infinity" , "Infinity" , 5, 5000000, 10800, 10800, true, false, 40, 1, 1, Dyes.dyeLightGray ).setProcessingMaterialTierEU(TierEU.RECIPE_UV).disableAutoGeneratedVacuumFreezerRecipe().setHasCorrespondingPlasma(true);
Materials.Bedrockium = new MaterialBuilder(395,TextureSet.SET_DULL, "Bedrockium").addOreItems().addDustItems().addPlasma().addMetalItems().setDurability(327680).setToolSpeed(8f).setToolQuality(9).setRGB(50,50,50).setName("Bedrockium").setBlastFurnaceRequired(true).setBlastFurnaceTemp(9900).setMeltingPoint(9900).setMaterialList(new MaterialStack(Materials.SiliconDioxide, 26244), new MaterialStack(Materials.Diamond, 9)).setColor(Dyes.dyeBlack).setOreValue(4).setDensityDivider(1).setDensityMultiplier(1).constructMaterial().setProcessingMaterialTierEU(TierEU.RECIPE_EV).disableAutoGeneratedVacuumFreezerRecipe().setHasCorrespondingPlasma(true);
Materials.Trinium = new Materials( 868, TextureSet.SET_SHINY , 128.0F, 51200, 8, 1|2 |8 |64|128 , 200, 200, 210, 0, "Trinium" , "Trinium" , 0, 0, 7200, 7200, true, false, 4, 1, 1, Dyes.dyeLightGray ).disableAutoGeneratedBlastFurnaceRecipes().disableAutoGeneratedVacuumFreezerRecipe();
Materials.Ichorium = new Materials( 978, TextureSet.SET_SHINY , 32.0F, 850000, 12, 1|2 |8 |32|64|128 , 211, 120, 6, 0, "Ichorium" , "Ichorium" , 5, 250000, 9000, 9000, true, false, 4, 1, 1, Dyes.dyeOrange ).setTurbineMultipliers(6, 6, 3).setHasCorrespondingPlasma(true);
Materials.CosmicNeutronium = new Materials( 982, TextureSet.SET_SHINY , 96.0F, 163840, 12, 1|2 |8 |32|64|128 , 50, 50, 50, 0, "CosmicNeutronium" , "Cosmic Neutronium" , 0, 0, 9900, 9900, true, false, 4, 1, 1, Dyes.dyeBlack ).setProcessingMaterialTierEU(TierEU.RECIPE_ZPM).disableAutoGeneratedVacuumFreezerRecipe().setHasCorrespondingPlasma(true);
Expand Down
18 changes: 18 additions & 0 deletions src/main/java/gregtech/loaders/postload/chains/NaniteChain.java
Original file line number Diff line number Diff line change
Expand Up @@ -262,5 +262,23 @@ public static void run() {
.eut(TierEU.RECIPE_MAX)
.addTo(nanoForgeRecipes);

// MagMatter nanites, currently only used in the production of Stargates.
GTValues.RA.stdBuilder()
.itemInputs(
GTOreDictUnificator.get(OrePrefixes.lens, Materials.Forcicium, 0, false),
GTOreDictUnificator.get(OrePrefixes.lens, Materials.Forcillium, 0, false),
MaterialsUEVplus.Universium.getNanite(1),
MaterialsUEVplus.MagMatter.getBlocks(8),
getModItem(NewHorizonsCoreMod.ID, "item.PicoWafer", 64),
GTOreDictUnificator.get(OrePrefixes.circuit, Materials.UXV, 1))
.itemOutputs(MaterialsUEVplus.MagMatter.getNanite(1))
.fluidInputs(
MaterialsUEVplus.QuarkGluonPlasma.getFluid(100_000),
MaterialsUEVplus.PhononMedium.getFluid(64_000),
MaterialsUEVplus.PrimordialMatter.getFluid(128_000))
.metadata(NANO_FORGE_TIER, 3)
.duration(16 * MINUTES + 40 * SECONDS)
.eut(TierEU.RECIPE_MAX)
.addTo(nanoForgeRecipes);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
import net.minecraftforge.fluids.FluidRegistry;
import net.minecraftforge.fluids.FluidStack;

import bartworks.common.loaders.ItemRegistry;
import gregtech.GTMod;
import gregtech.api.enums.Dyes;
import gregtech.api.enums.GTValues;
Expand Down Expand Up @@ -3600,6 +3601,28 @@ public void run() {
.duration(5 * SECONDS)
.eut(TierEU.RECIPE_UIV)
.addTo(assemblerRecipes);

GTValues.RA.stdBuilder()
.itemInputs(
ItemList.Hull_UV.get(1),
GTOreDictUnificator.get(OrePrefixes.stick, Materials.Americium, 2),
ItemList.Field_Generator_UV.get(2),
GTOreDictUnificator.get(OrePrefixes.wireGt12, Materials.Longasssuperconductornameforuhvwire, 2),
GTOreDictUnificator.get(OrePrefixes.circuit, Materials.UV, 2))
.itemOutputs(ItemList.Generator_Plasma_UV.get(1))
.duration(5 * SECONDS)
.eut(TierEU.RECIPE_HV)
.addTo(assemblerRecipes);

GTValues.RA.stdBuilder()
.itemInputs(
ItemList.Hull_UIV.get(1),
GTOreDictUnificator.get(OrePrefixes.plate, Materials.BlackPlutonium, 4),
GTOreDictUnificator.get(OrePrefixes.wireGt16, Materials.NetherStar, 4))
.itemOutputs(ItemRegistry.energyDistributor[11])
.duration(5 * SECONDS)
.eut(TierEU.RECIPE_HV)
.addTo(assemblerRecipes);
}

/**
Expand Down Expand Up @@ -7115,18 +7138,6 @@ public void withGalaxySpace() {
.duration(2 * MINUTES + 40 * SECONDS)
.eut(TierEU.RECIPE_UEV)
.addTo(assemblerRecipes);

GTValues.RA.stdBuilder()
.itemInputs(
GTOreDictUnificator.get(OrePrefixes.wireGt01, Materials.SuperconductorUMVBase, 33),
GTOreDictUnificator.get(OrePrefixes.pipeTiny, MaterialsUEVplus.SpaceTime, 22),
ItemList.Electric_Pump_UMV.get(1),
GTUtility.getIntegratedCircuit(9))
.itemOutputs(GTOreDictUnificator.get(OrePrefixes.wireGt01, Materials.SuperconductorUMV, 33))
.fluidInputs(new FluidStack(FluidRegistry.getFluid("liquid helium"), 36000))
.duration(2 * MINUTES + 40 * SECONDS)
.eut(TierEU.RECIPE_UMV)
.addTo(assemblerRecipes);
}

public void withGTNHLanthAndGTPP() {
Expand Down
Loading

0 comments on commit 544a7b3

Please sign in to comment.