aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/api/util
diff options
context:
space:
mode:
authorConnor-Colenso <52056774+Connor-Colenso@users.noreply.github.com>2023-01-25 05:22:14 +0000
committerGitHub <noreply@github.com>2023-01-25 05:22:14 +0000
commitd9f473283fa606662f57bbafdd49be37728b0eb0 (patch)
tree3797db9d52f714a5686675ba8a4b5d67c4ce6680 /src/main/java/gregtech/api/util
parente197a79a0558c6ce1b116d871a71a214962a01a3 (diff)
downloadGT5-Unofficial-d9f473283fa606662f57bbafdd49be37728b0eb0.tar.gz
GT5-Unofficial-d9f473283fa606662f57bbafdd49be37728b0eb0.tar.bz2
GT5-Unofficial-d9f473283fa606662f57bbafdd49be37728b0eb0.zip
EOH materials + Allow materials to pick their processing tier (#1671)
* Begin addition of tiered material manipulation * Dwarf matter * Add hardcoded EU tiers for wider usage. * New material images etc * Nugget processing tiers * Move iron nugget to wrought iron smelting to the correct place * Add white dwarf shapes * Add white dwarf shapes * Additional retiering options for EU consumption on material part generation * White dwarf matter complete * Tier neutronium processing at ZPM * Spotless * More adjustments * Renaming files * Add new overlays for magneto material and more name adjustments * Add no recipes subtag * Spotless + name adjustment * Undo isCustom to maintain potential public variable references in addons. * Undo isCustom to maintain potential public variable references in addons. * Fix fluid registry corruption. * Add rotor EU override * Add rotor EU override * Make neutronium mass more reasonable * Add proper time adjustments to rotor (probably an old oversight) * Adjust enums to use VP rather than recalculate * Fix typos on EU usage * spotlessApply (#1672) Co-authored-by: Connor-Colenso <52056774+Connor-Colenso@users.noreply.github.com> Co-authored-by: GitHub GTNH Actions <> * Change setProcessingMaterialTierEU to accept long. * Small fix * Add space and time materials * Add new forge hammer support * Update tooltip * Expand laser engraver slots. * spotlessApply (#1673) Co-authored-by: Connor-Colenso <52056774+Connor-Colenso@users.noreply.github.com> Co-authored-by: GitHub GTNH Actions <> * Reserve texture page. * Modernise GT circuit usage * Add oversight in assembler frame recipe * Add missing MHDCSM overlay textures * Remove small and tiny MHDCSM dusts * Fix error in ingot texture * Fix NO_RECIPES not applying to frame boxes * Restore missing ingot * Add rod handles for materials * Fix frame box auto generating with NO_RECIPEs tag * recipe * Spotless * Add MOD_ID_GTPP as modid * spotlessApply (#1675) Co-authored-by: Connor-Colenso <52056774+Connor-Colenso@users.noreply.github.com> Co-authored-by: GitHub GTNH Actions <> * Remove smelting spacetime from furnace (why does this exist?) * Recipes + new storage blocks for materials * Bedrockium LuV -> EV * SpaceTime UMV -> UIV * TranscendentMetal UIV -> UEV * MagnetoThingy and dward mats UXV -> UMV * update buildscript * yeet magic number that could be * spotlessApply * Make the nanite tier 3, colen request * Up nanite tier * Comment * Change name * Change name Co-authored-by: GTNH-Colen <54497873+GTNH-Colen@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: adam riondy <adampoplol@gmail.com> Co-authored-by: boubou19 <miisterunknown@gmail.com>
Diffstat (limited to 'src/main/java/gregtech/api/util')
-rw-r--r--src/main/java/gregtech/api/util/GT_Recipe.java13
-rw-r--r--src/main/java/gregtech/api/util/GT_RecipeRegistrator.java20
-rw-r--r--src/main/java/gregtech/api/util/GT_Utility.java6
3 files changed, 24 insertions, 15 deletions
diff --git a/src/main/java/gregtech/api/util/GT_Recipe.java b/src/main/java/gregtech/api/util/GT_Recipe.java
index 21d7d6ea3e..8ed8b5a9ff 100644
--- a/src/main/java/gregtech/api/util/GT_Recipe.java
+++ b/src/main/java/gregtech/api/util/GT_Recipe.java
@@ -1392,8 +1392,8 @@ public class GT_Recipe implements Comparable<GT_Recipe> {
"Precision Laser Engraver",
null,
RES_PATH_GUI + "basicmachines/LaserEngraverNEI",
- 2,
- 1,
+ 4,
+ 4,
0,
0,
1,
@@ -2122,14 +2122,15 @@ public class GT_Recipe implements Comparable<GT_Recipe> {
true)
.setSlotOverlay(false, false, false, GT_UITextures.OVERLAY_SLOT_EXTRUDER_SHAPE)
.setProgressBar(GT_UITextures.PROGRESSBAR_EXTRUDE, ProgressBar.Direction.RIGHT);
+
public static final GT_Recipe_Map sHammerRecipes = new GT_Recipe_Map(
new HashSet<>(3800),
"gt.recipe.hammer",
"Forge Hammer",
null,
RES_PATH_GUI + "basicmachines/Hammer",
- 1,
- 1,
+ 2,
+ 2,
1,
0,
1,
@@ -2138,6 +2139,8 @@ public class GT_Recipe implements Comparable<GT_Recipe> {
E,
true,
true)
+ .setUsualFluidInputCount(2)
+ .setUsualFluidOutputCount(2)
.setSlotOverlay(false, false, GT_UITextures.OVERLAY_SLOT_HAMMER)
.setProgressBar(GT_UITextures.PROGRESSBAR_HAMMER, ProgressBar.Direction.DOWN)
.addSpecialTexture(20, 6, 78, 42, GT_UITextures.PROGRESSBAR_HAMMER_BASE)
@@ -2473,7 +2476,7 @@ public class GT_Recipe implements Comparable<GT_Recipe> {
false,
true)
.useModularUI(true)
- .setUsualFluidInputCount(1)
+ .setUsualFluidInputCount(3)
.setSlotOverlay(false, false, true, GT_UITextures.OVERLAY_SLOT_LENS)
.setProgressBar(GT_UITextures.PROGRESSBAR_ASSEMBLE, ProgressBar.Direction.RIGHT);
diff --git a/src/main/java/gregtech/api/util/GT_RecipeRegistrator.java b/src/main/java/gregtech/api/util/GT_RecipeRegistrator.java
index d6751ebd84..8a28b686c5 100644
--- a/src/main/java/gregtech/api/util/GT_RecipeRegistrator.java
+++ b/src/main/java/gregtech/api/util/GT_RecipeRegistrator.java
@@ -3,6 +3,7 @@ package gregtech.api.util;
import static gregtech.api.enums.GT_Values.*;
import static gregtech.api.enums.Materials.*;
import static gregtech.api.enums.Materials.Void;
+import static gregtech.api.util.GT_Utility.calculateRecipeEU;
import com.google.common.collect.HashMultimap;
import com.google.common.collect.ImmutableList;
@@ -159,7 +160,8 @@ public class GT_RecipeRegistrator {
|| !aData.hasValidMaterialData()
|| !aData.mMaterial.mMaterial.mAutoGenerateRecycleRecipes
|| aData.mMaterial.mAmount <= 0
- || GT_Utility.getFluidForFilledItem(aStack, false) != null) return;
+ || GT_Utility.getFluidForFilledItem(aStack, false) != null
+ || aData.mMaterial.mMaterial.mSubTags.contains(SubTag.NO_RECIPES)) return;
registerReverseMacerating(GT_Utility.copyAmount(1, aStack), aData, aData.mPrefix == null);
registerReverseSmelting(
GT_Utility.copyAmount(1, aStack), aData.mMaterial.mMaterial, aData.mMaterial.mAmount, true);
@@ -232,10 +234,12 @@ public class GT_RecipeRegistrator {
|| aMaterial == null
|| aMaterialAmount <= 0
|| aMaterial.contains(SubTag.NO_SMELTING)
- || (aMaterialAmount > M && aMaterial.contains(SubTag.METAL))) return;
- aMaterialAmount /= aStack.stackSize;
+ || (aMaterialAmount > M && aMaterial.contains(SubTag.METAL))
+ || (aMaterial.getProcessingMaterialTierEU() > Tier.IV)) return;
if (aMaterial == Materials.Naquadah || aMaterial == Materials.NaquadahEnriched) return;
+ aMaterialAmount /= aStack.stackSize;
+
boolean tHide = (aMaterial != Materials.Iron) && (GT_Mod.gregtechproxy.mHideRecyclingRecipes);
if (aAllowAlloySmelter)
GT_ModHandler.addSmeltingAndAlloySmeltingRecipe(
@@ -597,12 +601,6 @@ public class GT_RecipeRegistrator {
aItemData.mMaterial.mMaterial + "." + sShapesA[i][0],
true)) {
if (null != (tStack = GT_ModHandler.removeRecipe(tRecipe.shape))) {
- //
- // GT_Log.out.println("###################################################################################");
- // GT_Log.out.println("registerStickStuff used
- // aPlate: "+aPlate);
- //
- // GT_Log.out.println("###################################################################################");
switch (sShapesA[i].length) {
case 2:
GT_ModHandler.addCraftingRecipe(
@@ -658,9 +656,11 @@ public class GT_RecipeRegistrator {
* @param aMaterial material to register
* @param baseDuration base duration ticks for ingot -> 1x wire recipe
* @param aEUt EU/t for recipe
+ * If you provide a proper EU tier for recipe processing then aEUt will be overriden with it.
*/
public static void registerWiremillRecipes(Materials aMaterial, int baseDuration, int aEUt) {
- registerWiremillRecipes(aMaterial, baseDuration, aEUt, OrePrefixes.ingot, OrePrefixes.stick, 2);
+ registerWiremillRecipes(
+ aMaterial, baseDuration, calculateRecipeEU(aMaterial, aEUt), OrePrefixes.ingot, OrePrefixes.stick, 2);
}
/**
diff --git a/src/main/java/gregtech/api/util/GT_Utility.java b/src/main/java/gregtech/api/util/GT_Utility.java
index ee4a92b1a4..51efb8a9a7 100644
--- a/src/main/java/gregtech/api/util/GT_Utility.java
+++ b/src/main/java/gregtech/api/util/GT_Utility.java
@@ -1926,6 +1926,12 @@ public class GT_Utility {
return copyAmount(1, tData.filledContainer);
}
+ public static int calculateRecipeEU(Materials aMaterial, int defaultRecipeEUPerTick) {
+ return aMaterial.getProcessingMaterialTierEU() == 0
+ ? defaultRecipeEUPerTick
+ : aMaterial.getProcessingMaterialTierEU();
+ }
+
public static ItemStack getFluidDisplayStack(Fluid aFluid) {
return aFluid == null ? null : getFluidDisplayStack(new FluidStack(aFluid, 0), false);
}