Warning
This project is very much a work-in-progress. The project does not currently handle machine power usage or overclocking. If you decide to use it, please report any bugs, issues, or awkwardness as a GitHub issue.
GTNH Toolkit is a tool for designing factories in the Minecraft modpack GregTech: New Horizons. It automatically balancing the inputs and outputs of a given set of recipes to achieve a desired output rate of a given item.
The design is heavily inspired by gtnh-flow.
I use uv
for managing dependencies and python environments, so instructions will use uv
for commands. If you use something else, use the equivalent substitutions to install dependencies and run the program.
-
Install the Cbc dependency listed in the dependency section of this file.
-
Write a project file that specifies all recipes to be considered as well as your desired item output rate. Currently, JSON and YAML files are supported.
recipes:
- m: Electrolyzer
inputs:
water: 500 # per craft
outputs:
oxygen: 500 # per craft
hydrogen: 1000 # per craft
dur: 1000 # gameticks per craft
eut: 100 # EU per gametick
- m: Large Chemical Reactor
inputs:
sulfur: 1 # per craft
hydrogen: 2000 # per craft
outputs:
hydrogen sulfide: 1000 # per craft
dur: 60 # gameticks per craft
eut: 200 # EU per gametick
targets:
hydrogen sulfide: 250 # per second
- Change the file being loaded in
main.py
to reference your new project file:
factory_config = load_factory_config("./.input/hydrogen_sulfide.yaml")
- Run the program with
uv run main.py
to generate your output. It will be saved in theoutput
folder.