# Batch 2 notes Paths in citations are relative to `gt5-2.9.0/src/main/java` (GT5-Unofficial 5.09.54.265). "java-ref" = `tools/java-ref/RefMain` single cases, compiled once from the unmodified `OverclockCalculator.java` into `/tmp/batch-2/jref` and run with `-Xmx1g` (same sources and arguments as `tools/java-ref/run.sh "" case ...`). Recipe defaults come from the 2.9.0 dump (`gt_recipes.json`), filtered into a scratch file with one Python pass. ## Vacuum Freezer (`machines/vacuum-freezer.js`) - `MTEVacuumFreezer extends MTEExtendedPowerMultiBlockBase` (:45), `createProcessingLogic()` = `new ProcessingLogic().noRecipeCaching()` (:147-150): no modifiers, max parallel 1 (base `getMaxParallelRecipes` = 1, `MTEMultiBlockBase.java:3268-3270`), batch mode (:157-160). - Structure accepts `HatchElement.Energy` only (:97), so the page offers regular hatches. - Default recipe: Hot Tungstensteel Ingot, 1920 EU/t, 357 t (`gt.recipe.vacuumfreezer`). - All five examples from java-ref single cases (listed in each example's `source`). ## Cryogenic Freezer (`machines/cryogenic-freezer.js`) - Constants `PARALLELS = 16`, `SPEED_BONUS = 3.0`, `EU_MODIFIER = 0.9`, `CRYOTHEUM_PER_SECOND = 10` (`MTECryogenicFreezer.java:64-67`); `ProcessingLogic().setSpeedBonus(1/3).setEuModifier(0.9).setMaxParallelSupplier(getTrueParallel)` (:206-211); recipe map `vacuumFreezerRecipes` (:200-203); hatches `Energy` only (:130-138); batch (:279-282). - The dump also has a `gtpp.recipe.cryogenicfreezer` map (281 recipes). The 2.9.0 class does not use it; the page takes vacuum freezer recipes. - The cached `GregTech.lang` in the 2.9.0 instance shows the deprecated GT++ tooltip (8 parallels, 220% speed). Source wins: 16 parallels, speed bonus 1/3. - Cryotheum: 10 L every 20 ticks while running, from Cryotheum Hatches only; a failed drain causes a maintenance issue and stops the machine (:224-243). - Examples: five java-ref cases with `maxParallel=16 euMod=0.9 speed=0.3333333333333333` (= `1.0D / 3.0D`). ## Endothermic Fridge (`machines/endothermic-fridge.js`) - Power override `setProcessingLogicPower` (`MTEEndothermicFridge.java:397-404`): `setAvailableVoltage(getMaxInputEu())`, `setAvailableAmperage(1)`, `setUnlimitedTierSkips()`, `setSpeedBonus(1f / speedBoost)`; `amperageOC` stays at the ProcessingLogic default `true` (`ProcessingLogic.java:58`). `getMaxInputEu` = Σ V × `maxWorkingAmperesIn` over normal and exotic hatches (`MTEExtendedPowerMultiBlockBase.java:131-133`, `ExoticEnergyInputHelper.java:54-65`), so one regular hatch counts 2 A here (no single-amp rule). - Parallel `Configuration.Multiblocks.megaMachinesMax` = 256, `@Config.Ignore` (`bartworks/common/configs/Configuration.java:63-64`), through `getTrueParallel`. - Speed ramp: `INCREMENT_BASE = 1F / 120`, `INCREMENT_CRYO = INCREMENT_BASE * 5` (floats, :348-349); `+increment` every 100 running ticks, `min(1.5f, …)` (:381-384). Float simulation: 60 base steps reach 1.4999…, the 61st clamps to 1.5 (6100 ticks = 305 s, the tooltip says 5 min); with cryotheum 12 steps reach 1.49999952, the 13th clamps (65 s). Idle decay −3/120 every 20 ticks (:389-395). - Tier 2 (`Infinity Cooled Casing`, `sBlockCasings8` meta 14, :294-302) uses heat OC: `setMachineHeat(perfectOverclock × 1800).setRecipeHeat(0).setHeatOC(true).setHeatDiscount(false)` (:421-433). Booster list Infinity 1 / SpaceTime 2 / Eternity 3, 20 L each, drained once per second (:339-343, 362-369). `findBoosterFluid` takes the first hatch that holds any booster, and within a hatch the first in list order. - Dead end: a first hand derivation of the Eternity + 4096 A UV laser example assumed 4 OCs. java-ref gives 5 (log4(2^31 / 1966080) = 5.05). The example uses the java-ref values. - The cached `GregTech.lang` tooltip is the old Mega Vacuum Freezer one (SpaceTime 75 L/s etc.). Source wins. ## Mega Chemical Reactor (`machines/mega-chemical-reactor.js`) - `ProcessingLogic().enablePerfectOverclock().setUnlimitedTierSkips().setMaxParallelSupplier(getTrueParallel)` (`MTEMegaChemicalReactor.java:174-178`), `PARALLELS = 256` (:62, :180-183), recipe map `multiblockChemicalReactorRecipes` (:168-171), hatches `Energy.or(ExoticEnergy)` (:87), batch (:230-233). `setProcessingLogicPower` is not overridden, so the standard rule applies (single regular hatch → 1 A). - Structure checks (:214-227): with glass below UV any LASER exotic hatch fails (`glassTierNotEnough(UV)`), then any hatch with `getTierForStructure() > glassTier` fails (`ENERGY_TIER_EXCEED_GLASS`). The page reproduces both, first failure only, as Java returns after the first. - Default recipe: PTFE from tetrafluoroethylene + oxygen, circuit 9, 30 EU/t, 1120 t (`gt.recipe.largechemicalreactor`). - Examples from java-ref single cases (`maxParallel=256 maxTierSkips=2147483647 timeRed=4`). The tier-skip example was contrasted with `maxTierSkips=1`, which returns INSUFFICIENT_VOLTAGE for a 30720 EU/t recipe on 2048 V. - The "Equal to N LCRs" line compares with one LCR on two regular hatches of the same average voltage (4 A). ## Flotation Cell Regulator (`machines/froth-flotation.js`) - Display name from registration: `new MTEFrothFlotationCell(FlotationCell.ID, "gtpp.multimachine.flotationcell", "Flotation Cell Regulator")` (`gregtech/loaders/preload/LoaderMetaTileEntities.java:877`). The GT++ `MTEFrothFlotationCellLegacy` is still registered under `Controller_Flotation_Cell` (`GregtechIsaMill.java:19-21`). - `ProcessingLogic` with a `validateRecipe` override (material lock on the `milled*` ore name) and `.enablePerfectOverclock()` (`MTEFrothFlotationCell.java:239-279`). No parallel, speed or EU modifier; batch (:349-352); `HatchElement.Energy` only (:97). - Twelve recipes in `RecipeLoaderMilling.java:235-402`, cross-checked with the dump (`gtpp.recipe.flotationcell`, 12 entries, same EU/t, duration and pine oil). - Examples from java-ref single cases with `timeRed=4`. ## IsaMill Grinding Machine (`machines/isa-mill.js`) - `MTEIsaMill extends GTPPMultiBlockBase` (→ `MTEExtendedPowerMultiBlockBase`); `createProcessingLogic` (:505-557) overrides `process` (fails without a milling ball), `validateRecipe` (recipe must list a milling ball and the hatch must hold that type), `prepareCatalyst`, `onRecipeStart` (damages the ball) and calls `.enablePerfectOverclock()`. No parallel; batch from `GTPPMultiBlockBase.java:861-863`. `HatchElement.Energy` only (:143-144) plus exactly one Milling Ball Hatch (:170-179). - Ball wear: `damageMillingBall` (:486-495) rolls `randFloat(0, 1e7) / 1e7f < (1.2f − 0.2 × 1)`; the right side is 1.0000000477 (float 1.2f widened to double). `randFloat(0, 1e7)` = `nextFloat(1e7 + 1)` (`MathUtils.java:87-101`), so the ratio is in [0, ~1.0000001]; a miss needs the top float step. Treated as certain. Max damage: alumina 100, soapstone 50 (`ItemGenericChemBase.java:243-251`). - `onRecipeStart` runs once per `applyRecipe` (`ProcessingLogic.java:508`), so a batch run wears the ball once for all its recipes. - Recipes generated per material in `BaseItemMilledOre.java:25-118` with the EU/t passed in `ModItems.java:300-312`; netherrack uses the custom-input constructor (256 netherrack; both balls 60 s). Dump `gtpp.recipe.oremill` (200 recipes) agrees on EU/t, durations and outputs; it shows 8 netherrack/endstone ores per recipe, so `mNetherOreYieldMultiplier` / `mEndOreYieldMultiplier` are on in the dump instance. - Examples from java-ref single cases with `timeRed=4`; per-minute and ball figures by hand. ## ExxonMobil Chemical Plant (`machines/chemical-plant.js`) - Constants (`MTEChemicalPlant.java:90-95`): 2 parallels per pipe tier, catalyst save 0.2 per pipe tier, coil speed via `setupProcessingLogic` → `setSpeedBonus(2.0D / (1.0D + mCoilTier))` (:644-649; `SPEED_BONUS_PER_COIL_TIER = 0.5f` is only used in the tooltip), unbreakable at coil tier ≥ 10 and pipe tier ≥ 4, max catalyst damage 50. - Tiers from `checkMachine` (:385-424): solid casing tier = index of the single solid-casing type (all must match, :400-408); `mMachineCasingTier = checkMachine − 1`, `mPipeCasingTier = checkPipe − 12`. `GTPPMultiBlockBase.addTieredBlock` stores `meta + 1` (`GTPPMultiBlockBase.java:699-714`), so machine casings `sBlockCasings1` meta 0-9 give tier 0 (ULV) … 9 (UHV) and pipe casings `sBlockCasings2` meta 12-15 give 1 (Bronze) … 4 (Tungstensteel). Coil tier = `HeatingCoilLevel.getTier()`. - Solid casing tiers 0-7 (`GregtechAlgaeContent.java:36-52`): Bronze, Steel, Aluminium, Stainless Steel, Titanium, Tungstensteel, Laurenium, Botmium. Recipe `mSpecialValue` must be ≤ that tier (:598-600). - Hatch rule: if machine casing tier < 9 and any input/output hatch, bus or energy hatch has a higher tier, the structure fails (:413-415, 437-462). The page checks energy hatches only (the inputs it has). - Catalyst wear: `damageCatalyst(catalyst, getCurrentParallels())` at recipe start (:634), one roll per parallel, `getCurrentParallels()` = parallels after batch (`ProcessingLogic.java:491, 630-632`). Chance `1.2f − 0.2D × pipe` = 1.0000000477, 0.8000000477, 0.6000000477, 0.4000000477. The loop returns when the catalyst breaks (:576), so at most one catalyst breaks per start; the page uses the long-run rate from a renewal model (see Verification). - Default recipe: aniline from nitrobenzene + hydrogen with the Cobalt-Titanium catalyst, 480 EU/t, 600 t, tier 3 (`gtpp.recipe.fluidchemicaleactor`). Mutated Living Solder example: 3842160 EU/t, 16000 t, tier 7. - Examples from java-ref single cases; speed passed as `2/(1+coil)` doubles. ## Water Purification Plant (`machines/waterline.js`) Rebuild of `dashboard-2.9.0/new/Waterline Parallel Planner.html`; mechanics and citations from `NOTES-waterline.md` (verified there against 2.9.0), re-checked here by grep: `getBasePowerUsage` per unit (LuV, LuV, ZPM, ZPM, UV, UV, UHV, UEV at the lines cited in the page), `CYCLE_TIME_TICKS = 120 * SECONDS` (`MTEPurificationPlant.java:80`), efficiency `10000 − (6 − repairStatus) × 1000` (:336), drain `(long) (-lEUt * (10000.0 / max(1000, mEfficiency)))` (`MTEExtendedPowerMultiBlockBase.java:78-80`), effective parallel `min(maxParallel, floorDiv(water, 1000))` (`MTEPurificationUnitBase.java:234`), unit power `getBasePowerUsage() * effectiveParallel` (:474). - Custom page (`mount`): global inputs through `renderControls`, tiles and messages through the framework, a stacked budget gauge, an editable unit table (on/off, EU/t per parallel, parallels with lock, success %), unit totals, and a final-output-by-amperage chart. All state, including the 40 per-unit fields, is in the URL hash (the old planner used localStorage). - Ported from the old planner: hatch tier + total amperage budget, maintenance 0-5 (6 removed, the plant does not run), manual / equal / chain modes, feed ratio, locks (typing a parallel in equal/chain locks the unit), "Unlock all", "Reset EU/t to game values", custom EU/t highlighting, per-unit EU/t, share, water in/out, feed chips (external / balanced / spare / short), banner messages (over budget, zero parallels, unused budget, fits), the notes text. - Changes against the old planner: the total draw is truncated to a long once, as in Java (the old planner did not truncate; NOTES-waterline.md "Unverified"); MAX tier uses `GT.V[14]` = 2147483640; leaving equal/chain for manual keeps the distributed parallels as the manual starting point (the old planner kept them implicitly by mutating state). - Added: per-unit success chance (user estimate) feeding an "Expected output" tile and the feed check; drain factor tile; final-output-by-amperage chart. - Verification: `/tmp/batch-2/wlcheck.mjs` (scratch) runs the old planner's `distribute()` and load formula (copied verbatim from the HTML) and the new `wlCompute` on 400 seeded random states (tiers LuV-UXV, 1-1024 A, 0-5 problems, all modes, ratios 0.5-1, random on/off, parallels and locks): 0 parallel mismatches, used EU/t within < 1 EU/t (truncation). The page was rendered in `tests/lib/dom-stub.mjs` from a scratch script: tiles, gauge, table, chart; typing a parallel in chain mode locks the unit and writes `par3=5&lock3=1` to the hash; "Unlock all" and the switch to manual behave as described. ## Shared files None edited. Pages use only existing engine and UI APIs. The hatch-tier sweeps pass hatch lists as sweep x values with a `format` function; the waterline page uses `mount()`. ## Unverified - No page was opened in a real browser. All pages were rendered only in `tests/lib/dom-stub.mjs` (scratch script), so layout, the waterline gauge colours (`color-mix` on `--accent`) and inline-input focus behaviour are unchecked. - Endothermic Fridge: which fluid stack each booster uses (`Materials.getFluid` vs `getMolten`, `MTEEndothermicFridge.java:525-531`) was not resolved per material; the page names the materials only. `runningTickCounter` is not saved to NBT while `speedBoost` is (:243-251), so the 100-tick step phase after a world reload is not modelled. - IsaMill and Chemical Plant wear rolls: the `randFloat` analysis is from reading `MathUtils.java:87-101`; not run. The pages use expected values. - Chemical Plant: the hatch-tier rule also applies to input/output hatches and buses; the page checks only the energy hatches it models. - Waterline: unit success chances are user estimates; the per-unit chance mechanics are not modelled. Budget = hatch voltage × total amperage, as in the old planner; hatch acceptance limits are not modelled. - Power-panel parallel limits (`getTrueParallel`, `MTEMultiBlockBase.java:3278-3282`) are not modelled on any page; the pages assume the maximum. - The 2.9.0 dump (April 2026) was used only for recipe defaults and cross-checks; where it matched the source loaders (flotation, milling) this is stated. Vacuum freezer, LCR and chemical plant defaults were taken from the dump without locating each recipe in the source. ## Verification Independent review of batch 2 against the 2.9.0 source. Main was merged first (already up to date). java-ref was rebuilt from `tools/java-ref` sources into `/tmp/batch-2/verify/jref` (not the implementer's build); recipe values were re-extracted from the dump with a separate Python pass. ### Per machine - Vacuum Freezer: whole class read (`MTEVacuumFreezer.java:1-167`). Plain `ProcessingLogic().noRecipeCaching()` (:147-150), base max parallel 1, batch (:157-160), `HatchElement.Energy` only (:97). Examples rederived by hand (2 OC → 30720 EU/t, 89 t; 1 A → 178 t; batch 44 t → 2 parallels, 88 t; 120 EU/t sub-tick ×8) and with java-ref (INSUFFICIENT_POWER on 512 V × 1 A). Default recipe (Hot Tungstensteel, 1920 EU/t, 357 t) and Hot Zirconium (120 EU/t, 1 t) are in the dump. No defect. - Cryogenic Freezer: whole class read (`MTECryogenicFreezer.java:1-283`). Constants :64-67, logic :206-211, `getMaxParallelRecipes` = 16 (:213-216), Energy-only hatch adder (:130-138), cryotheum drain every 20 ticks with maintenance issue and stop on failure (:224-256). java-ref: single IV hatch → 4 parallels, 6912 EU/t, 119 t; 2× LuV sub-tick → 768 parallels (16 × 48). Hot Neutronium (7680 EU/t, 1250 t) is in the dump. Registered as "Cryogenic Freezer" (`LoaderMetaTileEntities.java:793`). No defect. - Endothermic Fridge: class read (:230-533). `setProcessingLogicPower` override (:397-404) sets voltage = `getMaxInputEu()` (Σ V × `maxWorkingAmperesIn`, `ExoticEnergyInputHelper.java:54-65`), 1 A, unlimited tier skips, speed `1f / speedBoost`, and does not call the base (amperage OC stays at the ProcessingLogic default). Tier 2 heat-OC override (:420-433), boosters (:339-343), warm-up and decay (:348-349, 371-395), `megaMachinesMax = 256` (`bartworks/common/configs/Configuration.java:63-64`), hatches `Energy.or(ExoticEnergy)`. java-ref: Eternity + UV 4096 A laser → 5 OC, 2013265920 EU/t, 3 t; Hot Titanium batch → 1365 parallels, 127 t; single IV hatch at 16384 EU/t → 8 parallels. No defect. - Mega Chemical Reactor: class read (:55-240). Perfect OC, unlimited tier skips, 256 parallels, standard power, glass checks in the order of :214-227 (laser below UV first, then any hatch above glass tier). java-ref: UV 4096 A laser → 60160 parallels (256 × 235), 9 OC; 4× EV tier skip → 2 parallels at 15360 EU/t. PTFE (30 EU/t, 1120 t, circuit 9) is in the dump. UV 4096 A laser and 64 A multi hatches exist (`MTEHatchEnergyTunnel` / `MTEHatchEnergyMulti` registrations). No defect. - ExxonMobil Chemical Plant: class read (:85-727). Parallels `2 × pipe` (:504-506), speed `2 / (1 + coil)` (:644-649), solid-casing gate (:598-600), machine-casing hatch rule (:413-415, addChemicalPlantList), unbreakable at coil ≥ 10 and pipe ≥ 4 (:585-587). java-ref matched the aniline, Mutated Living Solder and benzene-batch examples; all three recipes are in the dump with the stated EU/t, duration and special value. - Defect fixed: catalyst use. `damageCatalyst` (:566-583) returns as soon as the catalyst breaks (:576), so the remaining rolls of that start are lost and at most one catalyst breaks per start. Catalyst Housing usage slots hold one item (`MTEHatchNbtConsumable.java:120-123`), so the next catalyst starts at 0 damage. The page used `parallels × chance / 50` per start, which overstates use (default aniline: 38.4 → 37.354 / h; 64-parallel batch at 80 %: 576 → 436 / h). It now uses a renewal model: E[starts per catalyst] by dynamic programming over damage 0-49 with Binomial(parallels, chance) hits per start. Checked against a Monte Carlo of the Java loop (`/tmp/batch-2/verify/cat.mjs`, 400k starts per case, 8 cases, agreement within sampling error) and by hand for chance 1 (2 hits per start → 25 starts per catalyst). Two examples added (Bronze pipe 2.4 / h by hand; benzene batch 436.04 / h). - IsaMill: class read (:440-557) plus `BaseItemMilledOre.java:25-118` and `ModItems.java:300-312`. 1 parallel (no supplier; `ProcessingLogic.maxParallel` default 1), perfect OC, one `damageMillingBall` per start, ball durability 100 / 50 (`ItemGenericChemBase.java:243-251`), Energy-only hatches (:144). Recipe table matches the source (ore/raw 64 in 120 s or 48 in 150 s; crushed 32 in 60 s or 16 in 75 s; netherrack 256 → 32 / 16 in 60 s). Examples rederived by hand. No defect. - Flotation Cell Regulator: class read (:230-366). Perfect OC, material lock in `validateRecipe`, batch, Energy-only hatches (:97). All 12 recipes match the dump (EU/t, duration, xanthate, pine oil, froth). java-ref: netherrack batch on 2× UV → 3 parallels, 111 t. No defect. - Water Purification Plant: drain, efficiency, cycle and effective parallel lines re-read (`MTEPurificationPlant.java:80, 276-287, 330-336, 374-382`; `MTEPurificationUnitBase.java:234, 473-475`; `MTEExtendedPowerMultiBlockBase.java:78-80`). Coverage against the old planner: every input (hatch tier, amperage, maintenance 0-5, mode, ratio), stat (used, headroom with amps, amps needed, final output with L/s), gauge with legend and over-budget marker, banner states, unit table columns, lock / unlock-all / reset-EU/t, custom-EU/t highlight, feed chips and notes text are present; dropped only the amperage datalist suggestions (the field is free numeric input). Default chain (27, 24, 21, 18, 16, 14, 12, 10; 123340800 EU/t) and the equal-mode example rederived by hand. No defect. - LCR: reference machine, unchanged in this batch; not re-reviewed. ### Shared files None edited in this batch (`git diff main --stat` lists only `machines/*` and this file). ### Unverified (verifier) - Pages not opened in a real browser; the waterline custom page was not re-rendered by the verifier. - Catalyst renewal model assumes the chance per roll equals `1.2f − 0.2 × pipe` (clamped to 1). The exact distribution of `MathUtils.randFloat(0, 1e7) / 1e7f` near 1 was not run.