# Batch 7 notes: power generation and fusion Paths in citations are relative to `gt5-2.9.0/src/main/java` (GT5-Unofficial 5.09.54.265, GTNH 2.9.0). ## nfr (Naquadah Fuel Refinery) Port of `dashboard-2.9.0/new/NFR Overclock Planner.html` and `NOTES-nfr-space.md`. - Controller `MTENaquadahFuelRefinery` (TT base). Coil gate `mSpecialValue > tier` (:273-276), `setMaxOverclocks(tier − mSpecialValue)` (:279-281), perfect OC, `setMaxParallelSupplier(getTrueParallel)` with `getMaxParallelRecipes = 4 × max(1, tier)` (:283-287), unlimited tier skips (:290-293), batch (:309-311). Legacy `MTEFuelRefineFactoryLegacy` has the same logic without the parallel supplier (:204-227). - Hatches: `EnergyMulti.or(Energy)` (:150-158). Power uses `MTEExtendedPowerMultiBlockBase` sums, and the TecTech single-amp quirk (one regular hatch → 1 A total even with laser hatches, because multi/laser hatches are in `eEnergyMulti`, not `mExoticEnergyHatches`) is modelled by a local helper `nfrPower` (engine `hatchPower` treats multi/laser as exotic, which is right for GT bases but not for TT bases). Engine gap: no `tectech` option in `hatchPower`; other TT machines need the same helper. - Recipes re-checked against the 2.9.0 dump `gg.recipe.naquadah_fuel_refine_factory`: 9 recipes, EU/t, ticks, special value and output amounts match. - Changes against the old planner: the old planner took one hatch tier × total amps; the new page takes the real hatch list (average voltage, summed amps, single-amp quirk). Added a coil-tier table, a per-coil sweep over hatch tier, batch toggle, ocline. - Examples 1, 2, 3 and 4 were run through `tools/java-ref/run.sh` (perfect OC `timeRed=4`, `maxTierSkips=2147483647`, `maxOC = coil − recipe tier`, `maxParallel` 16 or 1). - Defect in the old notes: `NOTES-nfr-space.md` "Verification / Tests" hand check says "Mk VI 750 L (T3), coil 4, UIV × 1024 A. Supply 34,359,738,368". UIV is 8,388,608 V, so 1024 A is 8,589,934,592 EU/t; the stated supply is 4096 A. With 1024 A, Java gives 16 parallels and 0 OCs (240 t), not 1 OC. The example here uses 4096 A, which gives the stated 60 t, 4000 L/s (Java-checked). ## large-naquadah-reactor - Controller `MTELargeNaquadahReactor` (TT base) does not use `ProcessingLogic`; `checkProcessing_EM` finds a fuel in `naquadahReactorFuels`, takes ×booster liters of fuel, locks the booster and sets `mMaxProgresstime = duration` (:193-227). `onRunningTick` at `mProgresstime % 20 == 0`: liquid air (2400 L, else 0 EU/t for that second), first coolant found, locked booster; `trueOutput = (long) base × eff × time / 100` (:230-255). Output is written to the first dynamo every tick; if `V × A < output` it stops with INSUFFICIENT_DYNAMO (:313-337). Exactly one dynamo (:343-350). - Constants from `GGConfigLoader.java:14-19`. The 2.9.0 instance `config/GoodGenerator.cfg` has identical values for all coolant, booster, liquid air, fuel voltage and fuel time entries. - Recipes in the 2.9.0 dump (`gg.recipe.naquadah_reactor`, 9 entries): special value and duration match `NaquadahFuelVoltage` / `NaquadahFuelTime`. - `mProgresstime` runs 0 … duration − 1 (`MTEMultiBlockBase.java:900-902`, TT loop `TTMultiblockBase.java:979-998`), so the check count per recipe is ⌈duration/20⌉. For 70 t (Mk II) and 150 t (plutonium) the per-check fluids are drawn more often than once per 20 ticks; the page shows the resulting average rates. - A regular dynamo hatch outputs 1 A: `MTEHatchDynamo` does not override `maxAmperesOut`, `MetaTileEntity.java:380-382` returns 1. - All examples are hand-derived from the lines above (no `OverclockCalculator` involved). - Not modelled: booster or coolant running out mid-recipe, the TT `powerPass` path (unused here because the controller buffer is not filled), maintenance. ## fusion-reactor (Mk I–V) - One page for `MTEFusionComputer1-3` (tier 6/7/8, capable 160M/320M/640M) and GT++ `MTEAdvFusionMk4/5` (tier 9/10, capable 5.12G/20.48G). Display names: `LoaderMetaTileEntities.java:432-440` ("Fusion Control Computer Mark I/II/III"), `GregtechFactoryGradeReplacementMultis.java:38-40` ("FusionTech MK IV/V"). - Power: `setProcessingLogicPower` = V[tier], 1 A, amperage OC off, unlimited tier skips (`MTEFusionComputer.java:343-348`). OC via `FusionOverclockDescriber.createCalculator` (:28-33): `setEUt(V[tier])`, max OC = Mk − recipe fusion tier, ×2/÷2. Mk IV/V use `AdvancedFusionOverclockDescriber` (×4/÷4); their `enablePerfectOverclock()` on the logic (`MTEAdvFusionMk4.java:91`) is overwritten by the describer setters anyway (same values). - Recipe fusion tier: `FusionSpecialValueFormatter.getFusionTier` (:34-62), start EU thresholds 160M/320M/640M/5.12G and voltage floors. - Capacity: `maxEUStore()` (`MTEFusionComputer.java:211-215`; Mk IV/V `:50-52` override with `/ 8`, so per hatch 320,005,000 / 1,280,020,000 EU). Validate rejects start EU > maxEUStore (:318-323). - Energy flow: each hatch moves `V[tier] / 16` EU/t into the controller (:388-397), recipe EU/t is drawn from the controller (:401-403), buffer ≤ 0 while running → POWER_LOSS (:398-400). The page warns when hatches × V/16 < recipe EU/t. - Start cost: only the idle branch deducts `FUSION_THRESHOLD + mEUt` (:428-441). The completion branch calls `checkRecipe()` directly (:404-426), with no deduction, also when the next recipe differs. The tooltip (`fusion-computer.md`) says "Changing recipes consumes the start cost again"; that is not what this code path does. Not verified in game. - Recipes: the 2.9.0 dump has no FUSION_THRESHOLD (empty `special`), so start EU was taken from the loaders (lines in `FUSION_RECIPES[].src`). EU/t, ticks and output amount match the dump for all 14 listed recipes. Not in the dump: `FusionReactorRecipes.java:327` (Redstone plasma + Ichorium, UEV/2, 32 t); not used on the page. - Examples D-T Mk III, D-T Mk V (sub-tick ×16), Flerovium Mk IV and Nickel Mk III were run through `tools/java-ref/run.sh` with `amperageOC=false`, `timeRed`/`powerInc` 2 or 4, `maxOC` = cap. Capacity values hand-derived. ## compact-fusion (Compact Fusion Computer MK-I–MK-V) - `MTELargeFusionComputer` (TT base) + `MTELargeFusionComputer1-5`. Names from `goodgenerator/loader/Loaders.java:335-354`. - `setProcessingLogicPower` (:531-535) sets V[tier], amperage `getSingleHatchPower() × 32 / V` = 64 × extraPara(100), unlimited tier skips, and does not call `setAmperageOC`; `ProcessingLogic.amperageOC` defaults to true (`ProcessingLogic.java:58`) and `clear()` (:344-355) does not reset it. So amperage OC is on (unlike the regular fusion). - `validateRecipe` (:499-511): start EU > capacity → insufficient start-up; `mEUt > V[tier]` → insufficient power; `maxParallel = 64 × extraPara(start)`. Overclock describer as in the regular fusion, `AdvancedFusionOverclockDescriber` for MK-IV/V (`MTELargeFusionComputer4.java:40-42`, `…5.java:40-42`). - Tooltip (`large-fusion-computer.md`) says "64 + (Machine Tier − Recipe Tier) × 64 parallels". The code uses `extraPara(startEnergy)` with strict `<` brackets on start EU only. Example: Naquadah fuel Mk I (start 320M, LuV, `goodgenerator/loader/RecipeLoader.java:624`) on MK-III gets 64 parallels in code; the tooltip formula gives 128 (recipe fusion tier 2). - Capacity `capable × min(32, n) / 32` (:223-227). Energy transfer per hatch per tick `min(hatch EU, getSingleHatchPower(), room)` (:347-357), summed over regular and exotic hatches. - Batch: `getDefaultBatchMode()` true (:653-656), size from TT parameter default 1 (`makeInParameter(1, 1, …)`, :636-640; `Parameters.java:290-299` stores `defaultValue`), clamped 1–128 (:643-646). Wire cutter sets 128 or 1 (:297-306). Not verified in game that the parameter starts at 1 in a freshly placed controller (the TT parameter array initialisation was not traced further). - Examples D-T MK-III, Naquadah fuel Mk I MK-III, Neptunium MK-IV and D-T MK-V batch 128 were run through `tools/java-ref/run.sh` with the amperage and parallel derived from the lines above. ## large-turbine (Large Steam / HP Steam / Supercritical Steam / Gas / Plasma Turbine) - `MTELargeTurbineBase.checkProcessing` (:196-251) computes `fluidIntoPower` every check (every tick; plasma sets `mMaxProgresstime = 20`, `MTELargeTurbinePlasma.java:200-209`) and moves `lEUt` towards it by `max(10, |diff|/100)`. Output per tick `lEUt × mEfficiency / 10000` (`MTEExtendedPowerMultiBlockBase.java:52-55`), efficiency +10 per tick (plasma +200 per 20 ticks) up to 10000. - Rotor stats: `TurbineStatCalculator.java` (whole class). Size speed/damage: `ToolTurbineSmall/Normal/Large/Huge.java` (1/2/3/4, 0/2.5/5/7.5). Combat damage = base damage + `mToolQuality` (`MetaGeneratedTool.java:692-696`). Material stats: `MaterialsInit.java` `setTool(durability, quality, speed)` and `setTurbine(steam, gas, plasma)`; the page lists 39 materials whose turbine blades appear in the 2.9.0 dump, with the `MaterialsInit.java` line of each builder. Bartworks/GT++ rotor materials (e.g. Shirabon, Magmatter, Eternity) are not in `MaterialsInit` and were not looked up; the page offers custom stats. - Per-type formulas (all float/int casts ported): steam `MTELargeTurbineSteam.java:110-181`, HP `MTELargeTurbineHPSteam.java` (fluidIntoPower + getOverflowEfficiency), SC `MTELargeTurbineSCSteam.java` (fluidIntoPower; `useLegacyEfficiencyScaling` :51-53 makes base efficiency < 100% stop the turbine via `baseEff <= 0` at `MTELargeTurbineBase.java:217-226`), gas `MTELargeTurbineGas.java:126-205`, plasma `MTELargeTurbinePlasma.java:117-198`. - Dynamo: one hatch (`Dynamo.newAny`, structure 'D'), `addDynamoToMachineList` accepts only `maxAmperesOut() <= 4` (`MTEMultiBlockBase.java:2319`). `getMaximumOutput` (:263-270) assigns instead of summing, irrelevant with one dynamo. - Fuel values from the 2.9.0 dump (`gt.recipe.gasturbinefuel`, `gt.recipe.plasmageneratorfuels`); the code uses them as EU per liter (`tEU = flow × fuelValue`, plasma `fuelValue / 20 × flow`). - Verification: `/tmp/batch-7/turb/T.java` (scratch, not committed) copies the expressions of `TurbineStatCalculator` and the steam/gas/plasma `fluidIntoPower` bodies verbatim for a single fluid stack. Eight cases (gas optimal and overflow, steam 2× and loose, plasma optimal and overflow, loose gas underflow) give identical flow and EU/t in Java and in the page. Float effects matter: 6120 × 2.1f = 12851, not 12852. - Spin-up time shown on the page is a simulation of the `lEUt` ramp from 0 at a constant target; not checked in game. ## xl-turbine (XL Turbo Steam / HP Steam / SC Steam / Gas / Plasma Turbine) - `MTEXLTurbineBase` (:66) extends `MTEExtendedPowerMultiBlockBase`. 12 rotor slots (:74), all the same material and size (:380-401); `getMaxEfficiency` 10000 only with 12 loaded, else 0 (:584-587), so output `lEUt × mEfficiency / 10000` is 0. `getSpeedMultiplier()` 16 (:746-748), no subclass overrides it (grep). - `checkProcessing` (:439-514) ramp max(10, 1%) per tick; plasma override (`MTEXLTurbinePlasma.java:233-316`) ramp max(200, 20%) per 20 ticks and the efficiency loss `min(1, (fuel × 0.005f)² / euPerTurbine)` with `euPerTurbine = roundToClosestInt(getOptimalPlasmaEUt())` (single rotor, tight) applied as `newPower *= efficiencyLoss` (:284-292). - `fluidIntoPower`: steam `MTEXLTurbineSteam.java:76-155` (0.5 EU/L), HP `MTEXLTurbineHPSteam.java:82-`, SC `MTEXLTurbineSCSteam.java:82-` (1 EU/L), gas `MTEXLTurbineGas.java:257-310`, plasma `MTEXLTurbinePlasma.java:319-375`. All take up to 125% of optimal and use the symmetric linear penalty; no dynamo cap inside. The XL SC turbine has no `useLegacyEfficiencyScaling` (only the large SC turbine has it). - Dense steam: per stack `denseFlow = min(amount, ⌈remaining/1000⌉)`, effective `min(remaining, dense × 1000)`. The page models one dense-steam stack. - Gas benzene blacklist: `MTEXLTurbineGas.java:49-55, 245-254`. - Dynamos: `Dynamo.or(ExoticDynamo)` (:191); output split by `injectEnergyIntoDynamo` (:725-744), full amps then remainder; the page shows Σ V × A as capacity and the excess as lost. The remainder detail (a partial amp fits only on a hatch with spare amps) is not modelled separately. - Verification: the Java scratch `/tmp/batch-7/turb/T.java` (not committed) also copies the XL steam/HP, gas and plasma `fluidIntoPower` bodies plus the plasma loss lines. All seven numeric page examples match it exactly (e.g. Infinity huge + helium plasma: 96,768,000 × 0.026006347 → 2,516,582). ## Page type decisions - `fusion-reactor` is listed as `custom` in CURATED.md; the generic spec form fits it (controller selector, hatch count, recipe list with custom recipe, comparison table over all five controllers), so it uses no `mount()`. - No shared files were edited. The TecTech single-amp quirk (one regular hatch → 1 A even with multi/laser hatches in `eEnergyMulti`) is a local helper in `machines/nfr.js`; other TecTech-base machines need the same rule, which `GT.hatchPower` does not offer. ## Unverified - Fusion (both pages): the tooltip line "Changing recipes consumes the start cost again" contradicts the continuous-run code path, which deducts nothing when the next recipe starts directly. Code read only; not tested in game. - Compact fusion: that the batch parameter of a newly placed controller is 1 (`makeInParameter(1, 1, …)` default) was not traced through `setDefault()` callers. - Large/XL turbines: the spin-up time is a simulation of the `lEUt` ramp; rotor materials from Bartworks/GT++ (Shirabon, Magmatter, Eternity, …) are not in the material list; the XL dynamo remainder split is approximated by Σ V × A. - Large Naquadah Reactor: output when a booster or coolant runs out mid-recipe is not modelled. - `dashboard-2.9.0/new/NOTES-nfr-space.md` hand check "UIV × 1024 A, supply 34,359,738,368" is inconsistent (that supply is 4096 A); the 1024 A case gives 0 OCs in Java. The old calculator's code path itself was not re-run. ## Verification Independent pass over all six specs against the 2.9.0 source (controller classes, bases, recipe loaders). No shared files were edited in this batch; none by the verifier. ### Defects found and fixed - **Fusion recipes (fusion-reactor, compact-fusion).** D-T and Be-D used the April 2026 dump values 4096 / 16384 EU/t. The 2.9.0 source has `TierEU.RECIPE_IV / 2` and `RECIPE_LuV / 2` (`FusionReactorRecipes.java:36-41, 60-65`), i.e. 3840 / 15360 with `VP = V × 30 / 32` (`GTValues.java:102-108`). The other 12 listed recipes match the source (EU/t, duration, start EU, output). The implementer's note "EU/t … match the dump for all 14" does not make the source authoritative; source wins. Examples re-run through `tools/java-ref/run.sh` (D-T Mk III → 15360 EU/t 4 t; Mk V → 983040 EU/t, 1 t, 16 sub-tick parallels; compact MK-III → 192 par, 2,949,120 EU/t; compact MK-V batch 128 → 655,360 par, 314,572,800 EU/t, 128 t). - **Fusion idle start (fusion-reactor).** The page warned on start EU + one tick. `mEUt` is negative after `setEnergyUsage` (`MTEMultiBlockBase.java:1359-1362`), so the idle branch checks and deducts `start − EU/t` (`MTEFusionComputer.java:433-441`). The hatches only fill while `stored + V/16 < maxEUStore` (:390-392), so the buffer tops out one step below capacity; a recipe whose start EU passes `validateRecipe` (start ≤ capacity) can still fail an idle start. The warning now uses that buffer ceiling; new example (Mk I, 1 hatch, start 10M, 10 EU/t) is hand-derived. - **Compact fusion idle start text.** Same sign issue (`lEUt` negative, `MTEExtendedPowerMultiBlockBase.java:108-113`). The large fusion fills up to the full capacity (`min(…, maxEUStore − stored)`, `MTELargeFusionComputer.java:347-357`), so any recipe passing the capacity check can start; no warning needed. - **Compact fusion energy input.** Input was `hatches × getSingleHatchPower` regardless of hatch type, so regular 2 A hatches (2 × V per tick, below `V × 64 × extraPara(100) / 32` for MK-II+) never triggered the power-loss warning. Added an "Amps into each hatch" input (hatch at MK voltage); per-hatch input is `min(single, amps × V)`. New example: Fermium on MK-V with 16 regular hatches → 268,435,456 EU/t input vs 503,316,480 EU/t draw (hand-derived). - **Large steam turbine overflow limit.** `MTELargeTurbineSteam.java:115-116` multiplies two floats (`realOptFlow × (0.5f × overflow + 1)`) and rounds to float before the `(long)` cast; the page multiplied in double. Differs by 1 L for 11 material/size/loose combinations (e.g. loose normal Creon: Java 72763, page had 72762). Confirmed with a standalone Java snippet using the `TurbineStatCalculator` expressions. HP steam is float × double in Java (`+ 1.5`), which the page already did right. XL steam is double × float (`realOptFlow` is a `double`, `MTEXLTurbineBase.java:169`), also right. - **Large gas turbine weak-rotor branch** returns before the dynamo cap (`MTELargeTurbineGas.java:143-147`); the page capped it. Fixed. - NFR batch hint said "same rate"; tick rounding changes it (Java: Mk V 750 L, T4 coils, UMV 4096 A laser, batch → 170 parallels, 127 t, 20,078.7 L/s vs 20,000 L/s without batch). LNR comment claimed list order = priority; the Java order is reversed. ### Checked without change - NFR: coil gate, `4 × max(1, tier)` parallels, OC cap `tier − special`, perfect OC, unlimited tier skips, batch; TT power (average voltage, summed working amps, single-amp rule with `mExoticEnergyHatches` always empty on TT bases because `MTEHatchEnergyTunnel extends MTEHatchEnergyMulti` goes to `eEnergyMulti`, `TTMultiblockBase.java:1735-1758`). java-ref batch case above matches the page exactly. Old `NFR Overclock Planner.html` coverage (recipe, controller, coil, hatch tier/amps, output/parallel/time/power/EU per L/OC tiles, two supply charts) is covered by the new page. - LNR: fuel/booster/coolant constants (`GGConfigLoader.java:14-19`), output `(long) base × eff × time / 100`, per-20-tick checks, one dynamo, `maxEUOutput × maxAmperesOut` check. Hand check Mk IV + Super Coolant + U-235: 398,430,000 EU/t, 0.6 L/s, 13,281,000,000 EU/L, 180 L/s booster, 1000 L/s coolant — page matches. - Fusion Mk I–V: describer (`getFusionTier() = tier − 5`, ×2/÷2 and ×4/÷4), `FusionSpecialValueFormatter` tiers, capacities, `setProcessingLogicPower` (1 A, amperage OC off). java-ref Bismuth on Mk IV (98304 EU/t, 16 t, start 350M → tier 3, cap 1) → 393,216 EU/t, 4 t; page matches; added as example. - Compact fusion: `extraPara` brackets MK-I…V, `getMaxPara() = 64` (no override), amps `64 × extraPara(100)`, amperage OC on (`ProcessingLogic.java:58`, `clear()` does not reset it), capacity over regular + exotic hatches, batch parameter 1–128. - Large turbines: `TurbineStatCalculator` ports (float casts), rotor size stats, sampled material stats from `MaterialsInit.java` (Steel, Titanium, HSS-S, Trinium, Duranium, Adamantium, Vulcanite, Shadow Iron, Cosmic Neutronium, Infinity, Transcendent Metal, SpaceTime, Creon, Universium, Neutronium, Awakened Draconium), no config overrides of tool stats in the source. Gas/plasma/SC/HP bodies match. - XL turbines: 16× flow, 125% limit, symmetric penalty, dense steam handling, benzene blacklist, plasma loss with `roundToClosestInt`, 12-rotor efficiency gate, dynamo split. Four plasma cases (Infinity huge helium optimal; loose large Transcendent Metal celestial tungsten; normal Cosmic Neutronium bismuth overflow; loose huge SpaceTime americium underflow) computed with a standalone Java copy of `MTEXLTurbinePlasma` expressions; all match the page exactly (e.g. 103,219,200 × loss → 2,684,354). - Display names checked against the registration calls (`LoaderMetaTileEntities.java`, `goodgenerator/loader/Loaders.java`, `GregtechFactoryGradeReplacementMultis.java`). ### Unverified (verifier) - The dump/source mismatch on D-T and Be-D fusion EU/t was not checked in game; the page follows the source as instructed. - Compact fusion: hatches above the MK voltage tier (more EU per amp) are not modelled by the new amps input; the page assumes the hatch is at the MK tier. - Everything listed under "Unverified" above still applies.