aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorElisis <gtandemmodding@gmail.com>2024-11-24 10:14:22 +1100
committerGitHub <noreply@github.com>2024-11-23 23:14:22 +0000
commit9ce867e5aa95d2f8a8a809e33b3a0fb874e3b36b (patch)
tree96333d48657f7c07e03b2ce8d7367a0a2ccc7523 /src/main/java
parent2449dbf9168456d49f0cf29097ff780f6cd63deb (diff)
downloadGT5-Unofficial-9ce867e5aa95d2f8a8a809e33b3a0fb874e3b36b.tar.gz
GT5-Unofficial-9ce867e5aa95d2f8a8a809e33b3a0fb874e3b36b.tar.bz2
GT5-Unofficial-9ce867e5aa95d2f8a8a809e33b3a0fb874e3b36b.zip
Beamline fixes 4 (#3504)
Co-authored-by: BlueHero233 <jeleiacraft@gmail.com> Co-authored-by: Martin Robertz <dream-master@gmx.net> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Ethryan <3237986+Ethryan@users.noreply.github.com>
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/gtnhlanth/common/beamline/BeamLinePacket.java4
-rw-r--r--src/main/java/gtnhlanth/common/item/ItemPhotolithographicMask.java7
-rw-r--r--src/main/java/gtnhlanth/common/item/MaskList.java131
-rw-r--r--src/main/java/gtnhlanth/common/register/LanthItemList.java1
-rw-r--r--src/main/java/gtnhlanth/common/register/WerkstoffMaterialPool.java14
-rw-r--r--src/main/java/gtnhlanth/common/tileentity/MTELINAC.java48
-rw-r--r--src/main/java/gtnhlanth/common/tileentity/MTESourceChamber.java7
-rw-r--r--src/main/java/gtnhlanth/common/tileentity/MTESynchrotron.java119
-rw-r--r--src/main/java/gtnhlanth/common/tileentity/MTETargetChamber.java80
-rw-r--r--src/main/java/gtnhlanth/common/tileentity/recipe/beamline/BeamlineRecipeLoader.java110
-rw-r--r--src/main/java/gtnhlanth/loader/RecipeLoader.java75
11 files changed, 388 insertions, 208 deletions
diff --git a/src/main/java/gtnhlanth/common/beamline/BeamLinePacket.java b/src/main/java/gtnhlanth/common/beamline/BeamLinePacket.java
index 7137c6ab7d..fb7bab1f1d 100644
--- a/src/main/java/gtnhlanth/common/beamline/BeamLinePacket.java
+++ b/src/main/java/gtnhlanth/common/beamline/BeamLinePacket.java
@@ -16,9 +16,7 @@ public class BeamLinePacket extends DataPacket<BeamInformation> {
@Override
protected BeamInformation contentFromNBT(NBTTagCompound nbt) {
- /*
- * NBTTagCompound compound = nbt.getCompoundTag("beamline");
- */
+
return new BeamInformation(
nbt.getFloat("energy"),
nbt.getInteger("rate"),
diff --git a/src/main/java/gtnhlanth/common/item/ItemPhotolithographicMask.java b/src/main/java/gtnhlanth/common/item/ItemPhotolithographicMask.java
index 30cbac875b..c96212c8e6 100644
--- a/src/main/java/gtnhlanth/common/item/ItemPhotolithographicMask.java
+++ b/src/main/java/gtnhlanth/common/item/ItemPhotolithographicMask.java
@@ -23,9 +23,6 @@ public class ItemPhotolithographicMask extends Item implements ICanFocus {
this.setTextureName(Tags.MODID + ":photomask/" + name);
}
- /*
- * @Override public String getUnlocalizedName() { return "item.photomask." + this.name; }
- */
@SuppressWarnings({ "rawtypes", "unchecked" })
@Override
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean bool) {
@@ -33,6 +30,10 @@ public class ItemPhotolithographicMask extends Item implements ICanFocus {
if (!this.descSpectrum.isEmpty())
list.add("Suitable for the " + this.descSpectrum + " segment of the electromagnetic spectrum and lower");
+ if (this.getMaxDamage() > 0) // Not a precursor.
+ list.add("Max Uses: " + (this.getMaxDamage() + 1)); // maximum uses = max damage + 1 in general, as
+ // 0-durability masks still function
+
}
public String getDescSpectrum() {
diff --git a/src/main/java/gtnhlanth/common/item/MaskList.java b/src/main/java/gtnhlanth/common/item/MaskList.java
index 594180da22..ea132ca3ee 100644
--- a/src/main/java/gtnhlanth/common/item/MaskList.java
+++ b/src/main/java/gtnhlanth/common/item/MaskList.java
@@ -13,60 +13,94 @@ public enum MaskList {
// Use Dyes._NULL to indicate a wafer's lack of a dedicated lens instead of null, if the wafer's mask is to be
// generated
// Ignore last argument if using all wafers
- ERROR("error", "ERROR", 0, "", null, null, 0, 0, 0, 0, 0, null),
- BLANK1("blank1", "T1 Blank", 0, "VISIBLE", null, null, 0, 0, 0, 0, 0, null),
- BLANK2("blank2", "T2 Blank", 0, "UV", null, null, 0, 0, 0, 0, 0, null),
- BLANK3("blank3", "T3 Blank", 0, "X-RAY", null, null, 0, 0, 0, 0, 0, null),
+ // tcTargetItem specifies the target item used for non-wafer mask+TC recipes, e.g. crystal chips, set to null for
+ // wafer masks
+ ERROR("error", "ERROR", 0, "", null, null, 0, 0, 0, 0, 0, null, null),
+ BLANK1("blank1", "T1 Blank", 0, "VISIBLE", null, null, 0, 0, 0, 0, 0, null, null),
+ BLANK2("blank2", "T2 Blank", 0, "UV", null, null, 0, 0, 0, 0, 0, null, null),
+ BLANK3("blank3", "T3 Blank", 0, "X-RAY", null, null, 0, 0, 0, 0, 0, null, null),
+
+ CBLANK("cblank", "Crystal", 0, "X-RAY", null, null, 0, 0, 0, 0, 0, null, null), // Better at resolving smaller
+ // features, in theory
+
ILC("ilc", "Integrated Logic Circuit", 100, "", BLANK1, Dyes.dyeRed, TierEU.RECIPE_MV, 0.5e-3f, 4e-3f, 35, 1,
- ItemList.Circuit_Wafer_ILC.get(1)),
+ ItemList.Circuit_Wafer_ILC.get(1), null),
RAM("ram", "Random Access Memory", 200, "", BLANK1, Dyes.dyeCyan, TierEU.RECIPE_MV, 2e-3f, 4e-3f, 40, 2,
- ItemList.Circuit_Wafer_Ram.get(1), ItemList.Circuit_Silicon_Wafer),
+ ItemList.Circuit_Wafer_Ram.get(1), null, ItemList.Circuit_Silicon_Wafer),
NAND("nand", "NAND", 200, "", BLANK2, Dyes._NULL, TierEU.RECIPE_HV, 7e-3f, 12e-3f, 40, 1,
- ItemList.Circuit_Wafer_NAND.get(1), ItemList.Circuit_Silicon_Wafer), // NAND uses only Ender Pearl lens, don't
- // ask me why
- NOR("nor", "NOR", 100, "", BLANK2, Dyes._NULL, TierEU.RECIPE_LuV, 8e-3f, 10e-3f, 40, 1,
- ItemList.Circuit_Wafer_NOR.get(1), ItemList.Circuit_Silicon_Wafer, ItemList.Circuit_Silicon_Wafer2), // Same as
- // above,
- // but with
- // ender
- // eye
+ ItemList.Circuit_Wafer_NAND.get(1), null, ItemList.Circuit_Silicon_Wafer), // NAND uses only Ender Pearl lens,
+ // don't
+ // ask me why
+ NOR("nor", "NOR", 100, "", BLANK2, Dyes._NULL, TierEU.RECIPE_HV, 8e-3f, 10e-3f, 40, 1,
+ ItemList.Circuit_Wafer_NOR.get(1), null, ItemList.Circuit_Silicon_Wafer, ItemList.Circuit_Silicon_Wafer2), // Same
+ // as
+ // above,
+ // but with
+ // ender
+ // eye
CPU("cpu", "Central Processing Unit", 10, "", BLANK2, Dyes.dyeWhite, TierEU.RECIPE_MV, 6e-3f, 12e-3f, 45, 2,
- ItemList.Circuit_Wafer_CPU.get(1)),
+ ItemList.Circuit_Wafer_CPU.get(1), null),
+ PrCPU("prcpu", "Prepared Central Processing Unit", 0, "", CPU, null, TierEU.RECIPE_EV, 0, 0, 0, 0, null, null),
+
SOC("soc", "SoC", 150, "", BLANK2, Dyes.dyeYellow, TierEU.RECIPE_EV, 3e-3f, 10e-3f, 45, 2,
- ItemList.Circuit_Wafer_SoC.get(1), ItemList.Circuit_Silicon_Wafer, ItemList.Circuit_Silicon_Wafer2),
+ ItemList.Circuit_Wafer_SoC.get(1), null, ItemList.Circuit_Silicon_Wafer, ItemList.Circuit_Silicon_Wafer2),
ASOC("asoc", "Advanced SoC", 120, "", BLANK2, Dyes.dyeGreen, TierEU.RECIPE_EV, 100e-3f, 200e-3f, 50, 2,
- ItemList.Circuit_Wafer_SoC2.get(1), ItemList.Circuit_Silicon_Wafer, ItemList.Circuit_Silicon_Wafer2),
+ ItemList.Circuit_Wafer_SoC2.get(1), null, ItemList.Circuit_Silicon_Wafer, ItemList.Circuit_Silicon_Wafer2),
+
PIC("pic", "Power IC", 100, "", BLANK2, Dyes.dyeBlue, TierEU.RECIPE_HV, 5e-3f, 10e-3f, 50, 4,
- ItemList.Circuit_Wafer_PIC.get(1), ItemList.Circuit_Silicon_Wafer),
- HPIC("hpic", "High Power IC", 80, "", BLANK3, null, TierEU.RECIPE_IV, 100e-3f, 200e-3f, 50, 6,
- ItemList.Circuit_Wafer_HPIC.get(1), ItemList.Circuit_Silicon_Wafer), // Different, made in chemical reactor.
- // Figure out something for
- // this later?
- NCPU("ncpu", "NanoCPU", 60, "", BLANK2, null, TierEU.RECIPE_EV, 5e-3f, 10e-3f, 50, 4,
- ItemList.Circuit_Wafer_NanoCPU.get(1), ItemList.Circuit_Silicon_Wafer), // Same as above
- QBIT("qbit", "QBit", 50, "", BLANK2, null, TierEU.RECIPE_EV, 3e-3f, 10e-3f, 50, 4,
- ItemList.Circuit_Wafer_QuantumCPU.get(1), ItemList.Circuit_Silicon_Wafer), // ^
- UHPIC("uhpic", "Ultra High Power IC", 60, "", BLANK3, null, TierEU.RECIPE_LuV, 200e-3f, 400e-3f, 50, 8,
- ItemList.Circuit_Wafer_UHPIC.get(1), ItemList.Circuit_Silicon_Wafer, ItemList.Circuit_Silicon_Wafer2), // You
- // get
- // the
- // gist
+ ItemList.Circuit_Wafer_PIC.get(1), null, ItemList.Circuit_Silicon_Wafer),
+ PrPIC("prpic", "Prepared Power IC", 0, "", PIC, null, TierEU.RECIPE_IV, 0, 0, 0, 0, null, null), // Made in CR from
+ // PIC
+
+ HPIC("hpic", "High Power IC", 80, "", PrPIC, Dyes.dyeBlue, TierEU.RECIPE_IV, 100e-3f, 200e-3f, 50, 6,
+ ItemList.Circuit_Wafer_HPIC.get(1), null, ItemList.Circuit_Silicon_Wafer),
+ PrHPIC("prhpic", "Prepared High Power IC", 0, "", HPIC, null, TierEU.RECIPE_LuV, 0, 0, 0, 0, null, null), // Made in
+ // CR from
+ // HPIC
+
+ NCPU("ncpu", "NanoCPU", 60, "", PrCPU, Dyes.dyeWhite, TierEU.RECIPE_EV, 5e-3f, 10e-3f, 50, 4,
+ ItemList.Circuit_Wafer_NanoCPU.get(1), null, ItemList.Circuit_Silicon_Wafer),
+ PrNCPU("prncpu", "Prepared NanoCPU", 0, "", NCPU, null, TierEU.RECIPE_EV, 0, 0, 0, 0, null, null),
+
+ QBIT("qbit", "QBit", 50, "", PrNCPU, Dyes.dyeWhite, TierEU.RECIPE_EV, 3e-3f, 10e-3f, 50, 4,
+ ItemList.Circuit_Wafer_QuantumCPU.get(1), null, ItemList.Circuit_Silicon_Wafer), // ^
+ UHPIC("uhpic", "Ultra High Power IC", 60, "", PrHPIC, Dyes.dyeBlue, TierEU.RECIPE_LuV, 190e-3f, 400e-3f, 50, 8,
+ ItemList.Circuit_Wafer_UHPIC.get(1), null, ItemList.Circuit_Silicon_Wafer, ItemList.Circuit_Silicon_Wafer2),
SSOC("ssoc", "Simple SoC", 150, "", BLANK1, Dyes.dyeOrange, TierEU.RECIPE_MV, 2e-3f, 4e-3f, 25, 1,
- ItemList.Circuit_Wafer_Simple_SoC.get(1)),
+ ItemList.Circuit_Wafer_Simple_SoC.get(1), null),
ULPIC("ulpic", "Ultra Low Power IC", 200, "", BLANK1, Dyes.dyeGreen, TierEU.RECIPE_LV, 2e-3f, 4e-3f, 30, 1,
- ItemList.Circuit_Wafer_ULPIC.get(1)), // Can use green for this as well as asoc, given
+ ItemList.Circuit_Wafer_ULPIC.get(1), null), // Can use green for this as well as asoc, given
// the latter uses a different base mask
LPIC("lpic", "Low Power IC", 150, "", BLANK1, Dyes.dyeYellow, TierEU.RECIPE_MV, 2e-3f, 4e-3f, 30, 2,
- ItemList.Circuit_Wafer_LPIC.get(1)), // Same as above, except for yellow
- NPIC("npic", "Nano Power IC", 70, "", BLANK3, Dyes.dyeRed, TierEU.RECIPE_LuV, 1, 3000, 50, 4,
- ItemList.Circuit_Wafer_NPIC.get(1), ItemList.Circuit_Silicon_Wafer, ItemList.Circuit_Silicon_Wafer2,
+ ItemList.Circuit_Wafer_LPIC.get(1), null), // Same as above, except for yellow
+
+ NPIC("npic", "Nano Power IC", 70, "", BLANK2, Dyes.dyeRed, TierEU.RECIPE_LuV, 1, 4, 50, 4,
+ ItemList.Circuit_Wafer_NPIC.get(1), null, ItemList.Circuit_Silicon_Wafer, ItemList.Circuit_Silicon_Wafer2,
ItemList.Circuit_Silicon_Wafer3), // Same
- PPIC("ppic", "PPIC", 50, "", BLANK3, null, TierEU.RECIPE_ZPM, 1.5f, 10, 50, 6, ItemList.Circuit_Wafer_PPIC.get(1),
- ItemList.Circuit_Silicon_Wafer, ItemList.Circuit_Silicon_Wafer2, ItemList.Circuit_Silicon_Wafer3), // CR
- // recipe
- QPIC("qpic", "QPIC", 50, "", BLANK3, Dyes.dyeBlue, TierEU.RECIPE_UV, 5, 9, 50, 6,
- ItemList.Circuit_Wafer_QPIC.get(1), ItemList.Circuit_Silicon_Wafer, ItemList.Circuit_Silicon_Wafer2,
- ItemList.Circuit_Silicon_Wafer3, ItemList.Circuit_Silicon_Wafer4); // Different base mask to PIC
+ PrNPIC("prnpic", "Prepared Nano Power IC", 0, "", NPIC, null, TierEU.RECIPE_ZPM, 0, 0, 0, 0, null, null), // Made in
+ // CR from
+ // NPIC
+
+ PPIC("ppic", "PPIC", 50, "", PrNPIC, Dyes.dyeRed, TierEU.RECIPE_ZPM, 1.5f, 10, 50, 6,
+ ItemList.Circuit_Wafer_PPIC.get(1), null, ItemList.Circuit_Silicon_Wafer, ItemList.Circuit_Silicon_Wafer2,
+ ItemList.Circuit_Silicon_Wafer3),
+
+ QPIC("qpic", "QPIC", 50, "", BLANK3, Dyes.dyeBlue, TierEU.RECIPE_UV, 3.2f, 9, 50, 6,
+ ItemList.Circuit_Wafer_QPIC.get(1), null, ItemList.Circuit_Silicon_Wafer, ItemList.Circuit_Silicon_Wafer2,
+ ItemList.Circuit_Silicon_Wafer3, ItemList.Circuit_Silicon_Wafer4), // Different base mask to PIC
+
+ CCPU("ccpu", "Crystal Central Processing Unit", 100, "", CBLANK, Dyes.dyeGreen, 10_000, 1, 3, 50, 6,
+ ItemList.Circuit_Chip_CrystalCPU.get(1), ItemList.Circuit_Parts_Crystal_Chip_Elite.get(1)), // For producing
+ // Crystal CPUs from
+ // Engraved CCs
+ CSOC("csoc", "Crystal SoC", 100, "", CBLANK, Dyes.dyeBlue, 40_000, 2, 7, 50, 8,
+ ItemList.Circuit_Chip_CrystalSoC.get(1), ItemList.Circuit_Chip_CrystalCPU.get(1)),
+ ACC("acc", "Advanced Crystal Chip", 100, "", CBLANK, Dyes.dyeLime, 80_000, 3, 9, 55, 12,
+ ItemList.Circuit_Chip_CrystalSoC2.get(1), ItemList.Circuit_Chip_CrystalSoC.get(1)),
+ LCC("lcc", "Living Crystal Chip", 75, "", CBLANK, Dyes.dyeWhite, 160_000, 5, 12, 60, 16,
+ ItemList.Circuit_Parts_Crystal_Chip_Wetware.get(1), ItemList.Circuit_Chip_CrystalSoC2.get(1))
+
+ ;
String name;
String englishName;
@@ -85,17 +119,19 @@ public enum MaskList {
float minFocus;
int baselineAmount;
+ ItemStack tcTargetItem;
ItemStack producedItem;
ItemList[] forbiddenWafers;
- MaskList(String name, String englishName, int maxDamage, String spectrum, MaskList precursor, Dyes lensColour,
+ MaskList(String name, String englishName, int maxUses, String spectrum, MaskList precursor, Dyes lensColour,
long engraverEUt, float minEnergy, float maxEnergy, float minFocus, int baselineAmount, ItemStack producedItem,
- ItemList... forbiddenWafers) {
+ ItemStack tcTargetItem, ItemList... forbiddenWafers) {
this.name = name;
this.englishName = englishName;
this.spectrum = spectrum;
- this.maxDamage = maxDamage;
+ this.maxDamage = maxUses - 1; // 0-durability masks still function, so e.g. maxUses = 100 corresponds to
+ // durability levels 0-99
this.precursor = precursor;
this.lensColour = lensColour;
this.engraverEUt = engraverEUt;
@@ -103,6 +139,7 @@ public enum MaskList {
this.minEnergy = minEnergy;
this.maxEnergy = maxEnergy;
this.baselineAmount = baselineAmount;
+ this.tcTargetItem = tcTargetItem;
this.producedItem = producedItem;
this.forbiddenWafers = forbiddenWafers;
}
@@ -151,6 +188,10 @@ public enum MaskList {
return this.baselineAmount;
}
+ public ItemStack getTCTargetItem() {
+ return this.tcTargetItem;
+ }
+
public ItemStack getProducedItem() {
return this.producedItem;
}
diff --git a/src/main/java/gtnhlanth/common/register/LanthItemList.java b/src/main/java/gtnhlanth/common/register/LanthItemList.java
index 50069131d6..400c1a8638 100644
--- a/src/main/java/gtnhlanth/common/register/LanthItemList.java
+++ b/src/main/java/gtnhlanth/common/register/LanthItemList.java
@@ -70,7 +70,6 @@ public final class LanthItemList {
public static final Block COOLANT_DELIVERY_CASING = new BlockCasing("coolant_delivery");
- // public static final Block ANTENNA_CASING_T1 = new Casing("antenna_t1");
public static final Block ANTENNA_CASING_T1 = new BlockAntennaCasing(1);
public static final Block ANTENNA_CASING_T2 = new BlockAntennaCasing(2);
diff --git a/src/main/java/gtnhlanth/common/register/WerkstoffMaterialPool.java b/src/main/java/gtnhlanth/common/register/WerkstoffMaterialPool.java
index 125f0f283f..d35c444ff7 100644
--- a/src/main/java/gtnhlanth/common/register/WerkstoffMaterialPool.java
+++ b/src/main/java/gtnhlanth/common/register/WerkstoffMaterialPool.java
@@ -1945,7 +1945,7 @@ public class WerkstoffMaterialPool implements Runnable {
new short[] { 0, 0, 0 },
"Reactive-Ion Etching Mixture",
subscriptNumbers("CHF3/O2"),
- new Werkstoff.Stats().setCentrifuge(true),
+ new Werkstoff.Stats(),
Werkstoff.Types.MIXTURE,
new Werkstoff.GenerationFeatures().disable()
.addCells(),
@@ -2015,14 +2015,22 @@ public class WerkstoffMaterialPool implements Runnable {
offsetID3b + 10,
TextureSet.SET_FLUID);
+ public static final Werkstoff HotSuperCoolant = new Werkstoff(
+ new short[] { 155, 17, 30 },
+ "Hot Super Coolant",
+ new Werkstoff.Stats(),
+ Werkstoff.Types.MIXTURE,
+ new Werkstoff.GenerationFeatures().disable()
+ .addCells(),
+ offsetID3b + 11,
+ TextureSet.SET_FLUID);
+
public static void runInit() {
addSubTags();
}
private static void addSubTags() {
- // WerkstoffMaterialPool.PTMEGElastomer.add(SubTag.BOUNCY, SubTag.STRETCHY);
-
}
@Override
diff --git a/src/main/java/gtnhlanth/common/tileentity/MTELINAC.java b/src/main/java/gtnhlanth/common/tileentity/MTELINAC.java
index 7ae15db3aa..8fb3a54e92 100644
--- a/src/main/java/gtnhlanth/common/tileentity/MTELINAC.java
+++ b/src/main/java/gtnhlanth/common/tileentity/MTELINAC.java
@@ -195,7 +195,8 @@ public class MTELINAC extends MTEEnhancedMultiBlockBase<MTELINAC> implements ISu
}
- tt.addInfo("Requires (length + 1)kL/s of coolant")
+ tt.addInfo("Requires (length)kL/s of coolant")
+ .addSeparator()
.beginVariableStructureBlock(7, 7, 7, 7, 19, 83, false)
.addController("Front bottom")
.addCasingInfoRange(LanthItemList.SHIELDED_ACCELERATOR_CASING.getLocalizedName(), 325, 1285, false)
@@ -283,7 +284,8 @@ public class MTELINAC extends MTEEnhancedMultiBlockBase<MTELINAC> implements ISu
FluidStack primFluid = tFluidInputs.get(0);
// 1b (1000L)/m/operation
- final int fluidConsumed = 1000 * length;
+ final int fluidConsumed = 1000 * (length + 1); // length variable is technically physical length - 1, adding
+ // here so as to not affect existing math
this.mEfficiency = (10000 - (this.getIdealStatus() - this.getRepairStatus()) * 1000);
this.mEfficiencyIncrease = 10000;
@@ -307,8 +309,11 @@ public class MTELINAC extends MTEEnhancedMultiBlockBase<MTELINAC> implements ISu
}
mMaxProgresstime = 1 * TickTime.SECOND;
+
// Consume the input tier's corresponding practical voltage instead of the maximum suggested by the logic
- mEUt = (int) -GTValues.VP[(int) this.getInputVoltageTier()];
+ // 1A if one energy hatch, 4A if two
+ mEUt = (int) ((this.mEnergyHatches.size() == 1) ? -GTValues.VP[(int) this.getInputVoltageTier()]
+ : (int) (-this.getMaxInputAmps() * GTValues.VP[(int) this.getInputVoltageTier()]));
// Particle stays the same with this multiblock
outputParticle = particleId;
@@ -336,10 +341,8 @@ public class MTELINAC extends MTEEnhancedMultiBlockBase<MTELINAC> implements ISu
: inputFocus * (machineFocus / 100); // If input focus > machine focus, take the average of both, else
// weigh the former by the latter
- long voltage = this.getMaxInputVoltage();
- // voltageFactor = calculateVoltageFactor(voltage);
-
- // machineEnergy = Math.max(-((60) / this.length) * voltageFactor + 60_000, 2000); // Minimum of 2000keV
+ // 1A of full power if one energy hatch, 4A if two
+ long voltage = (this.mEnergyHatches.size() == 1) ? this.getMaxInputVoltage() : this.getMaxInputPower();
machineEnergy = (float) Math.max(length / 4 * Math.pow(voltage, 1.0 / 3.0), 50); // Minimum of 50keV
@@ -347,13 +350,6 @@ public class MTELINAC extends MTEEnhancedMultiBlockBase<MTELINAC> implements ISu
.getEnergy();
inputEnergy = Math.min(inputEnergy, 7500); // Does not scale past 7500 keV, prevents double LINAC issue
- /*
- * outputEnergy = Math.min(
- * (1 + inputEnergy / Particle.getParticleFromId(outputParticle)
- * .maxSourceEnergy()) * machineEnergy,
- * 120_000); // TODO more complex calculation than just
- * // addition
- */
outputEnergy = (float) Math.pow(
10,
@@ -408,7 +404,6 @@ public class MTELINAC extends MTEEnhancedMultiBlockBase<MTELINAC> implements ISu
@Override
public void stopMachine() {
- // GTLog.out.print("Machine stopped");
outputFocus = 0;
outputEnergy = 0;
outputParticle = 0;
@@ -445,6 +440,10 @@ public class MTELINAC extends MTEEnhancedMultiBlockBase<MTELINAC> implements ISu
BeamInformation information = this.getInputInformation();
+ if (information == null) {
+ information = new BeamInformation(0, 0, 0, 0);
+ }
+
return new String[] {
/* 1 */ StatCollector.translateToLocal("GT5U.multiblock.Progress") + ": "
+ EnumChatFormatting.GREEN
@@ -473,7 +472,9 @@ public class MTELINAC extends MTEEnhancedMultiBlockBase<MTELINAC> implements ISu
+ EnumChatFormatting.YELLOW
+ GTUtility.formatNumbers(getMaxInputVoltage())
+ EnumChatFormatting.RESET
- + " EU/t(*2A) "
+ + " EU/t(*"
+ + getMaxInputAmps()
+ + "A)"
+ StatCollector.translateToLocal("GT5U.machines.tier")
+ ": "
+ EnumChatFormatting.YELLOW
@@ -503,7 +504,7 @@ public class MTELINAC extends MTEEnhancedMultiBlockBase<MTELINAC> implements ISu
StatCollector.translateToLocal("beamline.coolusage") + ": " // Coolant usage:
+ EnumChatFormatting.AQUA
- + length
+ + (length + 1)
+ EnumChatFormatting.RESET
+ " kL/s", // e.g. "24 kL/s
@@ -558,7 +559,6 @@ public class MTELINAC extends MTEEnhancedMultiBlockBase<MTELINAC> implements ISu
// Will it matter? No :boubs_glasses:
if (in.q == null) return new BeamInformation(0, 0, 0, 0);
- // if (in.q == null) return new BeamInformation(10000, 10, 0, 90); // temporary for testing purposes
return in.q.getContent();
}
@@ -569,13 +569,6 @@ public class MTELINAC extends MTEEnhancedMultiBlockBase<MTELINAC> implements ISu
return (float) Math.pow(1.1, 0.2 * fluidTemp);
}
- /*
- * private static float calculateVoltageFactor(long voltage) {
- * float factor = (float) Math.pow(1.00009, -(0.1 * voltage - 114000));
- * return factor;
- * }
- */
-
@Override
public String[] getStructureDescription(ItemStack arg0) {
return DescTextLocalization.addText("LINAC.hint", 11);
@@ -612,8 +605,6 @@ public class MTELINAC extends MTEEnhancedMultiBlockBase<MTELINAC> implements ISu
length += 2;
}
- // if (!checkPiece(STRUCTURE_PIECE_END, 3, 6, -length)) return false;
-
// Likely off by one or two, not visible to player however so doesn't particularly matter
length += 8;
@@ -635,9 +626,6 @@ public class MTELINAC extends MTEEnhancedMultiBlockBase<MTELINAC> implements ISu
}
for (int i = -8; i > -lLength - 1; i -= 2) {
-
- // GTLog.out.print("Building inner piece! i = " + i);
-
buildPiece(STRUCTURE_PIECE_LAYER, stackSize, hintsOnly, 3, 6, i);
}
diff --git a/src/main/java/gtnhlanth/common/tileentity/MTESourceChamber.java b/src/main/java/gtnhlanth/common/tileentity/MTESourceChamber.java
index 8fb94d505c..5c69bae5a8 100644
--- a/src/main/java/gtnhlanth/common/tileentity/MTESourceChamber.java
+++ b/src/main/java/gtnhlanth/common/tileentity/MTESourceChamber.java
@@ -154,15 +154,10 @@ public class MTESourceChamber extends MTEEnhancedMultiBlockBase<MTESourceChamber
return false;
}
- /*
- * protected OverclockDescriber createOverclockDescriber() { return new EUNoTotalOverclockDescriber((byte) 4, 1); }
- */
@Override
public boolean checkRecipe(ItemStack itemStack) {
- // GTLog.out.print("In checkRecipe");
-
// No input particle, so no input quantities
outputFocus = 0;
@@ -172,7 +167,7 @@ public class MTESourceChamber extends MTEEnhancedMultiBlockBase<MTESourceChamber
ItemStack[] tItems = this.getStoredInputs()
.toArray(new ItemStack[0]);
- // GTLog.out.print(Arrays.toString(tItems));
+
long tVoltageMaxTier = this.getMaxInputVoltage(); // Used to keep old math the same
long tVoltageActual = GTValues.VP[(int) this.getInputVoltageTier()];
diff --git a/src/main/java/gtnhlanth/common/tileentity/MTESynchrotron.java b/src/main/java/gtnhlanth/common/tileentity/MTESynchrotron.java
index dfecdcd71e..2d8f0c2f08 100644
--- a/src/main/java/gtnhlanth/common/tileentity/MTESynchrotron.java
+++ b/src/main/java/gtnhlanth/common/tileentity/MTESynchrotron.java
@@ -4,6 +4,7 @@ import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock;
import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlockAdder;
import static gregtech.api.enums.GTValues.VN;
import static gregtech.api.enums.HatchElement.Energy;
+import static gregtech.api.enums.HatchElement.ExoticEnergy;
import static gregtech.api.enums.HatchElement.InputHatch;
import static gregtech.api.enums.HatchElement.Maintenance;
import static gregtech.api.enums.HatchElement.OutputHatch;
@@ -40,9 +41,11 @@ import gregtech.api.enums.TickTime;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.metatileentity.implementations.MTEEnhancedMultiBlockBase;
+import gregtech.api.metatileentity.implementations.MTEExtendedPowerMultiBlockBase;
+import gregtech.api.metatileentity.implementations.MTEHatch;
import gregtech.api.metatileentity.implementations.MTEHatchEnergy;
import gregtech.api.render.TextureFactory;
+import gregtech.api.util.ExoticEnergyInputHelper;
import gregtech.api.util.GTUtility;
import gregtech.api.util.MultiblockTooltipBuilder;
import gregtech.api.util.shutdown.ShutDownReason;
@@ -58,7 +61,7 @@ import gtnhlanth.common.tileentity.recipe.beamline.BeamlineRecipeLoader;
import gtnhlanth.util.DescTextLocalization;
import gtnhlanth.util.Util;
-public class MTESynchrotron extends MTEEnhancedMultiBlockBase<MTESynchrotron> implements ISurvivalConstructable {
+public class MTESynchrotron extends MTEExtendedPowerMultiBlockBase<MTESynchrotron> implements ISurvivalConstructable {
private static final IStructureDefinition<MTESynchrotron> STRUCTURE_DEFINITION;
@@ -79,6 +82,8 @@ public class MTESynchrotron extends MTEEnhancedMultiBlockBase<MTESynchrotron> im
private int energyHatchTier;
+ private boolean usingExotic = false;
+
private int antennaeTier;
private Byte glassTier;
@@ -440,7 +445,9 @@ public class MTESynchrotron extends MTEEnhancedMultiBlockBase<MTESynchrotron> im
).addElement('c', ofBlock(LanthItemList.SHIELDED_ACCELERATOR_CASING, 0))
.addElement('k', ofBlock(GregTechAPI.sBlockCasings1, 15)) // Superconducting coils
.addElement('d', ofBlock(LanthItemList.COOLANT_DELIVERY_CASING, 0))
- .addElement('e', buildHatchAdder(MTESynchrotron.class).atLeast(ImmutableMap.of(Energy, 4)).dot(6).casingIndex(CASING_INDEX).build())
+
+ // Adder overriden due to ExoticEnergy originally calling its own adder, giving false positives
+ .addElement('e', buildHatchAdder(MTESynchrotron.class).atLeast(ImmutableMap.of(Energy.or(ExoticEnergy), 4)).adder(MTESynchrotron::addEnergyInputToMachineList).dot(6).casingIndex(CASING_INDEX).build())
.addElement('n', ofBlock(LanthItemList.NIOBIUM_CAVITY_CASING, 0))
.addElement('a', ofBlockAdder(MTESynchrotron::addAntenna, LanthItemList.ANTENNA_CASING_T1, 0)) //Antenna Casings
.addElement('i', buildHatchAdder(MTESynchrotron.class).atLeast(ImmutableMap.of(InputHatch, 2)).dot(4).casingIndex(CASING_INDEX).build())
@@ -475,6 +482,8 @@ public class MTESynchrotron extends MTEEnhancedMultiBlockBase<MTESynchrotron> im
private int machineTemp;
+ private long energyHatchAmperage;
+
public MTESynchrotron(String aName) {
super(aName);
}
@@ -620,19 +629,64 @@ public class MTESynchrotron extends MTEEnhancedMultiBlockBase<MTESynchrotron> im
}
IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
if (aMetaTileEntity == null) return false;
- if (aMetaTileEntity instanceof MTEHatchEnergy hatch) {
- // First energy hatch added
- if (this.mEnergyHatches.isEmpty()) this.energyHatchTier = hatch.mTier;
+ boolean firstHatch = false;
+ if (this.mEnergyHatches.isEmpty() && this.mExoticEnergyHatches.isEmpty()) firstHatch = true;
+
+ if (aMetaTileEntity instanceof MTEHatch hatch) {
+
+ if (firstHatch) {
+
+ this.energyHatchTier = hatch.mTier;
+ this.energyHatchAmperage = hatch.maxWorkingAmperesIn();
+
+ }
// Disallow any hatches that don't match the tier of the first hatch added
if (hatch.mTier != this.energyHatchTier) return false;
- hatch.updateTexture(aBaseCasingIndex);
- hatch.updateCraftingIcon(this.getMachineCraftingIcon());
- return mEnergyHatches.add(hatch);
+ if (hatch.maxWorkingAmperesIn() != this.energyHatchAmperage) // Prevent mixing amperages within a tier
+ return false;
+
+ if (aMetaTileEntity instanceof MTEHatchEnergy hatchNormal) {
+
+ if (usingExotic) // usingExotic defaults to false, only set when known to be using exotics
+ return false; // If exotics are already being used, disallow non-exotics
+
+ hatchNormal.updateTexture(aBaseCasingIndex);
+ hatchNormal.updateCraftingIcon(this.getMachineCraftingIcon());
+ return mEnergyHatches.add(hatchNormal);
+
+ } else if (aMetaTileEntity instanceof MTEHatch hatchExotic
+ && ExoticEnergyInputHelper.isExoticEnergyInput(aMetaTileEntity)) {
+
+ if (firstHatch) usingExotic = true;
+
+ if (!usingExotic) return false; // If normal hatches are already being used, disallow exotics
+
+ hatchExotic.updateTexture(aBaseCasingIndex);
+ hatchExotic.updateCraftingIcon(this.getMachineCraftingIcon());
+ return mExoticEnergyHatches.add(hatchExotic);
+
+ } else {
+ return false; // Not an energy hatch
+ }
+ } else {
+ return false; // Not a hatch of any kind
}
- return false;
+
+ /*
+ * if (aMetaTileEntity instanceof MTEHatchEnergy hatch) {
+ * // First energy hatch added
+ * if (this.mEnergyHatches.isEmpty()) this.energyHatchTier = hatch.mTier;
+ * // Disallow any hatches that don't match the tier of the first hatch added
+ * if (hatch.mTier != this.energyHatchTier) return false;
+ * hatch.updateTexture(aBaseCasingIndex);
+ * hatch.updateCraftingIcon(this.getMachineCraftingIcon());
+ * return mEnergyHatches.add(hatch);
+ * }
+ * return false;
+ */
}
private boolean addAntenna(Block block, int meta) {
@@ -715,9 +769,11 @@ public class MTESynchrotron extends MTEEnhancedMultiBlockBase<MTESynchrotron> im
mMaxProgresstime = TickTime.SECOND;
- long voltage = this.getMaxInputVoltage();
- mEUt = (int) (-voltage / GTValues.V[(int) this.getInputVoltageTier()]
- * GTValues.VP[(int) this.getInputVoltageTier()]); // Multiply VP by amps
+ long voltage = 0;
+
+ voltage = this.getMaxInputEu();
+
+ lEUt = -GTValues.VP[GTUtility.getTier(this.getAverageInputVoltage())] * this.getMaxInputAmps();
outputParticle = 1; // Photon
@@ -766,7 +822,7 @@ public class MTESynchrotron extends MTEEnhancedMultiBlockBase<MTESynchrotron> im
outputRate = (int) (inputRate * getOutputRatetio(voltageFactor, this.antennaeTier));
if (outputRate == 0) {
- stopMachine(SimpleShutDownReason.ofCritical("gtnhlanth.low_input_rate"));
+ stopMachine(SimpleShutDownReason.ofCritical("gtnhlanth.low_input_eut"));
return false;
}
@@ -841,7 +897,6 @@ public class MTESynchrotron extends MTEEnhancedMultiBlockBase<MTESynchrotron> im
for (MTEHatchInputBeamline in : this.mInputBeamline) {
if (in.q == null) return new BeamInformation(0, 0, 0, 0);
- // if (in.q == null) return new BeamInformation(10000, 10, 0, 90); // TODO temporary for testing purposes
return in.q.getContent();
}
@@ -857,10 +912,6 @@ public class MTESynchrotron extends MTEEnhancedMultiBlockBase<MTESynchrotron> im
return (float) (Math.sqrt(mEU) / 1500);
}
- /*
- * private static float getTemperatureFactor(int temperature) { float factor = (float) Math.pow(1.11, 0.18 *
- * temperature); return factor; }
- */
private static double calculateOutputParticleEnergy(long voltage, double inputParticleEnergy, int antennaTier) {
/*
@@ -905,17 +956,19 @@ public class MTESynchrotron extends MTEEnhancedMultiBlockBase<MTESynchrotron> im
long storedEnergy = 0;
long maxEnergy = 0;
- for (MTEHatchEnergy tHatch : mEnergyHatches) {
- if (tHatch.isValid()) {
- storedEnergy += tHatch.getBaseMetaTileEntity()
- .getStoredEU();
- maxEnergy += tHatch.getBaseMetaTileEntity()
- .getEUCapacity();
- }
+ for (MTEHatch tHatch : getExoticAndNormalEnergyHatchList()) {
+ storedEnergy += tHatch.getBaseMetaTileEntity()
+ .getStoredEU();
+ maxEnergy += tHatch.getBaseMetaTileEntity()
+ .getEUCapacity();
}
BeamInformation information = this.getInputInformation();
+ if (information == null) {
+ information = new BeamInformation(0, 0, 0, 0);
+ }
+
return new String[] {
/* 1 */ StatCollector.translateToLocal("GT5U.multiblock.Progress") + ": "
+ EnumChatFormatting.GREEN
@@ -942,13 +995,15 @@ public class MTESynchrotron extends MTEEnhancedMultiBlockBase<MTESynchrotron> im
+ " EU/t",
/* 4 */ StatCollector.translateToLocal("GT5U.multiblock.mei") + ": "
+ EnumChatFormatting.YELLOW
- + GTUtility.formatNumbers(getMaxInputVoltage())
+ + GTUtility.formatNumbers(getAverageInputVoltage())
+ EnumChatFormatting.RESET
- + " EU/t(*2A) "
+ + " EU/t(*"
+ + getMaxInputAmps()
+ + "A)"
+ StatCollector.translateToLocal("GT5U.machines.tier")
+ ": "
+ EnumChatFormatting.YELLOW
- + VN[GTUtility.getTier(getMaxInputVoltage())]
+ + VN[GTUtility.getTier(getAverageInputVoltage())]
+ EnumChatFormatting.RESET,
/* 5 */ StatCollector.translateToLocal("GT5U.multiblock.problems") + ": "
+ EnumChatFormatting.RED
@@ -1035,7 +1090,11 @@ public class MTESynchrotron extends MTEEnhancedMultiBlockBase<MTESynchrotron> im
this.mAntennaCasings.clear();
this.mEnergyHatches.clear();
+ this.mExoticEnergyHatches.clear();
this.energyHatchTier = 0;
+ this.energyHatchAmperage = 0;
+ this.usingExotic = false;
+
this.antennaeTier = 0;
this.glassTier = 0;
@@ -1050,7 +1109,7 @@ public class MTESynchrotron extends MTEEnhancedMultiBlockBase<MTESynchrotron> im
return this.mInputBeamline.size() == 1 && this.mOutputBeamline.size() == 1
&& this.mMaintenanceHatches.size() == 1
- && this.mEnergyHatches.size() == 4
+ && (this.mEnergyHatches.size() == 4 || this.mExoticEnergyHatches.size() == 4)
&& this.glassTier >= MIN_GLASS_TIER;
}
diff --git a/src/main/java/gtnhlanth/common/tileentity/MTETargetChamber.java b/src/main/java/gtnhlanth/common/tileentity/MTETargetChamber.java
index ffc16fddf0..988bf1fd5c 100644
--- a/src/main/java/gtnhlanth/common/tileentity/MTETargetChamber.java
+++ b/src/main/java/gtnhlanth/common/tileentity/MTETargetChamber.java
@@ -272,15 +272,7 @@ public class MTETargetChamber extends MTEEnhancedMultiBlockBase<MTETargetChamber
})
.find();
- if (tRecipe == null || !tRecipe.isRecipeInputEqual(true, new FluidStack[] {}, tItemsWithFocusItemArray))
- return false;
-
- if (tRecipe.focusItem != null) {
- if (tRecipe.focusItem.getItem() != tFocusItem.getItem()) return false;
- }
-
- this.mEfficiency = (10000 - (this.getIdealStatus() - this.getRepairStatus()) * 1000);
- this.mEfficiencyIncrease = 10000;
+ if (tRecipe == null) return false;
BeamInformation inputInfo = this.getInputInformation();
@@ -297,23 +289,72 @@ public class MTETargetChamber extends MTEEnhancedMultiBlockBase<MTETargetChamber
if (inputParticle != tRecipe.particleId) return false;
- this.mMaxProgresstime = Math.max(Math.round((tRecipe.amount / inputRate * 5 * TickTime.SECOND)), 1); // 5
- // seconds
- // per
+ if (tRecipe.focusItem != null) {
+ if (tRecipe.focusItem.getItem() != tFocusItem.getItem()) return false;
+ }
+
+ int focusDurabilityDepletion = 1;
+
+ float progressTime = tRecipe.amount / inputRate * 5 * TickTime.SECOND;
+
+ int batchAmount = 1;
+
+ if (progressTime < 1) { // Subticking
+
+ batchAmount = (int) Math.round(1.0 / progressTime);
+
+ if (tRecipe.focusItem != null) {
+ int maskLimit = tFocusItem.getMaxDamage() - tFocusItem.getItemDamage() + 1;
+
+ if (batchAmount > maskLimit) batchAmount = maskLimit; // Limited by mask durability first, if it's
+ // present in recipe. Assume mask is present in
+ // machine from above condition
+ }
+
+ progressTime = 1;
+ }
+
+ this.mMaxProgresstime = (int) progressTime; // 5
+ // seconds
+ // per
// integer multiple
// over the rate. E.g., 100a, 10r
// would equal 50 seconds
+
if (this.mMaxProgresstime == Integer.MAX_VALUE - 1 && this.mEUt == Integer.MAX_VALUE - 1) return false;
+ double maxParallel = tRecipe
+ .maxParallelCalculatedByInputs(batchAmount, new FluidStack[] {}, tItemsWithFocusItemArray);
+
+ if (maxParallel < 1) // Insufficient items
+ return false;
+
+ if (batchAmount > maxParallel) batchAmount = (int) maxParallel;
+
+ tRecipe.consumeInput(batchAmount, new FluidStack[] {}, tItemsWithFocusItemArray);
+
+ focusDurabilityDepletion = batchAmount;
+
+ ItemStack[] itemOutputArray = GTUtility.copyItemArray(tRecipe.mOutputs);
+
+ for (ItemStack stack : itemOutputArray) {
+
+ stack.stackSize *= batchAmount;
+
+ }
+
+ this.mEfficiency = (10000 - (this.getIdealStatus() - this.getRepairStatus()) * 1000);
+ this.mEfficiencyIncrease = 10000;
+
mEUt = (int) -tVoltage;
if (this.mEUt > 0) this.mEUt = (-this.mEUt);
- this.mOutputItems = tRecipe.mOutputs;
+ this.mOutputItems = itemOutputArray;
if (tRecipe.focusItem != null) // Recipe actually uses the mask, can also assume machine mask item is nonnull
// due to above conditions
mInputFocus.get(0)
- .depleteFocusDurability(1);
+ .depleteFocusDurability(focusDurabilityDepletion);
this.updateSlots();
@@ -325,9 +366,6 @@ public class MTETargetChamber extends MTEEnhancedMultiBlockBase<MTETargetChamber
for (MTEHatchInputBeamline in : this.mInputBeamline) {
if (in.q == null) return new BeamInformation(0, 0, 0, 0);
- // if (in.q == null) return new BeamInformation(10, 10, Particle.PHOTON.ordinal(), 90); // temporary
- // for
- // testing purposes
return in.q.getContent();
}
@@ -337,6 +375,10 @@ public class MTETargetChamber extends MTEEnhancedMultiBlockBase<MTETargetChamber
private ItemStack getFocusItemStack() {
for (MTEBusInputFocus hatch : this.mInputFocus) {
+
+ if (hatch.getContentUsageSlots()
+ .isEmpty()) return null;
+
return hatch.getContentUsageSlots()
.get(0);
}
@@ -400,6 +442,10 @@ public class MTETargetChamber extends MTEEnhancedMultiBlockBase<MTETargetChamber
BeamInformation information = this.getInputInformation();
+ if (information == null) {
+ information = new BeamInformation(0, 0, 0, 0);
+ }
+
return new String[] {
/* 1 */ StatCollector.translateToLocal("GT5U.multiblock.Progress") + ": "
+ EnumChatFormatting.GREEN
diff --git a/src/main/java/gtnhlanth/common/tileentity/recipe/beamline/BeamlineRecipeLoader.java b/src/main/java/gtnhlanth/common/tileentity/recipe/beamline/BeamlineRecipeLoader.java
index d71b9a571e..f0b170bb4a 100644
--- a/src/main/java/gtnhlanth/common/tileentity/recipe/beamline/BeamlineRecipeLoader.java
+++ b/src/main/java/gtnhlanth/common/tileentity/recipe/beamline/BeamlineRecipeLoader.java
@@ -11,6 +11,7 @@ import net.minecraftforge.fluids.FluidRegistry;
import gregtech.api.enums.ItemList;
import gregtech.api.enums.Materials;
import gregtech.api.enums.OrePrefixes;
+import gregtech.api.enums.TierEU;
import gregtech.api.util.GTOreDictUnificator;
import gregtech.api.util.GTUtility;
import gtPlusPlus.core.material.MaterialsElements;
@@ -50,7 +51,7 @@ public class BeamlineRecipeLoader {
Materials.SuperCoolant.getFluid(1L)
.getFluid()
.getName(),
- Materials.Water.getFluid(1L)
+ WerkstoffMaterialPool.HotSuperCoolant.getFluidOrGas(1000)
.getFluid());
/*
@@ -111,59 +112,74 @@ public class BeamlineRecipeLoader {
if (mask.getProducedItem() == null) // Blank or error
continue;
- int index = 0;
- for (ItemList wafer : VIABLE_WAFERS) {
-
- index++;
-
- if (!Arrays.asList(mask.getForbiddenWafers())
- .contains(wafer)) {
-
- BeamlineRecipeAdder2.instance.addTargetChamberRecipe(
- wafer.get(1),
- GTUtility.copyAmountUnsafe((int) Math.pow(2, index + 2), mask.getProducedItem()),
- new ItemStack(LanthItemList.maskMap.get(mask), 0),
- 1,
- mask.getBaselineAmount() * (int) Math.pow(Math.sqrt(3), index - 1), // 3x recipe amount increase
- // per 2 increases in wafer
- // tier. This greatly
- // incentivises the use of
- // higher tier boule wafer
- // recipes
- mask.getMinEnergy(),
- mask.getMaxEnergy(),
- mask.getMinFocus(),
- 1,
- 1920);
+ if (mask.getTCTargetItem() == null) { // Wafer TC recipe
+
+ int index = 0;
+ for (ItemList wafer : VIABLE_WAFERS) {
+
+ index++;
+
+ if (!Arrays.asList(mask.getForbiddenWafers())
+ .contains(wafer)) {
+
+ BeamlineRecipeAdder2.instance.addTargetChamberRecipe(
+ wafer.get(1),
+ GTUtility.copyAmountUnsafe((int) Math.pow(2, index + 2), mask.getProducedItem()),
+ new ItemStack(LanthItemList.maskMap.get(mask), 0),
+ 1,
+ (int) Math.round(mask.getBaselineAmount() * Math.pow(Math.sqrt(2), index - 1)), // 2x recipe
+ // amount
+ // increase
+ // per 2 increases in wafer
+ // tier. This greatly
+ // incentivises the use of
+ // higher tier boule wafer
+ // recipes
+ mask.getMinEnergy(),
+ mask.getMaxEnergy(),
+ mask.getMinFocus(),
+ 1,
+ 1920);
+
+ }
}
+ continue;
+
}
- /*
- * if (!Arrays.asList(MaskList.CPU.getForbiddenWafers()).contains(wafer)) {
- * BeamlineRecipeAdder.instance.addTargetChamberRecipe( wafer.get(1), GT_Utility.copyAmountUnsafe((int)
- * Math.pow(2, index + 2), ItemList.Circuit_Wafer_CPU.get(1)), //Varies new
- * ItemStack(LanthItemList.maskMap.get(MaskList.CPU), 0), // Varies 0, 10 * (int) Math.pow(2, index - 1), //
- * Varies 1, //Varies 10000000, //Varies 50, //Varies 1, 1920 ); } /* PPIC
- */
-
- /*
- * if (!Arrays.asList(MaskList.PPIC.getForbiddenWafers()).contains(wafer)) {
- * GTLog.out.print("Adding recipe for PPIC with " + wafer.get(1).getUnlocalizedName() + " amount: " + 40 *
- * (int) Math.pow(2, index - 1)); BeamlineRecipeAdder.instance.addTargetChamberRecipe( wafer.get(1),
- * ItemList.Circuit_Wafer_PPIC.get((int) Math.pow(2, index + 2)), //Varies new
- * ItemStack(LanthItemList.maskMap.get(MaskList.PPIC), 0), // Varies 0, 40 * (int) Math.pow(2, index - 1),
- * // Varies 1, //Varies 10000000, //Varies 50, //Varies 1, 1920 ); }
- */
+ // Non-wafer recipes
+
+ BeamlineRecipeAdder2.instance.addTargetChamberRecipe(
+ GTUtility.copyAmountUnsafe(1, mask.getTCTargetItem()),
+ GTUtility.copyAmountUnsafe(4, mask.getProducedItem()),
+ new ItemStack(LanthItemList.maskMap.get(mask), 0),
+ 1,
+ mask.getBaselineAmount(),
+ mask.getMinEnergy(),
+ mask.getMaxEnergy(),
+ mask.getMinFocus(),
+ 1,
+ (int) TierEU.RECIPE_LuV);
}
- /*
- * BeamlineRecipeAdder2.instance.addTargetChamberRecipe( new ItemStack(Items.coal, 1), new
- * ItemStack(Items.diamond, 1), null, 1, 20, 100, 1000, 60, 1, 1920);
- * BeamlineRecipeAdder2.instance.addTargetChamberRecipe( new ItemStack(Items.coal, 1), new
- * ItemStack(Items.cooked_chicken, 1), null, 1, 20, 1, 10, 60, 1, 1920);
- */
+
+ /* LuAG */
+
+ // Raw Advanced Crystal Chip
+
+ BeamlineRecipeAdder2.instance.addTargetChamberRecipe(
+ WerkstoffMaterialPool.CeriumDopedLutetiumAluminiumGarnet.get(OrePrefixes.gemExquisite, 1),
+ GTUtility.copyAmountUnsafe(64, ItemList.Circuit_Chip_CrystalSoC.get(1)),
+ new ItemStack(LanthItemList.maskMap.get(MaskList.CSOC), 0),
+ 1,
+ 24,
+ 5,
+ 12,
+ 60,
+ 1,
+ (int) TierEU.RECIPE_LuV);
BeamlineRecipeAdder2.instance.addTargetChamberRecipe(
new ItemStack(Items.chicken, 1),
diff --git a/src/main/java/gtnhlanth/loader/RecipeLoader.java b/src/main/java/gtnhlanth/loader/RecipeLoader.java
index 91800b6a68..282d92fd55 100644
--- a/src/main/java/gtnhlanth/loader/RecipeLoader.java
+++ b/src/main/java/gtnhlanth/loader/RecipeLoader.java
@@ -147,6 +147,7 @@ import gregtech.api.util.GTRecipeBuilder;
import gregtech.api.util.GTRecipeConstants;
import gregtech.api.util.GTUtility;
import gregtech.mixin.interfaces.accessors.IRecipeMutableAccess;
+import gtPlusPlus.core.item.ModItems;
import gtnhlanth.Tags;
import gtnhlanth.common.item.MaskList;
import gtnhlanth.common.register.BotWerkstoffMaterialPool;
@@ -567,6 +568,15 @@ public class RecipeLoader {
.addTo(mixerRecipes);
GTValues.RA.stdBuilder()
+ .fluidInputs(WerkstoffMaterialPool.FluoroformOxygenMix.getFluidOrGas(5000))
+ .itemInputs(Materials.Empty.getCells(4))
+ .fluidOutputs(WerkstoffMaterialPool.Fluoroform.getFluidOrGas(3000))
+ .itemOutputs(Materials.Oxygen.getCells(4))
+ .duration(5 * GTRecipeBuilder.SECONDS)
+ .eut(TierEU.RECIPE_HV)
+ .addTo(centrifugeRecipes);
+
+ GTValues.RA.stdBuilder()
.itemInputs(Materials.Iron.getDust(2), Materials.NetherQuartz.getPlates(1))
.itemOutputs(new ItemStack(LanthItemList.IRON_COATED_QUARTZ))
.duration(10 * GTRecipeBuilder.SECONDS)
@@ -673,6 +683,19 @@ public class RecipeLoader {
.specialValue(3600)
.addTo(blastFurnaceRecipes);
+ GTValues.RA.stdBuilder()
+ .itemInputs(
+ new ItemStack(LanthItemList.ETCHED_MASK_1, 4),
+ Materials.Glass.getPlates(2),
+ new ItemStack(ModItems.dustLithiumHydroxide, 2),
+ Materials.Epoxid.getDust(4))
+ .fluidInputs(Materials.Hydrogen.getGas(2000))
+ .itemOutputs(new ItemStack(LanthItemList.maskMap.get(MaskList.CBLANK)))
+ .duration(4 * GTRecipeBuilder.MINUTES)
+ .eut(TierEU.RECIPE_ZPM)
+ .specialValue(4200)
+ .addTo(blastFurnaceRecipes);
+
for (MaskList mask : MaskList.values()) {
MaskList maskIngredient = mask.getPrecursor();
@@ -682,66 +705,65 @@ public class RecipeLoader {
if (mask.getLensColour() == null) { // CR Recipe
- if (mask == MaskList.PPIC) {
+ if (mask == MaskList.PrPIC) {
GTValues.RA.stdBuilder()
.itemInputs(
- new ItemStack(LanthItemList.maskMap.get(MaskList.NPIC)),
- Materials.IndiumGalliumPhosphide.getDust(64))
- .fluidInputs(Materials.Sunnarium.getMolten(1440L))
- .itemOutputs(new ItemStack(LanthItemList.maskMap.get(MaskList.PPIC)))
+ new ItemStack(LanthItemList.maskMap.get(MaskList.PIC)),
+ Materials.IndiumGalliumPhosphide.getDust(2))
+ .fluidInputs(Materials.VanadiumGallium.getMolten(288L))
+ .itemOutputs(new ItemStack(LanthItemList.maskMap.get(MaskList.PrPIC)))
.duration(60 * GTRecipeBuilder.SECONDS)
.eut(mask.getEngraverEUt())
.requiresCleanRoom()
- .addTo(UniversalChemical); // This is incredibly boring and doesn't make much sense, fix at some
- // point. Maybe engrave again from precursor?
+ .addTo(UniversalChemical);
- } else if (mask == MaskList.HPIC) {
+ } else if (mask == MaskList.PrHPIC) {
GTValues.RA.stdBuilder()
.itemInputs(
- new ItemStack(LanthItemList.maskMap.get(MaskList.PIC)),
- Materials.IndiumGalliumPhosphide.getDust(2))
- .fluidInputs(Materials.VanadiumGallium.getMolten(288L))
- .itemOutputs(new ItemStack(LanthItemList.maskMap.get(MaskList.HPIC)))
+ new ItemStack(LanthItemList.maskMap.get(MaskList.HPIC)),
+ Materials.IndiumGalliumPhosphide.getDust(8))
+ .fluidInputs(Materials.Naquadah.getMolten(576))
+ .itemOutputs(new ItemStack(LanthItemList.maskMap.get(MaskList.PrHPIC)))
.duration(60 * GTRecipeBuilder.SECONDS)
.eut(mask.getEngraverEUt())
.requiresCleanRoom()
.addTo(UniversalChemical);
- } else if (mask == MaskList.UHPIC) {
+ } else if (mask == MaskList.PrNPIC) {
GTValues.RA.stdBuilder()
.itemInputs(
- new ItemStack(LanthItemList.maskMap.get(MaskList.HPIC)),
- Materials.IndiumGalliumPhosphide.getDust(8))
- .fluidInputs(Materials.Naquadah.getMolten(576L))
- .itemOutputs(new ItemStack(LanthItemList.maskMap.get(MaskList.UHPIC)))
+ new ItemStack(LanthItemList.maskMap.get(MaskList.NPIC)),
+ Materials.IndiumGalliumPhosphide.getDust(64))
+ .fluidInputs(Materials.Sunnarium.getMolten(1440L))
+ .itemOutputs(new ItemStack(LanthItemList.maskMap.get(MaskList.PrNPIC)))
.duration(60 * GTRecipeBuilder.SECONDS)
.eut(mask.getEngraverEUt())
.requiresCleanRoom()
.addTo(UniversalChemical);
- } else if (mask == MaskList.NCPU) {
+ } else if (mask == MaskList.PrCPU) {
GTValues.RA.stdBuilder()
.itemInputs(
new ItemStack(LanthItemList.maskMap.get(MaskList.CPU)),
GTUtility.copyAmount(16, Ic2Items.carbonFiber))
.fluidInputs(Materials.Glowstone.getMolten(576L))
- .itemOutputs(new ItemStack(LanthItemList.maskMap.get(MaskList.NCPU)))
+ .itemOutputs(new ItemStack(LanthItemList.maskMap.get(MaskList.PrCPU)))
.duration(60 * GTRecipeBuilder.SECONDS)
.eut(mask.getEngraverEUt())
.requiresCleanRoom()
.addTo(UniversalChemical);
- } else if (mask == MaskList.QBIT) {
+ } else if (mask == MaskList.PrNCPU) {
GTValues.RA.stdBuilder()
.itemInputs(
new ItemStack(LanthItemList.maskMap.get(MaskList.NCPU)),
Materials.IndiumGalliumPhosphide.getDust(1))
.fluidInputs(Materials.Radon.getGas(50L))
- .itemOutputs(new ItemStack(LanthItemList.maskMap.get(MaskList.QBIT)))
+ .itemOutputs(new ItemStack(LanthItemList.maskMap.get(MaskList.PrNCPU)))
.duration(60 * GTRecipeBuilder.SECONDS)
.eut(mask.getEngraverEUt())
.requiresCleanRoom()
@@ -750,7 +772,7 @@ public class RecipeLoader {
GTValues.RA.stdBuilder()
.itemInputs(new ItemStack(LanthItemList.maskMap.get(MaskList.NCPU)), ItemList.QuantumEye.get(2))
.fluidInputs(Materials.GalliumArsenide.getMolten(288L))
- .itemOutputs(new ItemStack(LanthItemList.maskMap.get(MaskList.QBIT)))
+ .itemOutputs(new ItemStack(LanthItemList.maskMap.get(MaskList.PrNCPU)))
.duration(45 * GTRecipeBuilder.SECONDS)
.eut(mask.getEngraverEUt())
.requiresCleanRoom()
@@ -1068,7 +1090,7 @@ public class RecipeLoader {
GTValues.RA.stdBuilder()
.fluidInputs(Materials.Water.getFluid(3000))
.fluidOutputs(Materials.HydrochloricAcid.getFluid(6000))
- .itemInputs(WerkstoffMaterialPool.LanthaniumChloride.get(OrePrefixes.dust, 4))
+ .itemInputs(WerkstoffMaterialPool.LanthaniumChloride.get(OrePrefixes.dust, 8))
.itemOutputs(WerkstoffMaterialPool.LanthanumOxide.get(OrePrefixes.dust, 1))
.duration(10 * GTRecipeBuilder.SECONDS)
.eut(TierEU.RECIPE_HV)
@@ -3397,6 +3419,13 @@ public class RecipeLoader {
.eut(64)
.addTo(fluidSolidifierRecipes);
+ GTValues.RA.stdBuilder()
+ .fluidInputs(WerkstoffMaterialPool.HotSuperCoolant.getFluidOrGas(1000))
+ .fluidOutputs(Materials.SuperCoolant.getFluid(1000))
+ .duration(10 * SECONDS)
+ .eut(TierEU.RECIPE_EV)
+ .addTo(vacuumFreezerRecipes);
+
// TODO Cerium-doped Lutetium Aluminium Garnet (Ce:LuAG)
/**
* 1/9 Ce + 3 Lu + 5 Sapphire = 8 LuAG Blend 1/9 Ce + 3 Lu + 10 Green Sapphire = 8 LuAG Blend 2/9 Ce + 6 Lu + 25