Skip to content

Feature/xml machines - #3

Merged
dshadowwolf merged 7 commits into
master-1.21.1-neofrom
feature/xml-machines
Nov 19, 2026
Merged

dshadowwolf merged 7 commits into
master-1.21.1-neofrom
feature/xml-machines

Conversation

@dshadowwolf

Copy link
Copy Markdown
Collaborator

No description provided.

dshadowwolf and others added 7 commits November 19, 2026 08:52
The steam drill again mines at Steam Advantage 2's rate: a configurable
number of ticks per point of block hardness (drillTicksPerHardness, 12 by
default, minimum half that). It now returns blocks' normal drops instead of
running them through crusher recipes, which turned every Mineralogy rock in
c:cobblestones into gravel.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2.0.3 adds what the XML machine port needs: six-way facing, tag and
Java-rule storage admission, several processors per machine, comparator
sources, and entity subclasses that can import legacy save data. The
existing machines pass all GameTests on it unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The first two machines move from the shared SteamMachine entity to MMDLib
2.0.3 XML definitions (mmdlib/machine/), on a new abstract steam_base with
the shared block settings.

- SteamProcessor: base for SteamAdvantage's custom processors, with the
  steam helpers, SA2's "stop while powered" rule and the comparator
  reading each machine XML selects as steamadvantage/comparator.
- SteamTankProcessor and SteamValveProcessor keep the old push rates
  (100 mB per face; 1000 mB out of the front).
- Storage keeps the "Fluids" key and steam as tank 0, so pre-XML saves
  load unchanged; a new GameTest imports saves written by the old entity.
- The machines' old blockstates, item models, loot tables, standalone
  JSON and screens are removed: MMDLib generates them, and SA3's own copies
  would take priority. The tank model becomes block/steam_tank_model.
- An XML machine's comparator is sampled once per tick, so its scaling
  test steps a tick apart. The GUI smoke test opens XML machines too and
  accepts MMDLib's generated tank gauges.

Version 3.2.0, with a changelog entry for the port so far.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Seven more machines move to MMDLib XML definitions, each with a custom
processor that keeps its SA3 behavior:

- BoilerProcessor, with coal, oil, electric and geothermal variants
  (fuel slot and oil tank admission rules, burn timers, temperature).
- PumpProcessor, StillProcessor (Power Advantage distilling recipes, with
  a recipe-based input filter) and ElevatorProcessor, which redstone
  drives rather than pauses.

SteamMachineEntity imports saves from before the XML port: each processor
copies the top-level keys it used (Burn, TotalBurn, Temperature, Raised,
ElevatorHeight, PendingDistillation...) into its own state, the electric
boiler's pre-2.0.2 "Energy" becomes "energy", and old nine-slot item
positions map onto each machine's declared slots. It is registered as
the entity for every XML machine.

Screens use MMDLib's generated tank gauges, with SA3's burn meter, heat
gauge, distillation progress and help text placed in the machine region
through SteamScreens' static value helpers (XML machine screens bind to
DefinedMachineEntity). The switch gets its help text back.

Tests: the ported machines' tests use the XML entity and processors, and
preXmlMachineSavesLoad imports saves written by the old entity for all
seven machines.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
DrillProcessor carries DrillOperation's behavior, including the restored
SA2 pace and plain block drops: drilling, segment-by-segment retraction at
bedrock, the world edge or its range, track following, and output pushed
out of its back. The XML block uses six-way facing, placed toward the
player as before.

SteamMachineEntity keeps the drill pipe tidy without a machine-specific
block: removing the drill (MMDLib's dropContents, which never runs on
chunk unload) or turning it to face elsewhere (setBlockState) clears the
pipe. A drill moving along a track carries its contents with it and no
longer drops a recovery capsule where it was. Pre-XML drills import their
depth, phase, retraction and progress, and output slots 4-8 become 0-4.

The drill bit's cleanup reaches the drill through its processor. Drill
tests step DrillProcessor directly; the redstone reset is checked on real
ticks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The crusher and furnace become XML machines driven by MMDLib recipe
processors, so every SteamAdvantage machine is now an MMDLib XML machine.

- steamadvantage:steam_crushing (SteamCrushingRecipes) adapts every MMDLib
  crushing recipe at the old cost: 125 ticks, 18,750 mB of steam per item.
- steamadvantage:steam_smelting (SteamSmeltingRecipes) adapts smelting at
  each recipe's cooking time, converting MMDLib's FE price to steam
  (2000 mB per 200 ticks). The furnace runs three lanes bound to their own
  slots, sharing the steam tank; its fuel slot and heat model are gone.
- RecipeMachineSensor gives both machines their comparator reading and
  lets a working furnace melt snow. SteamMachineEntity holds recipe
  machines while powered, keeping SA2's redstone rule.
- Pre-XML crushers and furnaces import their items and steam; the old
  furnace fuel slot's contents go to recovery.

The shared SteamMachine entity, MachineBlock, MachineSettings, the old
*Operation classes, the machine factories and the use_machine handler are
removed. Old-save tests now load SNBT fixtures written by that entity
(captured from 74ffdb0, data/steamadvantage/legacy_saves), the GameTest-
only tank variant is an XML machine extending steam_tank, and the furnace
temperature tests are dropped with the model they tested.

docs/mmdlib-integration.md, the README and the 3.2.0 changelog entry
describe the XML machines.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The SA2 drill pace and plain block drops landed after 3.1.0 was tagged,
so their notes belong to 3.2.0, as does the TODO's "removed in" version.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dshadowwolf
dshadowwolf merged commit 052ab1c into master-1.21.1-neo Nov 19, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant