# Batch 3 notes Paths in citations are relative to `gt5-2.9.0/src/main/java` (GT5-Unofficial 5.09.54.265, GTNH 2.9.0). "RefMain case" means the unmodified 2.9.0 `OverclockCalculator.java` driven by `tools/java-ref/RefMain.java` (`tools/java-ref/run.sh "" case ...`; built once under `/tmp/batch-3/jref` with the same files to run many cases). Recipe defaults come from the 2.9.0 dump (`gt_recipes.json`), extracted once with `uv run python` into a scratch subset. ## distillation-tower - `createProcessingLogic()` returns a plain `ProcessingLogic` (`MTEDistillationTower.java:207-210`): regular OC, max parallel 1, one tier skip, batch mode (`:371-374`). - Base class `MTEEnhancedMultiBlockBase` (not extended power): only regular energy hatches. `HatchElement.Energy` on the base (`:88`) and `addEnergyInputToMachineList` on the layers (`:101`). - Height: `checkMachine` counts layers above the base until the top layer (`:270-284`); total height 3-12. Each layer needs an output hatch (`:275-278`). `addFluidOutputs` writes fluid i into layer i and stops at the number of layers (`:305-315`), so fluids past the top layer are not output. - Oil recipe: 480 EU/t, 64 t, 5 fluid outputs (`gt.recipe.distillationtower`, circuit 9). ## mega-distillation-tower - `setProcessingLogicPower` (`MTEMegaDistillationTower.java:571-584`): voltage = `getMaxInputEu()` (Σ V × working amps over normal + exotic hatches, `ExoticEnergyInputHelper.java:54-65`), amperage 1, unlimited tier skips; tower mode speed 1/1.5 and EU 0.9, distillery mode speed 1/2 and EU 0.5 (`:564-568`). The base-class one-hatch 1 A rule is bypassed. - `getMaxParallelRecipes` (`:551-557`): tower 256, distillery `256 × (1 + height / 2)`. `megaMachinesMax` is `@Config.Ignore public static int = 256` (`bartworks/common/configs/Configuration.java:63-64`), not configurable. - Height derivation from `checkMachine` (`:231-281`): `height = 1`; each loop iteration checks the top piece at the current height, then the middle slice, then `height++`; the loop breaks at the start of the iteration after the top was found. A tower with S middle slices ends with `height = S + 1` (S = 1..5, height 2..6). Distillery parallels: S=1,2 → 512; S=3,4 → 768; S=5 → 1024, matching the code comment "512 - 1024 parallels min to max height" (`:553`). The tooltip markdown (`resources/.../tooltip/mega-distillation-tower.md`) says `256 * (1 + Tower Height / 2)` with Tower Height = number of middle slices, which would give 256 for one slice; the code gives 512. - Output hatch layers: indices `2h-2`, `2h-1` per slice and `2h` for the top (`:395-452`), 2S + 1 total. Fluid i goes to layer i; past the last layer `addFluidOutputs` stops (`:466-497`). - All five numeric examples come from RefMain cases with the power, speed, EU and parallel values above. ## dangote - Base `GTPPMultiBlockBase` → `MTEExtendedPowerMultiBlockBase`, no `setProcessingLogicPower` override: one-hatch 1 A rule, integer-average voltage, summed working amps, one tier skip. - `setupProcessingLogic` (`MTEAdvDistillationTower.java:396-400`): EU 0.15 / speed 1/2 in distillery mode, EU 1.0 / speed 1/3 in tower mode. `getMaxParallelRecipes` (`:403-406`): tower 12 (`:74`), distillery `(int)(2 * floor((mHeight + 1) / 3f)) * getTier(getMaxInputVoltage())`. - `mHeight` = number of layers above the base: starts at 1, `checkPiece(LAYER, 1, mHeight, 0)`, breaks when the top (or a muffler) is found, else `mHeight++` (`:274-285`); `mHeight == 1` is an error (`:294-296`). So `mHeight + 1` = tower height in blocks (3-12); the tooltip's `floor(Height / 3)` matches. - Multi-amp hatches: `GTPPMultiBlockBase.addEnergyInputToMachineList` accepts `MTEHatchEnergyMulti` (`:573-580`), but `addToMachineList` files it under `mTecTechEnergyHatches` (`:308-311`). `getExoticAndNormalEnergyHatchList()` (`MTEMultiBlockBase.java:4175-4178`) reads only `mExoticEnergyHatches` and `mEnergyHatches`, so such a hatch would add nothing to voltage/amperage. The page offers regular hatches only. Not tested in game (see Unverified). - Examples: parallel caps by hand from the lines above, then RefMain cases with the resulting voltage/amperage/modifiers. ## mega-oil-cracker - `setProcessingLogicPower` (`MTEMegaOilCracker.java:452-456`): voltage `getMaxInputEu()`, 1 A, unlimited tier skips. `getEuModifier` = `powInt(0.9, coil.getTier() + 1)` (`:469-471`), supplied through `setEuModifierSupplier` (`:459-461`). Parallel `megaMachinesMax` = 256 (`:464-467`). Batch (`:521-524`). - Glass: laser hatches need glass ≥ UV (`:291-298`); any hatch with `getTierForStructure()` above the glass tier fails the structure (`:299-304`). - `HYDRO_H2_SAVING_PERCENT`, `HYDRO_OUTPUT_BONUS_PERCENT`, `STEAM_OUTPUT_BONUS_PERCENT` (`:86-88`) are only passed to the tooltip markdown (`:211-214`); grep finds no other use in the class. The bonuses are therefore properties of the cracking recipes, not of the machine. - `euMod` values passed to RefMain are the JS `GT.powInt(0.9, n)` doubles printed with full precision (0.5904900000000002 for HSS-G, 0.38742048900000015 for Trinium); `GT.powInt` mirrors `GTUtility.powBySquaring` (`GTUtility.java:3570-3592`, foundation tests). ## industrial-centrifuge - `createProcessingLogic` (`MTEIndustrialCentrifuge.java:220-234`): EU 0.9, speed supplier `1 / (2 + 1.0 × momentum / 100)` (`:236-242`), parallel supplier `getTrueParallel`. `getMaxParallelRecipes` = `(int)((4 + 4 × momentum / 100.0) × getTier(getMaxInputVoltage()))` (`:244-251`); `4 * momentum` is int arithmetic, then divided by the double 100. JS uses the same operation order. - Momentum: `onRunningTick` +1 every 10 running ticks while < 100 (`:328-336`); `onPostTick` −2 every 5 ticks while `mMaxProgresstime == 0` (`:338-347`). Suppliers are read at each recipe check (`ProcessingLogic.java:388-400`). - `validateRecipe` rejects recipes with `CentrifugeRecipeKey` metadata (heavy mode) (`:224-229`). - Regular hatches only (`HatchElement.Energy`, `:158`). - Glowstone recipe: 80 EU/t, 976 t (`gtpp.recipe.multicentrifuge` = `centrifugeNonCellRecipes` in the dump). ## industrial-electrolyzer - `createProcessingLogic` (`MTEIndustrialElectrolyzer.java:168-173`): speed 1/2.8, EU 0.9 (constants `:54-56`); `getMaxParallelRecipes` = `4 × getTier(getMaxInputVoltage())` (`:175-178`). Regular hatches only (`:116`). No power override. - Examples: parallel by hand, then RefMain with the base-class power values. ## industrial-sifter (Large Sifter) - Display name "Large Sifter" from `LoaderMetaTileEntities.java:789` and `resources/assets/gregtech/lang/en_US.lang:10446`. - `createProcessingLogic` (`MTEIndustrialSifter.java:207-213`): `noRecipeCaching()`, speed 1/5, EU 0.75; `getMaxParallelRecipes` = `4 × getTier(getMaxInputVoltage())` (`:215-218`). `noRecipeCaching` only sets `.caching(false)` on the recipe query (`ProcessingLogic.java:298-301, 539-540`). Regular hatches only (`:106`). - Expected chanced output = recipes/s × chance; this ignores how chances are rolled per parallel (expectation is the same). ## industrial-thermal-centrifuge (Large Thermal Refinery) - Display name "Large Thermal Refinery" from `LoaderMetaTileEntities.java:772-776` and `en_US.lang:10447`. - `createProcessingLogic` (`MTEIndustrialThermalCentrifuge.java:225-230`): suppliers for parallel, EU (`getEUMultiplier` = `0.8 × powInt(0.95, coil.getTier())`, `:273-278`) and speed (`1 / (2.5 + 0.05 × coil.getTier())`, `:265-271`). `getMaxParallelRecipes` = `8 × getTier(getMaxInputVoltage()) + 2 × solenoidLevel` (`:232-236`). - Solenoid tier = `BlockCyclotronCoils.getVoltageTier(meta)` = meta + 2 (`gregtech/common/blocks/BlockCyclotronCoils.java:117-119`), MV (meta 0) … UMV (meta 10). The structure element rejects a second solenoid of a different tier (`GTStructureUtility.java:771-778`). - With no coil, `getEUMultiplier` returns 0.8 × 0 = 0 (`:274-275`); the structure requires coils, so this cannot occur in a formed machine. - Regular hatches only (`:141`). ## precise-assembler - Name "Precise Auto-Assembler MT-3662" (`goodgenerator/loader/Loaders.java:331-334`). Default `machineMode` 0 = `MACHINEMODE_PRECISE` (`MTEPreciseAssembler.java:102`, `MTEMultiBlockBase.java:196`). - `validateRecipe` (`:205-213`): precise mode rejects `mSpecialValue > casingTier + 1`. `createOverclockCalculator` (`:216-220`): duration modifier 1 (precise) / 0.5 (assembler), replacing the base speed bonus (which is 1). `getMaxParallelRecipes` (`:224-227`): 1 / `(int) powInt(2, 4 + casingTier + 1)`. - Casing tier from `getCasingBlockTier` (`:358-363`): imprecise −1, precise meta 0-3; not set = −3. Machine casing tier = `sBlockCasings1` meta 0-9 (`:160-170`; meta 9 = `Casing_MAX`, the UHV casing, `BlockCasings1.java:46-55`). - `setProcessingLogicPower` (`:229-236`): voltage `getMachineVoltageLimit()` (`:238-242`), amperage 1 for a single regular hatch else `getMaxInputAmps()` (sum of working amps over normal + exotic), amperage OC on, `setMaxTierSkips(0)`. `energyHatchTier` = max `mTier` over all hatches (`:331-340`). - Example "EV casing, 16× LuV" shows `maxTierSkips = 0` rejecting a LuV recipe at 2048 V although 32 A cover the EU/t (RefMain returns INSUFFICIENT_VOLTAGE). ## Common to the batch - Every page with parallels has a "Power panel parallel limit" input: `getTrueParallel()` = `max(1, alwaysMaxParallel ? max : min(max, powerPanelMaxParallel))` (`MTEMultiBlockBase.java:3278-3282`); `alwaysMaxParallel` defaults to true (`:205`). The `max(1, …)` also means a machine whose formula gives 0 parallels (voltage tier 0) still runs 1. - "Throughput by hatch tier" sweeps use the `hatches` input with a `values` function that returns modified hatch lists and a `format` for the axis labels. The current-value marker does not appear on these charts because the chart compares x values with `===`. No shared-file change was needed. - All pages were rendered in `tests/lib/dom-stub.mjs` from a scratch script (default state and one alternate hash per page): no exceptions, charts and tables present. Not checked in a real browser. ## Dead ends - The first Industrial Centrifuge RefMain run used speed 0.4219409282700422 (typed by hand); the Java expression `1.0 / (2.0 + 1.0 * 37 / 100.0)` is 0.42194092827004215. The example uses the rerun with the exact double. ## Unverified - Dangote Distillus with multi-amp hatches: from the source they are accepted by the structure but not counted for power (see the dangote section). Not tested in game; the page offers regular hatches only. - Mega Distillation Tower tooltip vs code: the code gives 512 distillery parallels for one middle slice where the tooltip formula gives 256. The page follows the code; not checked in game. - The 2.9.0 dump names the industrial centrifuge and electrolyzer maps `gtpp.recipe.multicentrifuge` / `gtpp.recipe.multielectro`, while the source registers `gt.recipe.multicentrifuge` / `gt.recipe.multielectro` (`RecipeMaps.java:2167-2176`). The dump may predate the rename; recipe values (glowstone 80 EU/t 976 t, water 30 EU/t 2000 t, saltpeter 60 EU/t 100 t) were taken from the dump and not cross-checked against the recipe loader source. - Fluids past the last output layer of the towers: `addFluidOutputs` skips them. How fluid void protection treats them (`getOutputHatchesByLayers`, `MTEMultiBlockBase.java:3171-3189`) was not traced. - Controller tiers in the index (`tier` field) are taken from the controller crafting recipes (circuit / recipe tier), not from the quest book. ## Verification Independent review of the batch against the 2.9.0 source. Main was merged first (already up to date, no conflicts). No shared files were changed by the implementer or the verifier. ### Per machine Each controller was read in full (structure, `checkMachine`, `createProcessingLogic`/`setupProcessingLogic`, `setProcessingLogicPower`, `getMaxParallelRecipes`, output handling, batch/void support), together with the base classes where they decide power (`MTEMultiBlockBase.java:1171-1176`, `MTEExtendedPowerMultiBlockBase.java:116-133`, `GTPPMultiBlockBase.java:295-311, 555-588`). Every `compute()` matches the Java: parallel formula, speed and EU modifiers, power source (average voltage × summed amps, or `getMaxInputEu()` at 1 A with unlimited tier skips for MDT and MOC), tier skips (1, unlimited, or 0 for the PA), batch, power panel limit (`getTrueParallel`, `MTEMultiBlockBase.java:3278-3282`). - Distillation Tower: plain `ProcessingLogic` (`MTEDistillationTower.java:207-210`); height loop in `checkMachine` (`:260-299`) gives 3-12; `addFluidOutputs` `:305-316`. - Mega Distillation Tower: height derivation re-traced from `checkMachine` (`:231-281`): the top piece is checked at the current height before the slice, so S slices end with `height = S + 1`, as the implementer found. The tooltip markdown (`resources/assets/gregtech/lang/en_US/tooltip/mega-distillation-tower.md`) defines Tower Height as the number of middle slices, so its formula is lower than the code. - Dangote Distillus: multi-amp hatches. `HatchElement.Energy` calls the virtual `addEnergyInputToMachineList`, which in `GTPPMultiBlockBase` (`:573-580`) accepts `MTEHatchEnergyMulti` and files it under `mTecTechEnergyHatches` (`:308-311`). That list is only read for explosions (`:160-163`) and stored-EU display (`mAllEnergyHatches`, `:119-135`); `getExoticAndNormalEnergyHatchList` does not include it. The hatch-element builder applies the adder without a class filter (`HatchElementBuilder.java:567-574, 591-597`). Regular-only hatch input is therefore correct as far as the source shows; in-game behaviour stays unverified. - Mega Oil Cracker: EU 0.9^(coil tier + 1) (`:89, 469-471`), 256 parallels, glass checks `:291-304`. - Industrial Centrifuge: constants `:81-96`, int × int / double order in `getParallelsPerTier` (`:249-251`) matches the JS. - Industrial Electrolyzer, Large Sifter, Large Thermal Refinery: constants and formulas match. Solenoid tier = meta + 2 (`BlockCyclotronCoils.java:117-119`), mixed solenoids rejected (`GTStructureUtility.java:771-778`). - Precise Auto-Assembler: `validateRecipe` override returns `SUCCESSFUL` without calling super (`:205-213`), same as the JS override. Voltage, amperage, `energyHatchTier` (`:331-340`, max `mTier` of regular and exotic hatches) and parallels match. Only glass ≥ EV is required (`:286-288`); no glass-vs-hatch check. - Display names checked in the lang files: `gregtech/lang/en_US.lang:10435-10510`, `bartworks/lang/en_US.lang:348-349`, `goodgenerator/lang/en_US.lang:532`, `miscutils/lang/en_US.lang:4188`. - Recipe defaults re-queried from the 2.9.0 dump with a fresh script (not the implementer's subset): oil 480 EU/t 64 t (5 fluids); heavy oil → sulfuric heavy fuel distillery 72 EU/t 40 t; naphtha cracking 240 EU/t 20/40/60 t; glowstone 80 EU/t 976 t; water 30 EU/t 2000 t; saltpeter 60 EU/t 100 t; purified diamond 16 EU/t 800 t with chances 45/35/28/14/12/3 %; purified tin 480 EU/t 600 t; thermal centrifuge purified ores 48 EU/t 500 t (all 337 such recipes); HUI circuit T1 30720 EU/t 100 t Mk-I, T3 491520 EU/t Mk-III. The 2.9.0 dump has precise-assembler special values 1-3 only; the page's "Mk-IV" recipe option has no 2.9.0 recipe. ### Independent examples One new example per machine (named "Verifier: …") with parameters different from the implementer's: parallel/voltage/modifier values derived by hand from the Java lines in each `source`, then the unmodified `OverclockCalculator.java` via RefMain (scratch build under `/tmp/batch-3/verify`, same files as `tools/java-ref/run.sh`). All nine matched the JS on the first run. ### Defects fixed - Mega Oil Cracker: the glass tier input allowed MAX (14), but the highest glass tier is UXV (`GlassTier.java:54-55`). A MAX glass let a MAX energy hatch pass the glass check on the page, which cannot form in game. The input now ends at UXV; example "MAX hatch with UXV glass" covers it. ### Resolved from Unverified - Large Sifter expected output: `ParallelHelper.calculateItemOutputs` (`:552-571`) multiplies the stack size by `calculateIntegralChancedOutputMultiplier(chance, parallel)` (`:593-630`): integer part × parallel, plus a binomial roll (or its normal approximation, clamped to [0, parallel], used only when mean ± 3σ lies inside that range), plus stochastic rounding of the fraction. The expected value is parallel × chance, so recipes/s × chance is the mean output rate (output stack size 1 for sifter recipes). - Industrial centrifuge/electrolyzer recipe values: the non-cell maps are filled by `RecipeGenMultisUsingFluidInsteadOfCells.generateRecipesNotUsingCells` from the single-block maps (`gtPlusPlus/GTplusplus.java:150-153`) with `recipe.copyShallow()` (`RecipeGenMultisUsingFluidInsteadOfCells.java:137`), so EU/t and duration equal the single-block recipe. Why the dump names the maps `gtpp.recipe.*` while the source registers `gt.recipe.*` remains unexplained. ### Not verified - Real-browser rendering. Pages were rendered only in `tests/lib/dom-stub.mjs` (default state plus edge hashes: insufficient power, missing output layers, glass error, imprecise casing, ULV machine casing, power-panel limit 1); no exceptions. - Dangote multi-amp hatches and the MDT tooltip/code difference in game (see Unverified above). - Index `tier` fields (controller availability tier).