A mod for Sector Space that adds tiered, station-only Station Refinery modules (I–V) with hoppers far larger than the stock refineries (10 / 20 / 30 / 40 / 50). They refine ore into raw materials using the game's exact per-unit output distribution, without a per-unit loop.
It is an SSFML / Fabric-style mixin mod that hooks into the game at runtime, so no game files are modified permanently.
Source: github.com/jpreed00/StationRefinery
- Registers five station-only modules, Station Refinery I–V, and stocks them at NPC Industrial markets. They are not unique — a station can run more than one.
- Install them on a station; each module pass consumes up to the hopper's worth of the first in-range ore stack and produces the same materials (and waste) the stock refinery would, including tier-gated recipes.
- Hopper size and efficiency are not item stats in Sector Space — they are hardcoded per id. These modules document the values the mixin actually uses:
| Module | Hopper | Efficiency |
|---|---|---|
| Station Refinery I | 10 | 50% |
| Station Refinery II | 20 | 60% |
| Station Refinery III | 30 | 70% |
| Station Refinery IV | 40 | 80% |
| Station Refinery V | 50 | 90% |
Stock refineries top out around hopper 4–5, so these are meant for station-scale ore processing.
- Item registration hooks
_database.ItemDatabase.loadDatabase()(tail) and writes the five modules with the 13-argModuleList.write(...)(station-only). - Market stock hooks
game.markets.MarketDatabase.loadDatabase()(tail) and adds market ids99011–99015(base id + 90000) to industrial markets. - Refine intercepts
items.actions.Module.runat HEAD for those ids, runs one aggregated batch (RefineBatch), and cancels the rest ofrun. Yields are sampled in O(1) via Bernoulli→Binomial aggregation, so a hopper of 50 is no more work than a hopper of 4.
There is no window and no hotkey. Debug chat logging (ore in, materials out) is a
compile-time switch: make DEBUG=1 (see below).
- Sector Space
>= 0.6.0.2(may work with older versions; only tested on this one). - SSFML (the Sector Space Fabric Mod Loader) with Fabric Loader
>= 0.18.4. - JDK 25+ (only needed to build from source, not to play).
- Download
stationrefinery.jarfrom GitHub Releases or build from source. - Copy it into the
mods\folder inside your Sector Space install directory, e.g.:...\Steam\steamapps\common\Sector Space\mods\stationrefinery.jar - Launch Sector Space (with SSFML installed). The mod loads automatically.
The mod compiles against the game's own jars, so the project folder is expected
to live inside your Sector Space install directory (alongside
Sector Space.jar, SSFML.jar, and libs\):
Sector Space\
├─ Sector Space.jar
├─ SSFML.jar
├─ libs\*.jar
├─ mods\
└─ StationRefinery\ <- this repo
├─ stationrefinery\mixin\*.java
├─ stationrefinery\refine\*.java
├─ fabric.mod.json
└─ stationrefinery.mixins.json
git clone https://github.com/jpreed00/StationRefinery.git
Make sure a JDK 25+ javac/jar is on your PATH, or note the path to its
bin folder (the bundled Makefile defaults to D:\Java\jdk-25.0.4.1).
From the StationRefinery folder:
make
That compiles the sources against the game jars one directory up and packages
..\mods\stationrefinery.jar, ready to load. make run will also launch the game.
make DEBUG=1 compiles debug chat logging in. A plain make strips it.
From the Sector Space directory, make builds every mod that has a Makefile
(make DEBUG=1 forwards the flag to mods that support it).
To build by hand instead:
javac -encoding UTF-8 -cp "../Sector Space.jar;../SSFML.jar;../libs/*" -d build/classes stationrefinery/mixin/*.java stationrefinery/refine/*.java
jar --create --file ../mods/stationrefinery.jar -C build/classes . -C . fabric.mod.json -C . stationrefinery.mixins.json
On Linux/macOS, use
:instead of;as the classpath separator.
| Path | Purpose |
|---|---|
stationrefinery/mixin/ |
Mixins: item registry, market stock, refine dispatch |
stationrefinery/refine/ |
Batch refine, recipes, binomial sampler, debug log |
fabric.mod.json |
Mod metadata, dependencies, and mixin registration |
stationrefinery.mixins.json |
Mixin configuration |
Released under the MIT License.
