Repository navigation
Feature/xml machines - #3
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.