diff options
author | Elisis <gtandemmodding@gmail.com> | 2024-08-24 05:18:09 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-23 19:18:09 +0000 |
commit | 71e7f3dc16a7be69a3f89c17a170d401383bf021 (patch) | |
tree | 2b4f74c3edfdefc2152fb0dd245916e6eb3222f5 /src/main/java/com/elisis/gtnhlanth/common | |
parent | 0dc1b9feefc03c16efe66e14c5b8707214693658 (diff) | |
download | GT5-Unofficial-71e7f3dc16a7be69a3f89c17a170d401383bf021.tar.gz GT5-Unofficial-71e7f3dc16a7be69a3f89c17a170d401383bf021.tar.bz2 GT5-Unofficial-71e7f3dc16a7be69a3f89c17a170d401383bf021.zip |
General beamline fixes, balancing (#2899)
* Remove cell chemistry, increase tiering of recipes from mask-making process
* Fix LN2 and LOX in LINAC and Synchrotron
* Fix Synchrotron structure definition antenna having a different meta to the actual block
* Fix Accelerator Glass Hardness
* Fix mobs spawning inside Synchrotron, make LiB6 rods less painful to make
* Halve TC base recipe duration, loosen focus requirements for lower-tier wafers, add more detail to LINAC TT
* Improve LINAC output energy eu/t scaling
* Remove log
* Spotless
* Remove merge artifact
* Spotless apply for branch beamline-fixes-2 for #2899 (#2900)
spotlessApply
Co-authored-by: GitHub GTNH Actions <>
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Martin Robertz <dream-master@gmx.net>
Co-authored-by: Connor-Colenso <52056774+Connor-Colenso@users.noreply.github.com>
Diffstat (limited to 'src/main/java/com/elisis/gtnhlanth/common')
8 files changed, 136 insertions, 68 deletions
diff --git a/src/main/java/com/elisis/gtnhlanth/common/block/ShieldedAccGlass.java b/src/main/java/com/elisis/gtnhlanth/common/block/ShieldedAccGlass.java index 41bebcf170..a114cead69 100644 --- a/src/main/java/com/elisis/gtnhlanth/common/block/ShieldedAccGlass.java +++ b/src/main/java/com/elisis/gtnhlanth/common/block/ShieldedAccGlass.java @@ -3,6 +3,7 @@ package com.elisis.gtnhlanth.common.block; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.entity.EnumCreatureType; +import net.minecraft.init.Blocks; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; @@ -54,6 +55,11 @@ public class ShieldedAccGlass extends Block { } @Override + public float getBlockHardness(World aWorld, int aX, int aY, int aZ) { + return Blocks.glass.getBlockHardness(aWorld, aX, aY, aZ); + } + + @Override @SideOnly(Side.CLIENT) public boolean shouldSideBeRendered(IBlockAccess worldClient, int xCoord, int yCoord, int zCoord, int aSide) { if (worldClient.getBlock(xCoord, yCoord, zCoord) instanceof ShieldedAccGlass) return false; diff --git a/src/main/java/com/elisis/gtnhlanth/common/item/MaskList.java b/src/main/java/com/elisis/gtnhlanth/common/item/MaskList.java index bbc2d1c18a..18423565ca 100644 --- a/src/main/java/com/elisis/gtnhlanth/common/item/MaskList.java +++ b/src/main/java/com/elisis/gtnhlanth/common/item/MaskList.java @@ -4,6 +4,7 @@ import net.minecraft.item.ItemStack; import gregtech.api.enums.Dyes; import gregtech.api.enums.ItemList; +import gregtech.api.enums.TierEU; public enum MaskList { @@ -12,53 +13,60 @@ 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, null), - BLANK1("blank1", "T1 Blank", 0, "VISIBLE", null, null, 0, 0, 0, 0, null), - BLANK2("blank2", "T2 Blank", 0, "UV", null, null, 0, 0, 0, 0, null), - BLANK3("blank3", "T3 Blank", 0, "X-RAY", null, null, 0, 0, 0, 0, null), - ILC("ilc", "Integrated Logic Circuit", 100, "", BLANK1, Dyes.dyeRed, 0.5e-3f, 4e-3f, 50, 1, + 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), + 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)), - RAM("ram", "Random Access Memory", 200, "", BLANK1, Dyes.dyeCyan, 2e-3f, 4e-3f, 60, 2, + 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), - NAND("nand", "NAND", 200, "", BLANK2, Dyes._NULL, 7e-3f, 12e-3f, 50, 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, 8e-3f, 10e-3f, 50, 1, ItemList.Circuit_Wafer_NOR.get(1), - ItemList.Circuit_Silicon_Wafer, ItemList.Circuit_Silicon_Wafer2), // Same as above, but with ender eye - CPU("cpu", "Central Processing Unit", 10, "", BLANK2, Dyes.dyeWhite, 6e-3f, 12e-3f, 50, 2, + 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 + CPU("cpu", "Central Processing Unit", 10, "", BLANK2, Dyes.dyeWhite, TierEU.RECIPE_MV, 6e-3f, 12e-3f, 45, 2, ItemList.Circuit_Wafer_CPU.get(1)), - SOC("soc", "SoC", 150, "", BLANK2, Dyes.dyeYellow, 3e-3f, 10e-3f, 50, 2, ItemList.Circuit_Wafer_SoC.get(1), - ItemList.Circuit_Silicon_Wafer, ItemList.Circuit_Silicon_Wafer2), - ASOC("asoc", "Advanced SoC", 120, "", BLANK2, Dyes.dyeGreen, 100e-3f, 200e-3f, 50, 2, + 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), + 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), - PIC("pic", "Power IC", 100, "", BLANK2, Dyes.dyeBlue, 5e-3f, 10e-3f, 50, 4, ItemList.Circuit_Wafer_PIC.get(1), - ItemList.Circuit_Silicon_Wafer), - HPIC("hpic", "High Power IC", 80, "", BLANK3, null, 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 + 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, 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, 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, 200e-3f, 400e-3f, 50, 8, + 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 - SSOC("ssoc", "Simple SoC", 150, "", BLANK1, Dyes.dyeOrange, 2e-3f, 4e-3f, 50, 1, + SSOC("ssoc", "Simple SoC", 150, "", BLANK1, Dyes.dyeOrange, TierEU.RECIPE_MV, 2e-3f, 4e-3f, 25, 1, ItemList.Circuit_Wafer_Simple_SoC.get(1)), - ULPIC("ulpic", "Ultra Low Power IC", 200, "", BLANK1, Dyes.dyeGreen, 2e-3f, 4e-3f, 50, 1, + 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 // the latter uses a different base mask - LPIC("lpic", "Low Power IC", 150, "", BLANK1, Dyes.dyeYellow, 2e-3f, 4e-3f, 50, 2, + 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, 1, 100000, 50, 4, ItemList.Circuit_Wafer_NPIC.get(1), - ItemList.Circuit_Silicon_Wafer, ItemList.Circuit_Silicon_Wafer2, ItemList.Circuit_Silicon_Wafer3), // Same - PPIC("ppic", "PPIC", 50, "", BLANK3, null, 10, 15, 50, 6, ItemList.Circuit_Wafer_PPIC.get(1), + NPIC("npic", "Nano Power IC", 70, "", BLANK3, Dyes.dyeRed, TierEU.RECIPE_LuV, 1, 100000, 50, 4, + ItemList.Circuit_Wafer_NPIC.get(1), ItemList.Circuit_Silicon_Wafer, ItemList.Circuit_Silicon_Wafer2, + ItemList.Circuit_Silicon_Wafer3), // Same + PPIC("ppic", "PPIC", 50, "", BLANK3, null, TierEU.RECIPE_ZPM, 10, 15, 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, 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 + 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 String name; String englishName; @@ -69,6 +77,8 @@ public enum MaskList { MaskList precursor; Dyes lensColour; + long engraverEUt; + float minEnergy; float maxEnergy; @@ -80,7 +90,7 @@ public enum MaskList { ItemList[] forbiddenWafers; MaskList(String name, String englishName, int maxDamage, String spectrum, MaskList precursor, Dyes lensColour, - float minEnergy, float maxEnergy, float minFocus, int baselineAmount, ItemStack producedItem, + long engraverEUt, float minEnergy, float maxEnergy, float minFocus, int baselineAmount, ItemStack producedItem, ItemList... forbiddenWafers) { this.name = name; this.englishName = englishName; @@ -88,6 +98,7 @@ public enum MaskList { this.maxDamage = maxDamage; this.precursor = precursor; this.lensColour = lensColour; + this.engraverEUt = engraverEUt; this.minFocus = minFocus; this.minEnergy = minEnergy; this.maxEnergy = maxEnergy; @@ -120,6 +131,10 @@ public enum MaskList { return this.lensColour; } + public long getEngraverEUt() { + return this.engraverEUt; + } + public float getMinEnergy() { return this.minEnergy; } diff --git a/src/main/java/com/elisis/gtnhlanth/common/register/LanthItemList.java b/src/main/java/com/elisis/gtnhlanth/common/register/LanthItemList.java index 1b799ac84a..2d5d976fea 100644 --- a/src/main/java/com/elisis/gtnhlanth/common/register/LanthItemList.java +++ b/src/main/java/com/elisis/gtnhlanth/common/register/LanthItemList.java @@ -75,6 +75,8 @@ public final class LanthItemList { public static final Block ANTENNA_CASING_T1 = new AntennaCasing(1); public static final Block ANTENNA_CASING_T2 = new AntennaCasing(2); + public static final Block NIOBIUM_CAVITY_CASING = new Casing("niobium_cavity"); + public static final Block FOCUS_MANIPULATION_CASING = new Casing("focus_manipulator"); public static final Block FOCUS_HOLDER = new Casing("focus_holder"); @@ -141,6 +143,8 @@ public final class LanthItemList { GameRegistry.registerBlock(ANTENNA_CASING_T2, ANTENNA_CASING_T2.getUnlocalizedName()); + GameRegistry.registerBlock(NIOBIUM_CAVITY_CASING, NIOBIUM_CAVITY_CASING.getUnlocalizedName()); + GameRegistry.registerBlock(FOCUS_MANIPULATION_CASING, FOCUS_MANIPULATION_CASING.getUnlocalizedName()); GameRegistry.registerBlock(FOCUS_HOLDER, FOCUS_HOLDER.getUnlocalizedName()); diff --git a/src/main/java/com/elisis/gtnhlanth/common/register/WerkstoffMaterialPool.java b/src/main/java/com/elisis/gtnhlanth/common/register/WerkstoffMaterialPool.java index a6e806ca86..26a3cb65e3 100644 --- a/src/main/java/com/elisis/gtnhlanth/common/register/WerkstoffMaterialPool.java +++ b/src/main/java/com/elisis/gtnhlanth/common/register/WerkstoffMaterialPool.java @@ -1993,6 +1993,17 @@ public class WerkstoffMaterialPool implements Runnable { offsetID3b + 9, TextureSet.SET_DULL); + public static final Werkstoff NitrogenPlasmaSilaneMix = new Werkstoff( + new short[] { 140, 125, 220 }, + "Silane-Nitrogen Plasma Mixture", + subscriptNumbers("SiH4/N"), + new Werkstoff.Stats(), + Werkstoff.Types.MIXTURE, + new Werkstoff.GenerationFeatures().disable() + .addCells(), + offsetID3b + 10, + TextureSet.SET_FLUID); + public static void runInit() { addSubTags(); } diff --git a/src/main/java/com/elisis/gtnhlanth/common/tileentity/LINAC.java b/src/main/java/com/elisis/gtnhlanth/common/tileentity/LINAC.java index e456813bc6..98b20becb7 100644 --- a/src/main/java/com/elisis/gtnhlanth/common/tileentity/LINAC.java +++ b/src/main/java/com/elisis/gtnhlanth/common/tileentity/LINAC.java @@ -178,15 +178,20 @@ public class LINAC extends GT_MetaTileEntity_EnhancedMultiBlockBase<LINAC> imple final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); tt.addMachineType("Particle Accelerator") .addInfo("Controller block for the LINAC") + .addInfo("Accelerates charged particles to higher energies") + .addInfo("Increasing length increases output energy, but decreases focus") + .addInfo("Use a lower temperature coolant to improve focus") // .addInfo("Extendable, with a minimum length of 18 blocks") .addInfo(DescTextLocalization.BLUEPRINT_INFO) .addInfo(DescTextLocalization.BEAMLINE_SCANNER_INFO) .addInfo("Valid Coolants:"); // Valid coolant list - for (Fluid fluid : BeamlineRecipeLoader.coolantMap.keySet()) { + for (String fluidName : BeamlineRecipeLoader.coolantMap.keySet()) { - tt.addInfo("- " + fluid.getLocalizedName(new FluidStack(fluid, 1))); + tt.addInfo( + "- " + FluidRegistry.getFluid(fluidName) + .getLocalizedName(null)); } @@ -334,17 +339,27 @@ public class LINAC extends GT_MetaTileEntity_EnhancedMultiBlockBase<LINAC> imple // weigh the former by the latter long voltage = this.getMaxInputVoltage(); - voltageFactor = calculateVoltageFactor(voltage); + // voltageFactor = calculateVoltageFactor(voltage); - machineEnergy = Math.max(-((60) / this.length) * voltageFactor + 60_000, 2000); // Minimum of 2000keV + // machineEnergy = Math.max(-((60) / this.length) * voltageFactor + 60_000, 2000); // Minimum of 2000keV + + machineEnergy = (float) Math.max(length / 4 * Math.pow(voltage, 1.0 / 3.0), 50); // Minimum of 50keV inputEnergy = this.getInputInformation() .getEnergy(); - outputEnergy = Math.min( - (1 + inputEnergy / Particle.getParticleFromId(outputParticle) - .maxSourceEnergy()) * machineEnergy, - 120_000); // TODO more complex calculation than just - // addition + /* + * outputEnergy = Math.min( + * (1 + inputEnergy / Particle.getParticleFromId(outputParticle) + * .maxSourceEnergy()) * machineEnergy, + * 120_000); // TODO more complex calculation than just + * // addition + */ + + outputEnergy = (float) Math.pow( + 10, + 1 + inputEnergy / Particle.getParticleFromId(outputParticle) + .maxSourceEnergy()) + * machineEnergy; inputRate = this.getInputInformation() .getRate(); @@ -359,13 +374,17 @@ public class LINAC extends GT_MetaTileEntity_EnhancedMultiBlockBase<LINAC> imple primFluid.amount -= fluidConsumed; - FluidStack fluidOutput = new FluidStack( - BeamlineRecipeLoader.coolantMap.get(primFluid.getFluid()), - fluidConsumed); + Fluid fluidOutput = BeamlineRecipeLoader.coolantMap.get( + primFluid.getFluid() + .getName()); if (Objects.isNull(fluidOutput)) return false; - this.addFluidOutputs(new FluidStack[] { fluidOutput }); + FluidStack fluidOutputStack = new FluidStack(fluidOutput, fluidConsumed); + + if (Objects.isNull(fluidOutputStack)) return false; + + this.addFluidOutputs(new FluidStack[] { fluidOutputStack }); outputAfterRecipe(); @@ -552,11 +571,12 @@ public class LINAC extends GT_MetaTileEntity_EnhancedMultiBlockBase<LINAC> imple return factor; } - private static float calculateVoltageFactor(long voltage) { - - float factor = (float) Math.pow(1.00009, -(0.1 * voltage - 114000)); - return factor; - } + /* + * 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) { diff --git a/src/main/java/com/elisis/gtnhlanth/common/tileentity/Synchrotron.java b/src/main/java/com/elisis/gtnhlanth/common/tileentity/Synchrotron.java index 6733bc5338..ee63bc8d20 100644 --- a/src/main/java/com/elisis/gtnhlanth/common/tileentity/Synchrotron.java +++ b/src/main/java/com/elisis/gtnhlanth/common/tileentity/Synchrotron.java @@ -442,8 +442,8 @@ public class Synchrotron extends GT_MetaTileEntity_EnhancedMultiBlockBase<Synchr .addElement('k', ofBlock(GregTech_API.sBlockCasings1, 15)) // Superconducting coils .addElement('d', ofBlock(LanthItemList.COOLANT_DELIVERY_CASING, 0)) .addElement('e', buildHatchAdder(Synchrotron.class).atLeast(ImmutableMap.of(Energy, 4)).dot(6).casingIndex(CASING_INDEX).build()) - .addElement('n', ofBlock(GregTech_API.sBlockMetal5, 5)) //Niobium Blocks - .addElement('a', ofBlockAdder(Synchrotron::addAntenna, LanthItemList.ANTENNA_CASING_T1, 3)) //Antenna Casings + .addElement('n', ofBlock(LanthItemList.NIOBIUM_CAVITY_CASING, 0)) + .addElement('a', ofBlockAdder(Synchrotron::addAntenna, LanthItemList.ANTENNA_CASING_T1, 0)) //Antenna Casings .addElement('i', buildHatchAdder(Synchrotron.class).atLeast(ImmutableMap.of(InputHatch, 2)).dot(4).casingIndex(CASING_INDEX).build()) .addElement('o', buildHatchAdder(Synchrotron.class).atLeast(ImmutableMap.of(OutputHatch, 2)).dot(5).casingIndex(CASING_INDEX).build()) .addElement('v', buildHatchAdder(Synchrotron.class).hatchClass(TileHatchInputBeamline.class).casingIndex(CASING_INDEX) @@ -500,9 +500,11 @@ public class Synchrotron extends GT_MetaTileEntity_EnhancedMultiBlockBase<Synchr .addInfo("Valid Coolants:"); // Valid coolant list - for (Fluid fluid : BeamlineRecipeLoader.coolantMap.keySet()) { + for (String fluidName : BeamlineRecipeLoader.coolantMap.keySet()) { - tt.addInfo("- " + fluid.getLocalizedName(new FluidStack(fluid, 1))); + tt.addInfo( + "- " + FluidRegistry.getFluid(fluidName) + .getLocalizedName(null)); } @@ -512,7 +514,7 @@ public class Synchrotron extends GT_MetaTileEntity_EnhancedMultiBlockBase<Synchr .addController("Front middle") .addCasingInfoExactly(LanthItemList.SHIELDED_ACCELERATOR_CASING.getLocalizedName(), 676, false) .addCasingInfoExactly("Superconducting Coil Block", 90, false) - .addCasingInfoExactly("Niobium Block", 64, false) + .addCasingInfoExactly("Niobium Cavity Casing", 64, false) .addCasingInfoExactly(LanthItemList.COOLANT_DELIVERY_CASING.getLocalizedName(), 28, false) .addCasingInfoExactly("Borosilicate Glass Block (LuV+)", 16, false) .addCasingInfoExactly("Antenna Casing (must match)", 4, true) @@ -781,12 +783,17 @@ public class Synchrotron extends GT_MetaTileEntity_EnhancedMultiBlockBase<Synchr primaryFluid.amount -= CONSUMED_FLUID; - FluidStack fluidOutput = new FluidStack( - BeamlineRecipeLoader.coolantMap.get(primaryFluid.getFluid()), - CONSUMED_FLUID); + Fluid fluidOutput = BeamlineRecipeLoader.coolantMap.get( + primaryFluid.getFluid() + .getName()); + if (Objects.isNull(fluidOutput)) return false; - this.addFluidOutputs(new FluidStack[] { fluidOutput }); + FluidStack fluidOutputStack = new FluidStack(fluidOutput, CONSUMED_FLUID); + + if (Objects.isNull(fluidOutputStack)) return false; + + this.addFluidOutputs(new FluidStack[] { fluidOutputStack }); outputAfterRecipe(); diff --git a/src/main/java/com/elisis/gtnhlanth/common/tileentity/TargetChamber.java b/src/main/java/com/elisis/gtnhlanth/common/tileentity/TargetChamber.java index 1fde839173..ad696f8fd3 100644 --- a/src/main/java/com/elisis/gtnhlanth/common/tileentity/TargetChamber.java +++ b/src/main/java/com/elisis/gtnhlanth/common/tileentity/TargetChamber.java @@ -304,10 +304,12 @@ public class TargetChamber extends GT_MetaTileEntity_EnhancedMultiBlockBase<Targ if (inputParticle != tRecipe.particleId) return false; - this.mMaxProgresstime = Math.round((tRecipe.amount / inputRate * 10 * TickTime.SECOND)); // 10 seconds per - // integer multiple + this.mMaxProgresstime = Math.max(Math.round((tRecipe.amount / inputRate * 5 * TickTime.SECOND)), 1); // 5 + // seconds + // per + // integer multiple // over the rate. E.g., 100a, 10r - // would equal 100 seconds + // would equal 50 seconds if (this.mMaxProgresstime == Integer.MAX_VALUE - 1 && this.mEUt == Integer.MAX_VALUE - 1) return false; mEUt = (int) -tVoltage; diff --git a/src/main/java/com/elisis/gtnhlanth/common/tileentity/recipe/beamline/BeamlineRecipeLoader.java b/src/main/java/com/elisis/gtnhlanth/common/tileentity/recipe/beamline/BeamlineRecipeLoader.java index 5b2ca7b650..2c5eef4ea0 100644 --- a/src/main/java/com/elisis/gtnhlanth/common/tileentity/recipe/beamline/BeamlineRecipeLoader.java +++ b/src/main/java/com/elisis/gtnhlanth/common/tileentity/recipe/beamline/BeamlineRecipeLoader.java @@ -22,7 +22,7 @@ import gtPlusPlus.core.material.ELEMENT; public class BeamlineRecipeLoader { - public static final HashMap<Fluid, Fluid> coolantMap = new HashMap<>(); + public static final HashMap<String, Fluid> coolantMap = new HashMap<>(); private static final ItemList[] VIABLE_WAFERS = new ItemList[] { ItemList.Circuit_Silicon_Wafer, ItemList.Circuit_Silicon_Wafer2, ItemList.Circuit_Silicon_Wafer3, ItemList.Circuit_Silicon_Wafer4, @@ -36,18 +36,21 @@ public class BeamlineRecipeLoader { coolantMap.put( Materials.LiquidNitrogen.getGas(1L) - .getFluid(), + .getFluid() + .getName(), Materials.Nitrogen.getGas(1L) .getFluid()); coolantMap.put( Materials.LiquidOxygen.getGas(1L) - .getFluid(), + .getFluid() + .getName(), Materials.Oxygen.getGas(1L) .getFluid()); - coolantMap.put(FluidRegistry.getFluid("ic2coolant"), FluidRegistry.getFluid("ic2hotcoolant")); + coolantMap.put("ic2coolant", FluidRegistry.getFluid("ic2hotcoolant")); coolantMap.put( Materials.SuperCoolant.getFluid(1L) - .getFluid(), + .getFluid() + .getName(), Materials.Water.getFluid(1L) .getFluid()); |